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 <sroland@vmware.com>
This commit is contained in:
Dave Airlie
2019-12-03 13:42:03 +10:00
parent bf29040103
commit 63b3d38a50
@@ -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:
/*