aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_state.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-09-17 22:17:02 +0200
committerMarek Olšák <[email protected]>2014-09-24 14:48:02 +0200
commite29353ff20a2761a5a1caeaed78398557797207c (patch)
tree27c76f3fedc936269ae82bb92cdb84a00354018f /src/gallium/drivers/radeonsi/si_state.c
parent2774abd4cec70d95cb73f83c2c150e9f5171c50d (diff)
radeonsi: don't snoop currently-bound GS shader when compiling ES
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c6
1 files changed, 5 insertions, 1 deletions
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;