shader: avoid trying to pre-link a TCS when a TES is not present

It is not valid to link a program that has a TCS but no TES, therefore
we shouldn't attempt to pre-link this combination of shaders.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Italo Nicola 3 years ago committed by Gert Wollny
parent 216d3b1014
commit c53b846aec
  1. 4
      src/vrend_renderer.c

@ -4826,6 +4826,10 @@ void vrend_link_program(struct vrend_context *ctx, uint32_t *handles)
if (!handles[PIPE_SHADER_VERTEX] || !handles[PIPE_SHADER_FRAGMENT])
return;
/* We can't link a pre-link a TCS without a TES, exit early */
if (handles[PIPE_SHADER_TESS_CTRL] && !handles[PIPE_SHADER_TESS_EVAL])
return;
struct vrend_shader_selector *prev_handles[PIPE_SHADER_TYPES];
memset(prev_handles, 0, sizeof(prev_handles));
uint32_t prev_shader_ids[PIPE_SHADER_TYPES];

Loading…
Cancel
Save