summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-11-13 18:12:36 +0100
committerMarek Olšák <[email protected]>2016-11-21 21:44:35 +0100
commitd4e9f409e93391fb56b12e6933123198df7ac4bc (patch)
tree698bf9cfebfcec2f8caa381e241fe998af1d890d /src/gallium
parent9d8db805ef6d10bc3b7c6a91963c86ab3874ebf8 (diff)
radeonsi: fix culling if clip & cull distances are used at the same time
Fixed piglits: - arb_cull_distance/clip-cull-3 - arb_cull_distance/clip-cull-4 Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 3ca3553e733..4a41aa8085e 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -651,7 +651,8 @@ static void si_emit_clip_regs(struct si_context *sctx, struct r600_atom *atom)
unsigned clipdist_mask =
info->writes_clipvertex ? SIX_BITS : info->clipdist_writemask;
unsigned ucp_mask = clipdist_mask ? 0 : rs->clip_plane_enable & SIX_BITS;
- unsigned total_mask = clipdist_mask | (info->culldist_writemask << info->num_written_clipdistance);
+ unsigned culldist_mask = info->culldist_writemask << info->num_written_clipdistance;
+ unsigned total_mask = clipdist_mask | culldist_mask;
radeon_set_context_reg(cs, R_02881C_PA_CL_VS_OUT_CNTL,
S_02881C_USE_VTX_POINT_SIZE(info->writes_psize) |
@@ -666,7 +667,7 @@ static void si_emit_clip_regs(struct si_context *sctx, struct r600_atom *atom)
info->writes_viewport_index) |
S_02881C_VS_OUT_MISC_SIDE_BUS_ENA(1) |
(rs->clip_plane_enable &
- clipdist_mask) | (info->culldist_writemask << 8));
+ clipdist_mask) | (culldist_mask << 8));
radeon_set_context_reg(cs, R_028810_PA_CL_CLIP_CNTL,
rs->pa_cl_clip_cntl |
ucp_mask |