aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorAntia Puentes <[email protected]>2015-06-17 09:49:31 +0200
committerJason Ekstrand <[email protected]>2015-08-03 09:40:49 -0700
commitd12e165dbb403c3cf86ab7f1b8f28ab6188b479f (patch)
treeef2a9ab6c44c5c6a87345e469b17f4f3e83681f7 /src/mesa/drivers/dri
parent798cb33a256f703ecaf56d4443e12055484d4bcc (diff)
i965/nir/vec4: Implement "shift" operations
Adds NIR ALU operations: * nir_op_ishl * nir_op_ishr * nir_op_ushr Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_nir.cpp12
1 files changed, 12 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 560797068fb..b332fd315fb 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -1181,6 +1181,18 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
inst->predicate = BRW_PREDICATE_NORMAL;
break;
+ case nir_op_ishl:
+ emit(SHL(dst, op[0], op[1]));
+ break;
+
+ case nir_op_ishr:
+ emit(ASR(dst, op[0], op[1]));
+ break;
+
+ case nir_op_ushr:
+ emit(SHR(dst, op[0], op[1]));
+ break;
+
default:
unreachable("Unimplemented ALU operation");
}