Mesa (master): i965/vec4: check opcode on vec4_instruction::reads_flag( channel)

Alejandro Pinheiro apinheiro at kemper.freedesktop.org
Fri Oct 23 16:11:49 UTC 2015


Module: Mesa
Branch: master
Commit: 2f1bc1da864f8d169427b911bf60e1023321e420
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2f1bc1da864f8d169427b911bf60e1023321e420

Author: Alejandro Piñeiro <apinheiro at igalia.com>
Date:   Fri Oct 23 15:32:30 2015 +0200

i965/vec4: check opcode on vec4_instruction::reads_flag(channel)

Commit f17b78 added an alternative reads_flag(channel) that returned
if the instruction was reading a specific channel flag. By mistake it
only took into account the predicate, but when the opcode is
VS_OPCODE_UNPACK_FLAGS_SIMD4X2 there isn't any predicate, but the flag
are used.

That mistake caused some regressions on old hw. More information on
this bug:
https://bugs.freedesktop.org/show_bug.cgi?id=92621

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_ir_vec4.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_ir_vec4.h b/src/mesa/drivers/dri/i965/brw_ir_vec4.h
index 74e9733..cc4104c 100644
--- a/src/mesa/drivers/dri/i965/brw_ir_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_ir_vec4.h
@@ -188,8 +188,8 @@ public:
 
    bool reads_flag(unsigned c)
    {
-      if (!reads_flag())
-         return false;
+      if (opcode == VS_OPCODE_UNPACK_FLAGS_SIMD4X2)
+         return true;
 
       switch (predicate) {
       case BRW_PREDICATE_NONE:




More information about the mesa-commit mailing list