i965: get PrimitiveMode from the program rather than the shader struct
authorTimothy Arceri <timothy.arceri@collabora.com>
Mon, 20 Jun 2016 07:40:23 +0000 (17:40 +1000)
committerTimothy Arceri <timothy.arceri@collabora.com>
Tue, 21 Jun 2016 02:43:18 +0000 (12:43 +1000)
This is more consistent with what we do elsewhere and will allow
us to only cache one of the values in the shader cache.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/mesa/drivers/dri/i965/brw_tcs.c

index 8a5dd7e31cd4916d9e23f88b31407632a10e4eb7..548dc75276c17245027b041ea676f5e9bd6eeedd 100644 (file)
@@ -393,9 +393,8 @@ brw_tcs_precompile(struct gl_context *ctx,
    if (brw->gen < 8)
       key.input_vertices = shader_prog->TessCtrl.VerticesOut;
 
-   key.tes_primitive_mode =
-      shader_prog->_LinkedShaders[MESA_SHADER_TESS_EVAL] ?
-      shader_prog->TessEval.PrimitiveMode : GL_TRIANGLES;
+   key.tes_primitive_mode = brw->tess_eval_program ?
+      brw->tess_eval_program->PrimitiveMode : GL_TRIANGLES;
 
    key.outputs_written = prog->OutputsWritten;
    key.patch_outputs_written = prog->PatchOutputsWritten;