diff options
author | Michel Dänzer <[email protected]> | 2014-01-09 18:18:26 +0900 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2014-01-29 11:07:48 +0900 |
commit | 7b19c391f478769bf5111faef3d2aee66c2cfab0 (patch) | |
tree | 4cfbc21cc4722b4c93a8972a45b7f0ebb8c43caf /src/gallium/drivers/radeonsi/si_state.c | |
parent | 8afde9fa23db6ac1802f7a2c74123f10db96f552 (diff) |
radeonsi: Also export clip distances with geometry shader
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index ceeba26c48a..d089fdd230a 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2171,6 +2171,14 @@ static INLINE void si_shader_selector_key(struct pipe_context *ctx, struct si_context *sctx = (struct si_context *)ctx; memset(key, 0, sizeof(*key)); + if ((sel->type == PIPE_SHADER_VERTEX || sel->type == PIPE_SHADER_GEOMETRY) && + sctx->queued.named.rasterizer) { + if (sctx->queued.named.rasterizer->clip_plane_enable & 0xf0) + key->vs.ucps_enabled |= 0x2; + if (sctx->queued.named.rasterizer->clip_plane_enable & 0xf) + key->vs.ucps_enabled |= 0x1; + } + if (sel->type == PIPE_SHADER_VERTEX) { unsigned i; if (!sctx->vertex_elements) @@ -2179,11 +2187,6 @@ 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; - if (sctx->queued.named.rasterizer->clip_plane_enable & 0xf0) - key->vs.ucps_enabled |= 0x2; - if (sctx->queued.named.rasterizer->clip_plane_enable & 0xf) - key->vs.ucps_enabled |= 0x1; - key->vs.as_es = sctx->gs_shader != NULL; } else if (sel->type == PIPE_SHADER_FRAGMENT) { if (sel->fs_write_all) |