From 610aa00cdf54cf7c0bb31c54bc87580d66cd3d14 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 12 Jan 2016 15:36:38 -0800 Subject: [PATCH] nir/spirv: Add support for OpQuantize --- src/glsl/nir/spirv/spirv_to_nir.c | 1 + src/glsl/nir/spirv/vtn_alu.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/glsl/nir/spirv/spirv_to_nir.c b/src/glsl/nir/spirv/spirv_to_nir.c index d5b9afefa7c..bbde4554c6b 100644 --- a/src/glsl/nir/spirv/spirv_to_nir.c +++ b/src/glsl/nir/spirv/spirv_to_nir.c @@ -3370,6 +3370,7 @@ vtn_handle_body_instruction(struct vtn_builder *b, SpvOp opcode, case SpvOpUConvert: case SpvOpSConvert: case SpvOpFConvert: + case SpvOpQuantizeToF16: case SpvOpConvertPtrToU: case SpvOpConvertUToPtr: case SpvOpPtrCastToGeneric: diff --git a/src/glsl/nir/spirv/vtn_alu.c b/src/glsl/nir/spirv/vtn_alu.c index f1bca439d87..03ed1f0caaa 100644 --- a/src/glsl/nir/spirv/vtn_alu.c +++ b/src/glsl/nir/spirv/vtn_alu.c @@ -387,6 +387,10 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode, op = nir_op_fmov; break; + case SpvOpQuantizeToF16: + op = nir_op_fquantize2f16; + break; + /* Derivatives: */ case SpvOpDPdx: op = nir_op_fddx; break; case SpvOpDPdy: op = nir_op_fddy; break; -- 2.30.2