[Mesa-dev] [PATCH] i965/vs: Fix implied_mrf_writes() for integer division.

Eric Anholt eric at anholt.net
Tue May 28 16:12:52 PDT 2013


Previously it would assertion fail in debug builds (though the correct
value was returned in a non-debug build).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64727
---
 src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index c5aa338..4295e6e 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -247,6 +247,8 @@ vec4_visitor::implied_mrf_writes(vec4_instruction *inst)
    case SHADER_OPCODE_SIN:
    case SHADER_OPCODE_COS:
       return 1;
+   case SHADER_OPCODE_INT_QUOTIENT:
+   case SHADER_OPCODE_INT_REMAINDER:
    case SHADER_OPCODE_POW:
       return 2;
    case VS_OPCODE_URB_WRITE:
-- 
1.8.3.rc0



More information about the mesa-dev mailing list