diff options
author | Michel Dänzer <[email protected]> | 2013-08-08 16:58:00 +0200 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2013-08-15 17:53:50 +0200 |
commit | 2f98dc223f625f6df79268848c46af7f224fe7e9 (patch) | |
tree | cfe1f25e942fae49c89487784b78d8fd34ad9395 /src/gallium/drivers/radeonsi/si_state.c | |
parent | b00269aa5887b88d2e037d6bfa374779902f8743 (diff) |
radeonsi: Don't export unused clip distance vectors from vertex shader
E.g. the Source engine seems to always write to gl_ClipVertex, but normally
doesn't enable any GL_CLIP_DISTANCEn states. This change removes some
irrelevant parts from the generated vertex shader code in such cases.
Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 1dd51a8f93e..d1e3c9d5279 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2040,6 +2040,10 @@ static INLINE void si_shader_selector_key(struct pipe_context *ctx, for (i = 0; i < rctx->vertex_elements->count; ++i) key->vs.instance_divisors[i] = rctx->vertex_elements->elements[i].instance_divisor; + if (rctx->queued.named.rasterizer->clip_plane_enable & 0xf0) + key->vs.ucps_enabled |= 0x2; + if (rctx->queued.named.rasterizer->clip_plane_enable & 0xf) + key->vs.ucps_enabled |= 0x1; } else if (sel->type == PIPE_SHADER_FRAGMENT) { if (sel->fs_write_all) key->ps.nr_cbufs = rctx->framebuffer.nr_cbufs; |