i965: Assert that math instructions don't have conditional mod.
authorMatt Turner <mattst88@gmail.com>
Fri, 21 Nov 2014 20:34:22 +0000 (12:34 -0800)
committerMatt Turner <mattst88@gmail.com>
Mon, 24 Nov 2014 22:06:39 +0000 (14:06 -0800)
The math function field is at the same location as conditional mod.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_generator.cpp
src/mesa/drivers/dri/i965/brw_vec4_generator.cpp

index ab5d22317eda1330fd19282c281cccadccde1193..4af9cbe83cbc3ae1236d7636002842d5e6b8345c 100644 (file)
@@ -1817,6 +1817,7 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
       case SHADER_OPCODE_SIN:
       case SHADER_OPCODE_COS:
          assert(brw->gen < 6 || inst->mlen == 0);
+         assert(inst->conditional_mod == BRW_CONDITIONAL_NONE);
         if (brw->gen >= 7) {
             gen6_math(p, dst, brw_math_function(inst->opcode), src[0],
                       brw_null_reg());
@@ -1832,6 +1833,7 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
       case SHADER_OPCODE_INT_REMAINDER:
       case SHADER_OPCODE_POW:
          assert(brw->gen < 6 || inst->mlen == 0);
+         assert(inst->conditional_mod == BRW_CONDITIONAL_NONE);
         if (brw->gen >= 7 && inst->opcode == SHADER_OPCODE_POW) {
             gen6_math(p, dst, brw_math_function(inst->opcode), src[0], src[1]);
         } else if (brw->gen >= 6) {
index 0776a91745619240c436c2ea4cbc9c0e26c9b3d8..d027fda85de39e407c9ba33c1c97d1e290a5e6a2 100644 (file)
@@ -1361,6 +1361,7 @@ vec4_generator::generate_code(const cfg_t *cfg)
       case SHADER_OPCODE_LOG2:
       case SHADER_OPCODE_SIN:
       case SHADER_OPCODE_COS:
+         assert(inst->conditional_mod == BRW_CONDITIONAL_NONE);
          if (brw->gen >= 7) {
             gen6_math(p, dst, brw_math_function(inst->opcode), src[0],
                       brw_null_reg());
@@ -1374,6 +1375,7 @@ vec4_generator::generate_code(const cfg_t *cfg)
       case SHADER_OPCODE_POW:
       case SHADER_OPCODE_INT_QUOTIENT:
       case SHADER_OPCODE_INT_REMAINDER:
+         assert(inst->conditional_mod == BRW_CONDITIONAL_NONE);
          if (brw->gen >= 7) {
             gen6_math(p, dst, brw_math_function(inst->opcode), src[0], src[1]);
          } else if (brw->gen == 6) {