nir/spirv: Add support for msb/lsb opcodes
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 5 Jan 2016 01:16:44 +0000 (17:16 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 5 Jan 2016 01:37:10 +0000 (17:37 -0800)
src/glsl/nir/spirv/vtn_glsl450.c

index 2d22e37de2a0a723eb5a13c1a346df9a1b9bfc11..fd8ec3eb2dc9119b4ea90dda1ae6c87e2b92f454 100644 (file)
@@ -270,6 +270,10 @@ handle_glsl450_alu(struct vtn_builder *b, enum GLSLstd450 entrypoint,
       return;
    }
 
+   case GLSLstd450FindILsb:   op = nir_op_find_lsb;   break;
+   case GLSLstd450FindSMsb:   op = nir_op_ifind_msb;  break;
+   case GLSLstd450FindUMsb:   op = nir_op_ufind_msb;  break;
+
    case GLSLstd450Asin:
    case GLSLstd450Acos:
    case GLSLstd450Atan:
@@ -277,9 +281,6 @@ handle_glsl450_alu(struct vtn_builder *b, enum GLSLstd450 entrypoint,
    case GLSLstd450ModfStruct:
    case GLSLstd450Frexp:
    case GLSLstd450FrexpStruct:
-   case GLSLstd450FindILsb:
-   case GLSLstd450FindSMsb:
-   case GLSLstd450FindUMsb:
    case GLSLstd450PackDouble2x32:
    case GLSLstd450UnpackDouble2x32:
    case GLSLstd450IMix: