[Mesa-dev] [PATCH 40/47] (0038) i965/fs: Fix unlit centroid workaround for SIMD32.
Shaofeng Tang
shaofeng.tang at intel.com
Mon May 21 03:30:14 UTC 2018
From: Francisco Jerez <currojerez at riseup.net>
Change-Id: I277b2eebbdd82a9ee9cebc523c2c0574d4cb1296
---
src/intel/compiler/brw_fs_visitor.cpp | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/src/intel/compiler/brw_fs_visitor.cpp b/src/intel/compiler/brw_fs_visitor.cpp
index c901cab..c3e9a4e 100644
--- a/src/intel/compiler/brw_fs_visitor.cpp
+++ b/src/intel/compiler/brw_fs_visitor.cpp
@@ -283,21 +283,15 @@ fs_visitor::emit_interpolation_setup_gen6()
*/
bld.emit(FS_OPCODE_MOV_DISPATCH_TO_FLAGS);
- set_predicate_inv(BRW_PREDICATE_NORMAL, true,
- bld.half(0).MOV(half(delta_xy[i], 0),
- half(pixel_delta_xy, 0)));
- set_predicate_inv(BRW_PREDICATE_NORMAL, true,
- bld.half(0).MOV(half(delta_xy[i], 1),
- half(pixel_delta_xy, 1)));
- if (dispatch_width == 16) {
- set_predicate_inv(BRW_PREDICATE_NORMAL, true,
- bld.half(1).MOV(half(delta_xy[i], 2),
- half(pixel_delta_xy, 2)));
- set_predicate_inv(BRW_PREDICATE_NORMAL, true,
- bld.half(1).MOV(half(delta_xy[i], 3),
- half(pixel_delta_xy, 3)));
+ for (unsigned q = 0; q < dispatch_width / 8; q++) {
+ for (unsigned c = 0; c < 2; c++) {
+ const unsigned idx = c + (q & 2) + (q & 1) * dispatch_width / 8;
+ set_predicate_inv(
+ BRW_PREDICATE_NORMAL, true,
+ bld.half(q).MOV(half(delta_xy[i], idx),
+ half(pixel_delta_xy, idx)));
+ }
}
- assert(dispatch_width != 32); /* not implemented yet */
}
}
}
--
2.7.4
More information about the mesa-dev
mailing list