aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2020-06-07 09:52:08 +1000
committerMarge Bot <[email protected]>2020-06-10 22:52:41 +0000
commit37bef78c791e099ebda34f20f2088f77bd60ac1c (patch)
treea4c40d9ee779e8820074fc444080c46fa002f9e4 /src/gallium/drivers/nouveau
parentda390389d094d82e405003fdacaf9ee9cc8e74fe (diff)
nvir/nir: implement nir_op_extract_i8
v2: - use getSSA() instead of getScratch() v3: - fix whitespace Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5377>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
index f4654dcb541..229f5666d29 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
@@ -2818,6 +2818,14 @@ Converter::visit(nir_alu_instr *insn)
mkOp3(OP_PERMT, TYPE_U32, newDefs[0], getSrc(&insn->src[0]), prmt, loadImm(NULL, 0));
break;
}
+ case nir_op_extract_i8: {
+ DEFAULT_CHECKS;
+ LValues &newDefs = convert(&insn->dest);
+ Value *prmt = getSSA();
+ mkOp3(OP_MAD, TYPE_U32, prmt, getSrc(&insn->src[1]), loadImm(NULL, 0x1111), loadImm(NULL, 0x8880));
+ mkOp3(OP_PERMT, TYPE_U32, newDefs[0], getSrc(&insn->src[0]), prmt, loadImm(NULL, 0));
+ break;
+ }
// boolean conversions
case nir_op_b2f32: {
DEFAULT_CHECKS;