From f78a6b1ce398a537d77c25b1a93f156109086975 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Fri, 24 Jun 2016 14:28:51 -0400 Subject: glsl: add driconf to zero-init unintialized vars Some games are sloppy.. perhaps because it is defined behavior for DX or perhaps because nv blob driver defaults things to zero. So add driconf param to force uninitialized variables to default to zero. This issue was observed with rust, from steam store. But has surfaced elsewhere in the past. Signed-off-by: Rob Clark Reviewed-by: Kenneth Graunke --- src/gallium/state_trackers/dri/dri_screen.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gallium/state_trackers/dri') diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c index 2ac55c88926..b16585a38cc 100644 --- a/src/gallium/state_trackers/dri/dri_screen.c +++ b/src/gallium/state_trackers/dri/dri_screen.c @@ -74,6 +74,7 @@ const __DRIconfigOptionsExtension gallium_config_options = { DRI_CONF_SECTION_MISCELLANEOUS DRI_CONF_ALWAYS_HAVE_DEPTH_BUFFER("false") + DRI_CONF_GLSL_ZERO_INIT("false") DRI_CONF_SECTION_END DRI_CONF_END }; @@ -98,6 +99,7 @@ dri_fill_st_options(struct st_config_options *options, driQueryOptionb(optionCache, "force_s3tc_enable"); options->allow_glsl_extension_directive_midshader = driQueryOptionb(optionCache, "allow_glsl_extension_directive_midshader"); + options->glsl_zero_init = driQueryOptionb(optionCache, "glsl_zero_init"); } static const __DRIconfig ** -- cgit v1.2.3