nir/spirv/glsl450: Implement FrexpStruct
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 20 Jan 2016 19:36:41 +0000 (11:36 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 20 Jan 2016 19:36:41 +0000 (11:36 -0800)
src/glsl/nir/spirv/vtn_glsl450.c

index d38e1c73d9df06106e5f833683108e282a811a29..eb81620ea11d6704050da8a7fd07469f753b48dc 100644 (file)
@@ -612,8 +612,14 @@ handle_glsl450_alu(struct vtn_builder *b, enum GLSLstd450 entrypoint,
       return;
    }
 
+   case GLSLstd450FrexpStruct: {
+      assert(glsl_type_is_struct(val->ssa->type));
+      val->ssa->elems[0]->def = build_frexp(nb, src[0],
+                                            &val->ssa->elems[1]->def);
+      return;
+   }
+
    case GLSLstd450ModfStruct:
-   case GLSLstd450FrexpStruct:
    case GLSLstd450PackDouble2x32:
    case GLSLstd450UnpackDouble2x32:
    case GLSLstd450IMix: