glx/dri: Initialize reset to __DRI_CTX_RESET_NO_NOTIFICATION.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 6 Aug 2012 22:12:07 +0000 (15:12 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 9 Aug 2012 00:15:21 +0000 (17:15 -0700)
If the application has requested reset notification, then
dri2_convert_glx_attribs will initialize this to the correct value.

Otherwise, it's supposed to initialize this to NO_NOTIFICATION, but
doesn't when num_attribs == 0.  (The consensus seems to be that we
should make it do so, but that's more invasive, so I'm pushing this for
now.)

Fixes a regression since a8724d85f8cb2f0fb73b9c6c1f268f9084c6d473
where trying to run OilRush_x86 or apitrace heaven_x64 would result in:

dri_util.c:221: dri2CreateContextAttribs: Assertion `!"Should not get
here."' failed.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53076
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/glx/dri2_glx.c
src/glx/drisw_glx.c

index 79237c3c91b3e4633c6db39105e9afc127123f28..4e8b3516df47dd6fe690fbda22a8d9b280c44b95 100644 (file)
@@ -241,7 +241,7 @@ dri2_create_context_attribs(struct glx_screen *base,
    uint32_t major_ver = 2;
    uint32_t flags = 0;
    unsigned api;
-   int reset;
+   int reset = __DRI_CTX_RESET_NO_NOTIFICATION;
    uint32_t ctx_attribs[2 * 5];
    unsigned num_ctx_attribs = 0;
 
index 519786e5281b9a56cbcd0afad2c27796081c1966..462be7d9f470a20ed7bdf49ea41c31a6523cd820 100644 (file)
@@ -433,7 +433,7 @@ drisw_create_context_attribs(struct glx_screen *base,
    uint32_t major_ver = 0;
    uint32_t flags = 0;
    unsigned api;
-   int reset;
+   int reset = __DRI_CTX_RESET_NO_NOTIFICATION;
    uint32_t ctx_attribs[2 * 4];
    unsigned num_ctx_attribs = 0;