i965: Initialize all elements of ctx->ShaderCompilerOptions.
authorPaul Berry <stereotype441@gmail.com>
Mon, 10 Jun 2013 17:29:20 +0000 (10:29 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 23 Aug 2013 18:02:34 +0000 (11:02 -0700)
Otherwise any GS that requires lowering (e.g. one that uses
gl_ClipDistance as an input or output) will fail to work.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_context.c

index 44a35d1a84013a9c61c062906289a4820e40fbd4..6308446cca9dbd7a76dd67b41292e59cd7079d77 100644 (file)
@@ -248,7 +248,7 @@ brw_initialize_context_constants(struct brw_context *brw)
       driQueryOptionb(&brw->optionCache, "disable_glsl_line_continuations");
 
    /* We want the GLSL compiler to emit code that uses condition codes */
-   for (int i = 0; i <= MESA_SHADER_FRAGMENT; i++) {
+   for (int i = 0; i < MESA_SHADER_TYPES; i++) {
       ctx->ShaderCompilerOptions[i].MaxIfDepth = brw->gen < 6 ? 16 : UINT_MAX;
       ctx->ShaderCompilerOptions[i].EmitCondCodes = true;
       ctx->ShaderCompilerOptions[i].EmitNoNoise = true;