-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/19/2011 03:18 PM, Kenneth Graunke wrote: > On 08/19/2011 10:44 AM, Chad Versace wrote: >> On 08/19/2011 10:35 AM, Eric Anholt wrote: >>> On Thu, 18 Aug 2011 14:02:46 -0700, Chad Versace <c...@chad-versace.us> >>> wrote: >>>> When intel_verify_dri2_has_hiz() discovers that DRI2 (that is, the DDX >>>> driver) cannot provide a separate stencil buffer, but >>>> intel_context::hw_must_use_separate_stencil is set, then emit an >>>> informative assertion failure as soon as possible. >>>> >>>> Currently, we do emit an assertion failure, but the its location is >>>> sufficiently unrelated to the DRI2 HiZ handshake as to be uninformative. >>>> In experimenting with HiZ, Anholt encountered this assertion failure and >>>> was unable to understand its cause. >>>> >>>> CC: Eric Anholt <e...@anholt.net> >>>> Signed-off-by: Chad Versace <c...@chad-versace.us> >>>> --- >>>> src/mesa/drivers/dri/intel/intel_context.c | 4 ++++ >>>> 1 files changed, 4 insertions(+), 0 deletions(-) >>>> >>>> diff --git a/src/mesa/drivers/dri/intel/intel_context.c >>>> b/src/mesa/drivers/dri/intel/intel_context.c >>>> index fe8be08..b9d2579 100644 >>>> --- a/src/mesa/drivers/dri/intel/intel_context.c >>>> +++ b/src/mesa/drivers/dri/intel/intel_context.c >>>> @@ -1454,6 +1454,10 @@ intel_verify_dri2_has_hiz(struct intel_context >>>> *intel, >>>> * a combined depth/stencil buffer. Discard the hiz buffer too. >>>> */ >>>> intel->intelScreen->dri2_has_hiz = INTEL_DRI2_HAS_HIZ_FALSE; >>>> + if (intel->must_use_separate_stencil) { >>>> + assert(!"intel_context requires separate stencil, but the " >>>> + "DRIscreen does not support it"); >>>> + } >>>> >>> >>> If it's something we think people can actually hit (and in this case we >>> do), just use _mesa_problem so people see it even if they aren't >>> building with assertions. >> >> I would also like to throw an assertion immediately after _mesa_problem(), >> like below. >> Since an assertion will eventually fail anyway, we might as well die ASAP. >> >> _mesa_probelm(ctx, "intel_context requires separate stencil, but the " >> "DRIscreen does no support it. You may need to upgrade " >> "the Intel X driver to 2.16.0"); >> assert(0); > > Not assert(0)...abort(). assertions get compiled away to nothing in > release mode.
Thanks. I have never used abort() before... I forgot it was in the toolbox. If I replace the assert with abort, is everyone happy? - -- Chad Versace c...@chad-versace.us -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJOTusDAAoJEAIvNt057x8ieXkP/j3xPmcu2DobddyEQ5uTsbpQ crY8Qt6bIRASv0mwe4Jg3SBDWrQtwpAQbI5XJPz6xrm7JRw71ioAyAwKFXf5Gh/2 LXK8pDKGl7VqOQzJRHxzkrfgppjB4rK2EGy1E9pvly5asj2/pC1SEhfxEeWXhWc0 CTytqD/figOcsyk432MrUpLw7iUXcwgQH+P4Bk0HedCdZ7ByhHu8tDZwAzoVwb0W kNV/W2D6xB39zwMjdRphZaLvkvYbp3BVsQwAhKZdvavBk/Mb4N8rZ6zcjLHygvyk 0tEtg0Es89PiCn2oxsirE9w3mPNtq4viZOwL0YnunaxSA8LuVjbWFXHymTrrAHLU +J4L17K7y1Avllrmi6S5B0k8y/DxPZMVRHYHXB1bwYhKy2NmWWGtjISG1+wJA8Pj in+SLwuRvHK34aqmF5g735DQpdf4fXYNO24NNU+18L+gpWcxM2KIFCgRiHI8qTQw 9cFvfLw2INP8QYFo6Lf0nu2J56T7yVyShFseaRryQ9Gj2g4tOmpxJARV/zjfJh81 J+tEMX+rEm/muL2EIRdht+ignimaAYXT6HuxjJ4WQ1E3//ATZlL4M7+jVKRTDeUI fK116DRHqmy6vn9jZyLAA80Y3jRrWD1FhAaUi6ZxmvDf2VQhnII+G8c84kl++5A5 cjso81b6b79N0dOXD2aA =UdQL -----END PGP SIGNATURE----- _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev