[Mesa-dev] [PATCH 93/95] i965/vec4/scalarize_df: Always scalarize XY / ZW writemasks
Iago Toral Quiroga
itoral at igalia.com
Tue Jul 19 10:41:30 UTC 2016
Now that we are letting some instructions through without being
fully scalarized we have to make sure that we do scalarize any
that have XY / ZW writemasks, since this don't have native support.
---
src/mesa/drivers/dri/i965/brw_vec4.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index d0de464..6a814a3 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -2209,6 +2209,15 @@ vec4_visitor::scalarize_df()
if (!is_double)
continue;
+ bool skip_lowering = true;
+
+ /* XY and ZW writemasks operate in 32-bit, which means that they don't
+ * have a native 64-bit representation and they should always be split.
+ */
+ if (inst->dst.writemask == WRITEMASK_XY ||
+ inst->dst.writemask == WRITEMASK_ZW)
+ skip_lowering = false;
+
/* Don't scalarize instruccions that only use identity swizzles on
* non-uniform registers (vstride != 0). Identity swizzles don't require
* any special handling and just work as intended. The only exception
@@ -2231,7 +2240,6 @@ vec4_visitor::scalarize_df()
* For more details see:
* https://bugs.freedesktop.org/show_bug.cgi?id=92760#c82
*/
- bool skip_lowering = true;
for (unsigned i = 0; i < 3; i++) {
if (inst->src[i].file == BAD_FILE)
continue;
--
2.7.4
More information about the mesa-dev
mailing list