OSDN Git Service

nir/spirv: Handle the LOD parameter of OpImageQuerySizeLod
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 1 Feb 2016 21:52:47 +0000 (13:52 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 1 Feb 2016 22:03:05 +0000 (14:03 -0800)
src/glsl/nir/spirv/spirv_to_nir.c

index ed6ad6d..c002457 100644 (file)
@@ -1237,6 +1237,10 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
       break;
    }
 
+   /* For OpImageQuerySizeLod, we always have an LOD */
+   if (opcode == SpvOpImageQuerySizeLod)
+      (*p++) = vtn_tex_src(b, w[idx++], nir_tex_src_lod);
+
    /* Figure out the base texture operation */
    nir_texop texop;
    switch (opcode) {