diff options
author | Rob Clark <robclark@freedesktop.org> | 2016-06-24 14:28:51 -0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2016-07-02 09:00:19 -0400 |
commit | f78a6b1ce398a537d77c25b1a93f156109086975 (patch) | |
tree | 0d891e0156328ae8462f1e7cad56b373e7ab8607 /src/compiler/glsl/glsl_parser_extras.cpp | |
parent | 202710d11057dfe4416770752cf5fd5b3f766999 (diff) | |
download | external_mesa3d-f78a6b1ce398a537d77c25b1a93f156109086975.zip external_mesa3d-f78a6b1ce398a537d77c25b1a93f156109086975.tar.gz external_mesa3d-f78a6b1ce398a537d77c25b1a93f156109086975.tar.bz2 |
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 <robclark@freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/compiler/glsl/glsl_parser_extras.cpp')
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index fab64bb..9601424 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -74,6 +74,7 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx, /* Set default language version and extensions */ this->language_version = 110; this->forced_language_version = ctx->Const.ForceGLSLVersion; + this->zero_init = ctx->Const.GLSLZeroInit; this->es_shader = false; this->ARB_texture_rectangle_enable = true; |