nir/spirv: Add support for OpQuantize

This commit is contained in:
Jason Ekstrand 2016-01-12 15:36:38 -08:00
parent 282a837317
commit 610aa00cdf
2 changed files with 5 additions and 0 deletions

View 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:

View 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;