nir/spirv: Fix handling of OpGroupMemberDecorate
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 10 Feb 2016 23:35:34 +0000 (15:35 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 10 Feb 2016 23:36:42 +0000 (15:36 -0800)
We were pulling the member index from the wrong dword

src/compiler/nir/spirv/spirv_to_nir.c

index 544251f5a1f88a21e236314b30a0e6c065044bc0..6848c0207c85616e147088f3995892cc73972cc6 100644 (file)
@@ -363,7 +363,7 @@ vtn_handle_decoration(struct vtn_builder *b, SpvOp opcode,
          if (opcode == SpvOpGroupDecorate) {
             dec->scope = VTN_DEC_DECORATION;
          } else {
-            dec->scope = VTN_DEC_STRUCT_MEMBER0 + *(w++);
+            dec->scope = VTN_DEC_STRUCT_MEMBER0 + *(++w);
          }
 
          /* Link into the list */