summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAntia Puentes <[email protected]>2015-06-17 00:49:42 +0200
committerJason Ekstrand <[email protected]>2015-08-03 09:40:49 -0700
commit84d4a9dc2ca3d98f19cc9125a5ff1ac1225f360d (patch)
tree1fc08097ee383c2b30fe9036dfbb5db7cc409e8f /src
parentb9c41affcf67f30d7f6c74c17ea34bc42756d56d (diff)
i965/nir/vec4: Implement non-vector comparison ops
Adds NIR ALU operations: * nir_op_flt * nir_op_ilt * nir_op_ult * nir_op_fge * nir_op_ige * nir_op_uge * nir_op_feq * nir_op_ieq * nir_op_fne * nir_op_ine Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_nir.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
index 77df2842e6e..34a9f4fc46d 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -908,6 +908,20 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
case nir_op_fddy_fine:
unreachable("derivatives are not valid in vertex shaders");
+ case nir_op_flt:
+ case nir_op_ilt:
+ case nir_op_ult:
+ case nir_op_fge:
+ case nir_op_ige:
+ case nir_op_uge:
+ case nir_op_feq:
+ case nir_op_ieq:
+ case nir_op_fne:
+ case nir_op_ine:
+ emit(CMP(dst, op[0], op[1],
+ brw_conditional_for_nir_comparison(instr->op)));
+ break;
+
default:
unreachable("Unimplemented ALU operation");
}