Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChoosePixelFormat() in wingdi.h returns system error 203 ERROR_ENVVAR_NOT_FOUND when using any software back-end. #207

Open
tfinnegan937 opened this issue Nov 26, 2024 · 1 comment

Comments

@tfinnegan937
Copy link

I am using mesa-dist-win version 24.2.7 on Windows version 9045.5131.

I am attempting to use llvmpipe for our application under single-threaded rendering.

The following call:

    int32_t pixelFormat;
    static PIXELFORMATDESCRIPTOR pfd =
    {
        sizeof(PIXELFORMATDESCRIPTOR),              // Size of this pixel format descriptor
        1,                                          // Version number
        PFD_DRAW_TO_WINDOW |                        // Format must support window
        PFD_SUPPORT_OPENGL |                        // Format must support OpenGL
        PFD_DOUBLEBUFFER,                           // Must support double buffering
        PFD_TYPE_RGBA,                              // Request an RGBA format
        32,                                         // Select our color depth
        0, 0, 0, 0, 0, 0,                           // Color bits ignored
        0,                                          // No alpha buffer
        0,                                          // Shift bit ignored
        0,                                          // No accumulation buffer
        0, 0, 0, 0,                                 // Accumulation bits ignored
        24,                                         // 32 Bit z-buffer (depth buffer)
        8,                                          // Stencil buffer
        0,                                          // No auxiliary buffer
        PFD_MAIN_PLANE,                             // Main drawing layer
        0,                                          // Reserved
        0, 0, 0                                     // Layer masks ignored
    };

    pixelFormat = ChoosePixelFormat(hdc, &pfd);

returns 0, with error 203 being the output from GetLastError().

This occurs under the the following environment variable configurations:

  1. GALLIUM_DRIVER=llvmpipe;LP_NUM_THREADS=1;
  2. GALLIUM_DRIVER=softpipe;
  3. GALLIUM_DRIVER=zink;LIBGL_ALWAYS_SOFTWARE=1

It does NOT occur with none of these variables set. This is a system with an RTX 3070 GPU.

Furthermore, if I replace PFD_DRAW_TO_WINDOW with PFD_DRAW_TO_BITMAP, I believe I run into a driver error. ChoosePixelForma() still returns 0, but no system error is generated with GetLastError().

@pal1000
Copy link
Owner

pal1000 commented Nov 28, 2024

This issue is more suitable for upstream support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants