The vec4 backend, at the end, does this:
if (inst->is_3src()) {
for (int i = 0; i < 3; i++) {
if (inst->src[i].vstride == BRW_VERTICAL_STRIDE_0)
assert(brw_is_single_value_swizzle(inst->src[i].swizzle));
So make sure that we use the same conditions when trying to
copy-propagate. UNIFORMs will be converted to vstride 0 in
convert_to_hw_regs, but so will ATTRs when interleaved (as will happen
in a GS with multiple attributes). Since the vstride may not be properly
set at copy-prop time, just reject all ATTRs with complex swizzles as
well.
Fixes assertion errors in dolphin-generated geometry shaders (or
misrendering on opt builds).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93418
Signed-off-by: Ilia Mirkin <[email protected]>
Cc: "11.0 11.1" <[email protected]>
---
Wasn't sure if it was worth the effort of still allowing ATTR when it was not
going to get interleaved (which is, admittedly, the vast majority of the time).
But it's just for 3-src instructions...
src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
index c6f0b0d..b7435c3 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
@@ -320,7 +320,7 @@ try_copy_propagate(const struct brw_device_info *devinfo,
unsigned composed_swizzle = brw_compose_swizzle(inst->src[arg].swizzle,
value.swizzle);
if (inst->is_3src() &&
- value.file == UNIFORM &&
+ (value.file == UNIFORM || value.file == ATTR) &&
!brw_is_single_value_swizzle(composed_swizzle))
return false;
--
2.4.10
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev