From e29353ff20a2761a5a1caeaed78398557797207c Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 17 Sep 2014 22:17:02 +0200 Subject: radeonsi: don't snoop currently-bound GS shader when compiling ES MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead, pass the layout of GS inputs in memory to the ES using the shader key. Only 64 bits are needed to represent the layout in the key. Mixing and matching different VS and GS shaders should now always work. Reviewed-by: Michel Dänzer --- src/gallium/drivers/radeonsi/si_state.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/radeonsi/si_state.c') diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 5f1bfeaf60d..37774d7ba58 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2210,7 +2210,11 @@ static INLINE void si_shader_selector_key(struct pipe_context *ctx, for (i = 0; i < sctx->vertex_elements->count; ++i) key->vs.instance_divisors[i] = sctx->vertex_elements->elements[i].instance_divisor; - key->vs.as_es = sctx->gs_shader != NULL; + if (sctx->gs_shader) { + /* At this point, the GS should be selected and compiled. */ + key->vs.as_es = 1; + key->vs.gs_used_inputs = sctx->gs_shader->current->gs_used_inputs; + } } else if (sel->type == PIPE_SHADER_FRAGMENT) { if (sel->fs_write_all) key->ps.nr_cbufs = sctx->framebuffer.state.nr_cbufs; -- cgit v1.2.3