aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2019-12-03 13:42:03 +1000
committerDave Airlie <[email protected]>2019-12-12 09:16:33 +1000
commit63b3d38a505d18e3aa1bea3ed4e8b994273b557e (patch)
treec1c79bc3f93f42f5d3edf43e53b6d473a4fa4676 /src/gallium
parentbf2904010341e31d0d66954fcbd88da4da4e1cdd (diff)
gallivm: fix perspective enable if usage_mask doesn't have 0 bit set
The current code looks like a typo, and fails if the usage_mask is for a y/z enabled input. Fixes piglit ext_transform_feedback-immediate-reuse-index-buffer with llvmpipe/nir Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_point.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_point.c b/src/gallium/drivers/llvmpipe/lp_setup_point.c
index 073ca5b1c88..092febdba92 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_point.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_point.c
@@ -224,10 +224,10 @@ setup_point_coefficients( struct lp_setup_context *setup,
boolean perspective = !!(interp == LP_INTERP_PERSPECTIVE);
unsigned i;
- if (perspective & usage_mask) {
+ if (perspective && usage_mask) {
fragcoord_usage_mask |= TGSI_WRITEMASK_W;
}
-
+
switch (interp) {
case LP_INTERP_POSITION:
/*