From c4e47ab971f8a7ee5e6c34e3e29a6fc3d06d4414 Mon Sep 17 00:00:00 2001 From: Andres Gomez Date: Wed, 29 Jun 2016 16:02:27 +0300 Subject: [PATCH] Revert "i965: get PrimitiveMode from the program rather than the shader struct" This reverts commit 644e015f0b9236e955d679cac4bcc7a1523fc475. PrimitiveMode from the program doesn't always hold a valid value that is neither of GL_TRIANGLES, GL_QUADS nor GL_ISOLINES when reaching this code. This caused regressions in the following CTS tests: GL44-CTS.stencil_texturing.functional GL44-CTS.shading_language_420pack.binding_images GL44-CTS.shading_language_420pack.binding_samplers GL44-CTS.shading_language_420pack.binding_uniform_single_block GL44-CTS.shading_language_420pack.implicit_conversions GL44-CTS.shading_language_420pack.initializer_list GL44-CTS.shading_language_420pack.length_of_vector_and_matrix GL44-CTS.shading_language_420pack.line_continuation Hence, we rather take it from the linked shader. Reviewed-by: Timothy Arceri Signed-off-by: Andres Gomez --- src/mesa/drivers/dri/i965/brw_tcs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_tcs.c b/src/mesa/drivers/dri/i965/brw_tcs.c index 28e2f36f94e..acfd1e5770b 100644 --- a/src/mesa/drivers/dri/i965/brw_tcs.c +++ b/src/mesa/drivers/dri/i965/brw_tcs.c @@ -395,8 +395,9 @@ brw_tcs_precompile(struct gl_context *ctx, _LinkedShaders[MESA_SHADER_TESS_CTRL]->info.TessCtrl.VerticesOut; } - key.tes_primitive_mode = brw->tess_eval_program ? - brw->tess_eval_program->PrimitiveMode : GL_TRIANGLES; + key.tes_primitive_mode = shader_prog->_LinkedShaders[MESA_SHADER_TESS_EVAL] + ? shader_prog->_LinkedShaders[MESA_SHADER_TESS_EVAL]->info.TessEval.PrimitiveMode + : GL_TRIANGLES; key.outputs_written = prog->OutputsWritten; key.patch_outputs_written = prog->PatchOutputsWritten; -- 2.30.2