summaryrefslogtreecommitdiffstats
path: root/src/loader
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2019-01-07 10:52:56 +0200
committerTapani Pälli <[email protected]>2019-01-08 08:15:07 +0200
commitc292414765430b8030155021c95e2a713dd81a10 (patch)
tree4d0ef16f26b6f2a8c3ae8ecac26c53a89523a044 /src/loader
parent4298a85ae8b54ac323cdc0518bf58be8d39650f9 (diff)
dri3: initialize adaptive_sync as false before configQueryb
Fixes following errors from valgrind output: ==23388== Conditional jump or move depends on uninitialised value(s) ==23388== at 0x48B4924: loader_dri3_drawable_init (loader_dri3_helper.c:381) ==23388== by 0x48A97D2: dri3_create_drawable (dri3_glx.c:386) ==23388== by 0x489E190: driFetchDrawable (dri_common.c:369) ==23388== by 0x48A9187: dri3_bind_context (dri3_glx.c:195) ==23388== by 0x488B75C: MakeContextCurrent (glxcurrent.c:220) ==23388== by 0x488B8DB: glXMakeCurrent (glxcurrent.c:267) ==23388== by 0x10A987: ??? (in /usr/bin/glxgears) ==23388== by 0x4BEB412: (below main) (in /usr/lib64/libc-2.28.so) ==23388== ==23388== Conditional jump or move depends on uninitialised value(s) ==23388== at 0x48B5A40: loader_dri3_swap_buffers_msc (loader_dri3_helper.c:923) ==23388== by 0x48A9B7E: dri3_swap_buffers (dri3_glx.c:587) ==23388== by 0x4887A81: glXSwapBuffers (glxcmds.c:857) ==23388== by 0x10ADED: ??? (in /usr/bin/glxgears) ==23388== by 0x4BEB412: (below main) (in /usr/lib64/libc-2.28.so) Fixes: 2e12fe425fe "loader/dri3: Enable adaptive_sync via _VARIABLE_REFRESH property" Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Nicholas Kazlauskas <[email protected]>
Diffstat (limited to 'src/loader')
-rw-r--r--src/loader/loader_dri3_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
index 5c48da93e6a..20fe4cbdabc 100644
--- a/src/loader/loader_dri3_helper.c
+++ b/src/loader/loader_dri3_helper.c
@@ -366,7 +366,7 @@ loader_dri3_drawable_init(xcb_connection_t *conn,
cnd_init(&draw->event_cnd);
if (draw->ext->config) {
- unsigned char adaptive_sync;
+ unsigned char adaptive_sync = 0;
draw->ext->config->configQueryi(draw->dri_screen,
"vblank_mode", &vblank_mode);