[Mesa-dev] [Mesa-stable] [PATCH 1/2] st/mesa: don't cast the incomplete framebufer to st_framebuffer

Nicolai Hähnle nicolai.haehnle at amd.com
Thu May 11 19:05:28 UTC 2017


On 11.05.2017 21:01, Andres Gomez wrote:
> Michel, Nicolai, this patch is queued for 17.0.
>
> Does this finding mean that we rather shouldn't add it in the release?
> So far it seems to me that it is still better having it in than not.
>
> Also, if we decide not to include it, should I keep the patch 2/2 of
> this series out too?
>
> Let me know what do you think. So far, I'm keeping the queue as it is.

Yes, please leave both patches out for now. The bug that they fixed is 
probably more benign than an assertion in the X server, so better safe 
than sorry until I got the time to understand this better.

Thanks,
Nicolai

>
> Thanks!
>
> On Thu, 2017-05-11 at 18:38 +0900, Michel Dänzer wrote:
>> On 25/04/17 06:23 PM, Nicolai Hähnle wrote:
>>> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>>>
>>> The incomplete framebuffer is set for a surfaceless context. This leads to
>>> the following error in piglit spec at egl_khr_surfaceless_context@viewport:
>>
>> [...]
>>
>>> diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
>>> index 86a82c2..2ba7de6 100644
>>> --- a/src/mesa/state_tracker/st_manager.c
>>> +++ b/src/mesa/state_tracker/st_manager.c
>>> @@ -837,27 +837,28 @@ st_api_destroy(struct st_api *stapi)
>>>
>>>  /**
>>>   * Flush the front buffer if the current context renders to the front buffer.
>>>   */
>>>  void
>>>  st_manager_flush_frontbuffer(struct st_context *st)
>>>  {
>>>     struct st_framebuffer *stfb = st_ws_framebuffer(st->ctx->DrawBuffer);
>>>     struct st_renderbuffer *strb = NULL;
>>>
>>> +   assert(st->ctx->DrawBuffer != _mesa_get_incomplete_framebuffer());
>>
>> This assertion sometimes fails in Xorg (with GLX indirect rendering
>> enabled) during a piglit run, see example backtrace below. I found a
>> way to reproduce it quickly: Run
>>
>> ( while .../piglit/bin/glx-get-current-display-ext -auto >/dev/null; do done )&
>>
>> in the background, then start a piglit gpu run.
>>
>>
>> ../../../src/mesa/state_tracker/st_manager.c:840:st_manager_flush_frontbuffer: Assertion `st->ctx->DrawBuffer != _mesa_get_incomplete_framebuffer()' failed.
>>
>> Thread 1 "Xorg" received signal SIGTRAP, Trace/breakpoint trap.
>> 0x00007f97c3a39b76 in _debug_assert_fail (expr=expr at entry=0x7f97c3e85e68 "st->ctx->DrawBuffer != _mesa_get_incomplete_framebuffer()", file=file at entry=0x7f97c3e85e38 "../../../src/mesa/state_tracker/st_manager.c", line=line at entry=840,
>>     function=function at entry=0x7f97c3e86930 <__func__.43856> "st_manager_flush_frontbuffer") at ../../../../src/gallium/auxiliary/util/u_debug.c:321
>> 321	   os_abort();
>> (gdb) bt
>> #0  0x00007f97c3a39b76 in _debug_assert_fail (expr=expr at entry=0x7f97c3e85e68 "st->ctx->DrawBuffer != _mesa_get_incomplete_framebuffer()", file=file at entry=0x7f97c3e85e38 "../../../src/mesa/state_tracker/st_manager.c", line=line at entry=840,
>>     function=function at entry=0x7f97c3e86930 <__func__.43856> "st_manager_flush_frontbuffer") at ../../../../src/gallium/auxiliary/util/u_debug.c:321
>> #1  0x00007f97c37cb928 in st_manager_flush_frontbuffer (st=0x55d1c5cd1080) at ../../../src/mesa/state_tracker/st_manager.c:840
>> #2  st_context_flush (stctxi=0x55d1c5cd1080, flags=<optimized out>, fence=<optimized out>) at ../../../src/mesa/state_tracker/st_manager.c:506
>> #3  0x00007f97c39772b2 in dri_make_current (cPriv=<optimized out>, driDrawPriv=0x55d1c6aa5df0, driReadPriv=0x55d1c6aa5df0) at ../../../../../src/gallium/state_trackers/dri/dri_context.c:240
>> #4  0x00007f97c3975cf4 in driBindContext (pcp=<optimized out>, pdp=<optimized out>, prp=<optimized out>) at ../../../../../../src/mesa/drivers/dri/common/dri_util.c:555
>> #5  0x00007f97c7bad635 in DoMakeCurrent (cl=0x55d1c6a64318, drawId=<optimized out>, readId=16777220, contextId=<optimized out>, tag=<optimized out>) at ../../glx/glxcmds.c:663
>> #6  0x000055d1c43ae059 in Dispatch () at ../../dix/dispatch.c:478
>> #7  0x000055d1c43b21a5 in dix_main (argc=3, argv=0x7ffc12f6f2a8, envp=<optimized out>) at ../../dix/main.c:276
>> #8  0x00007f97c97132b1 in __libc_start_main (main=0x55d1c439c8b0 <main>, argc=3, argv=0x7ffc12f6f2a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc12f6f298) at ../csu/libc-start.c:291
>> #9  0x000055d1c439c8ea in _start ()
>>
>>
>>



More information about the mesa-dev mailing list