shader: make shader key always consider its own shader type to be present

When we first convert a tgsi shader into TGSL, we fill the shader key
with a value of `(gs|tcs|tes)_present` based on the currently bound
shaders. But since a shader is always going to be bound if it's being
used, we should already assume that it is going to be present in the
shader key, saving a recompilation.

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 c53b846aec
commit 1f1448ff10
  1. 6
      src/vrend_renderer.c

@ -3575,9 +3575,9 @@ static inline void vrend_fill_shader_key(struct vrend_sub_context *sub_ctx,
key->flatshade = sub_ctx->rs_state.flatshade ? true : false; key->flatshade = sub_ctx->rs_state.flatshade ? true : false;
} }
key->gs_present = !!sub_ctx->shaders[PIPE_SHADER_GEOMETRY]; key->gs_present = !!sub_ctx->shaders[PIPE_SHADER_GEOMETRY] || type == PIPE_SHADER_GEOMETRY;
key->tcs_present = !!sub_ctx->shaders[PIPE_SHADER_TESS_CTRL]; key->tcs_present = !!sub_ctx->shaders[PIPE_SHADER_TESS_CTRL] || type == PIPE_SHADER_TESS_CTRL;
key->tes_present = !!sub_ctx->shaders[PIPE_SHADER_TESS_EVAL]; key->tes_present = !!sub_ctx->shaders[PIPE_SHADER_TESS_EVAL] || type == PIPE_SHADER_TESS_EVAL;
if (type != PIPE_SHADER_COMPUTE) if (type != PIPE_SHADER_COMPUTE)
vrend_sync_shader_io(sub_ctx, sel, key); vrend_sync_shader_io(sub_ctx, sel, key);

Loading…
Cancel
Save