On 11/29/2012 01:35 PM, Eric Anholt wrote: > Chad Versace <[email protected]> writes: > >> On 11/28/2012 12:22 PM, Marek Olšák wrote: >>> On Wed, Nov 28, 2012 at 8:42 PM, Chad Versace >>> <[email protected]> wrote: >>>> On 11/28/2012 10:40 AM, Marek Olšák wrote: >>>>> On Wed, Nov 28, 2012 at 7:26 PM, Chad Versace >>>>> <[email protected]> wrote: >>>>>> On 11/27/2012 07:47 PM, Marek Olšák wrote: >>>>>>> HI Chad, >>>>>>> >>>>>>> FYI, the core GL support in the GLX backend of waffle and/or piglit >>>>>>> seems to be broken. All piglit tests that specify the core GL version >>>>>>> and are run on a driver which cannot create a core GL context (that is >>>>>>> any open driver except i965), always fail. The tests report >>>>>>> GLXBadFBConfig and just die. I think the piglit_init function isn't >>>>>>> even reached. >>>>>>> >>>>>>> I don't use EGL. >>>>>>> >>>>>>> Marek >>>>>> >>>>>> Marek, >>>>>> >>>>>> I tried some experiments with i965 and older versions of Mesa in an >>>>>> attempt to reproduce your problem, but I can't. In the two experiments >>>>>> I tried below, the behavior was exactly as expected. >>>>>> >>>>>> * Test 1: Against i965 from mesa-7.11, which supports only GL 2.1 and no >>>>>> GLX_ARB_create_context. >>>>>> >>>>>>> PIGLIT_DEBUG=1 PIGLIT_PLATFORM=glx ./gl-3.1-minmax >>>>>> piglit: debug: waffle_config_choose failed due to >>>>>> WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM: GLX_ARB_create_context is required >>>>>> in order to request a GL version not equal to the default value 1.0 >>>>>> piglit: info: Failed to create GL 3.1 core context >>>>>> Mesa: Initializing x86-64 optimizations >>>>>> Test requires GL version 3.1 >>>>>> PIGLIT: {'result': 'skip' } >>>>>> >>>>>> >>>>>> * Test 2: Against i965 from mesa-9.0.1, which supports GL 3.1 core, and >>>>>> an Xserver >>>>>> without GLX_ARB_create_context. >>>>>> >>>>>>> PIGLIT_DEBUG=1 PIGLIT_PLATFORM=glx ./gl-3.1-minmax >>>>>> piglit: debug: waffle_config_choose failed due to >>>>>> WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM: GLX_ARB_create_context is required >>>>>> in order to request a GL version not equal to the default value 1.0 >>>>>> piglit: info: Failed to create GL 3.1 core context >>>>>> Test requires GL version 3.1 >>>>>> PIGLIT: {'result': 'skip' } >>>>>> >>>>>> >>>>>> Please run, with PIGLIT_DEBUG=1, the piglit test that's causing you >>>>>> trouble >>>>>> and send me the output. Hopefully that will be enough for me to identify >>>>>> and fix the bug. >>>>> >>>>> PIGLIT_DEBUG doesn't print anything. All I get is: >>>>> >>>>> X Error of failed request: GLXBadFBConfig >>>>> Major opcode of failed request: 154 (GLX) >>>>> Minor opcode of failed request: 34 () >>>>> Serial number of failed request: 22 >>>>> Current serial number in output stream: 20 >>>>> >>>>> I get the same error with gallium and classic swrast. >>>>> >>>>> Marek >>>> >>>> Even with swrast, I'm not getting GLXBadFBConfig. >>>> >>>>> PIGLIT_DEBUG=1 PIGLIT_PLATFORM=glx LIBGL_ALWAYS_SOFTWARE=1 >>>>> bin/gl-3.1-minmax >>>> piglit: debug: waffle_config_choose failed due to >>>> WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM: GLX_ARB_create_context is required >>>> in order to request a GL version not equal to the default value 1.0 >>>> piglit: info: Failed to create GL 3.1 core context >>>> Test requires GL version 3.1 >>>> PIGLIT: {'result': 'skip' } >>>> >>>> >>>> The GLX call that likely emits GLXBadFBConfig is the call to >>>> glXCreateNewContext >>>> at glx_context.c:144 (lines relative to waffle-1.2.2). That call succeeds >>>> for me, >>>> so I don't know why it's failing for you. The following information would >>>> help: >>>> >>>> 1. Break at glx_context.c:144. >>>> 2. Verify that the call to glXCreateNewContext there emits GLXBadFBConfig. >>>> 3. Give me the backtrace there. >>>> 4. In gdb, give me the output of `print *config`. >>>> 5. Give me the output of glxinfo. >>> >>> After some investigation, it's actually glXCreateContextAttribsARB >>> that fails, which is what I would expect to fail if it can't create a >>> core context. The implementation is in mesa/src/glx/create_context.c. >>> I'm cc'in Ian, because he implemented it. >>> >>> glXCreateContextAttribsARB falls back to indirect rendering if it >>> fails to create a direct context and then >>> xcb_glx_create_context_attribs_arb_checked returns GLXBadFBConfig. >>> >>> I have 2 options there: >>> - don't try indirect rendering and return NULL >>> - don't call __glXSendErrorForXcb (which kills the app) and return NULL >>> >>> Both options yield the behavior waffle expects. My guess is that we >>> should remove the call to __glXSendErrorForXcb, but I'm not sure if >>> it's a correct fix. >>> >>> BTW I have X Server 1.13. >>> >>> Marek >> >> I third option is to add a new waffle function that allows clients >> to register various error handlers. >> >> When writing waffle, I completely >> forgot that the default handler for X errors simply exits. I was working >> from Wayland's model, where unhandled errors are ignored. Another lesson >> learned for waffle 2.0. > > If waffle is generating the requests, it should suppress the errors on > its own.
I think that's sensible. Marek has submitted a patch that does so for glXCreateContext*, which is now on master and the stable branch. _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
