aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-01-01 22:27:22 -0800
committerKenneth Graunke <[email protected]>2016-01-02 18:46:16 -0800
commit28dea2662699072715f67ef34e910d278f88f3b1 (patch)
treeb8391e94374696364dc7e8cf57311ce65fa03995 /src/mesa/drivers
parent4a1c8a3037cd29938b2a6e2c680c341e9903cfbe (diff)
i965: Make TCS precompile use the TES primitive mode when available.
If there's a linked TES program, we should just use the actual primitive mode. If not, just guess triangles (as we did before). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_tcs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_tcs.c b/src/mesa/drivers/dri/i965/brw_tcs.c
index 2c925e7f572..7e414260284 100644
--- a/src/mesa/drivers/dri/i965/brw_tcs.c
+++ b/src/mesa/drivers/dri/i965/brw_tcs.c
@@ -307,7 +307,9 @@ brw_tcs_precompile(struct gl_context *ctx,
/* Guess that the input and output patches have the same dimensionality. */
key.input_vertices = shader_prog->TessCtrl.VerticesOut;
- key.tes_primitive_mode = GL_TRIANGLES;
+ key.tes_primitive_mode =
+ shader_prog->_LinkedShaders[MESA_SHADER_TESS_EVAL] ?
+ shader_prog->TessEval.PrimitiveMode : GL_TRIANGLES;
key.outputs_written = prog->OutputsWritten;
key.patch_outputs_written = prog->PatchOutputsWritten;