summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-01-13 15:09:45 -0800
committerJason Ekstrand <[email protected]>2016-01-13 16:53:02 -0800
commit4507d8a57af7df679fc0e7b56f4441519ff7e3d4 (patch)
tree812f3868c54f58f13df0fde956afbeecfa2077c7 /src
parent7d5ae2d34babbb5302bdfc6658499156a125c008 (diff)
nir/spirv/alu: Properly implement mod/rem
Diffstat (limited to 'src')
-rw-r--r--src/glsl/nir/spirv/vtn_alu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/nir/spirv/vtn_alu.c b/src/glsl/nir/spirv/vtn_alu.c
index 4c45e234998..d866da7445e 100644
--- a/src/glsl/nir/spirv/vtn_alu.c
+++ b/src/glsl/nir/spirv/vtn_alu.c
@@ -232,8 +232,10 @@ vtn_nir_alu_op_for_spirv_opcode(SpvOp opcode, bool *swap)
case SpvOpSDiv: return nir_op_idiv;
case SpvOpFDiv: return nir_op_fdiv;
case SpvOpUMod: return nir_op_umod;
- case SpvOpSMod: return nir_op_umod; /* FIXME? */
+ case SpvOpSMod: return nir_op_imod;
case SpvOpFMod: return nir_op_fmod;
+ case SpvOpSRem: return nir_op_irem;
+ case SpvOpFRem: return nir_op_frem;
case SpvOpShiftRightLogical: return nir_op_ushr;
case SpvOpShiftRightArithmetic: return nir_op_ishr;
@@ -298,8 +300,6 @@ vtn_nir_alu_op_for_spirv_opcode(SpvOp opcode, bool *swap)
case SpvOpDPdxCoarse: return nir_op_fddx_coarse;
case SpvOpDPdyCoarse: return nir_op_fddy_coarse;
- case SpvOpSRem:
- case SpvOpFRem:
default:
unreachable("No NIR equivalent");
}