spirv: handle SpvOpUConvert in proper place.
authorDave Airlie <airlied@redhat.com>
Wed, 15 Feb 2017 08:25:52 +0000 (18:25 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 16 Feb 2017 04:11:59 +0000 (14:11 +1000)
This was falling into the quantizetof16 path.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/compiler/spirv/vtn_alu.c

index 55f7f2ea42f4104c240e0c92f071b51ee8eb7e9c..0738fe0cf991d4b5129a0a49f96dd660a28ff965 100644 (file)
@@ -286,8 +286,8 @@ vtn_nir_alu_op_for_spirv_opcode(SpvOp opcode, bool *swap,
 
    /* Conversions: */
    case SpvOpBitcast:               return nir_op_imov;
-   case SpvOpUConvert:
    case SpvOpQuantizeToF16:         return nir_op_fquantize2f16;
+   case SpvOpUConvert:
    case SpvOpConvertFToU:
    case SpvOpConvertFToS:
    case SpvOpConvertSToF: