From: Jason Ekstrand Date: Tue, 12 Jan 2016 23:36:38 +0000 (-0800) Subject: nir/spirv: Add support for OpQuantize X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=610aa00cdf54cf7c0bb31c54bc87580d66cd3d14;p=mesa.git nir/spirv: Add support for OpQuantize --- 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;