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 <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Kenneth Graunke 2016-01-01 22:27:22 -08:00
parent 4a1c8a3037
commit 28dea26626
1 changed files with 3 additions and 1 deletions

View File

@ -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;