nir/spirv: Add support for OpQuantize
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 12 Jan 2016 23:36:38 +0000 (15:36 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 12 Jan 2016 23:36:38 +0000 (15:36 -0800)
src/glsl/nir/spirv/spirv_to_nir.c
src/glsl/nir/spirv/vtn_alu.c

index d5b9afefa7c76f9ca4abd3e35b02c81b8337c244..bbde4554c6bee994137f71279a809ecf2849a959 100644 (file)
@@ -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:
index f1bca439d87b55fb6a6205773237371589e8c882..03ed1f0caaa8000cf9aaf58904aa43d735402ce6 100644 (file)
@@ -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;