nir/spirv: Lower gl_GlobalInvocationID correctly
authorKristian Høgsberg Kristensen <krh@owl.jf.intel.com>
Wed, 30 Dec 2015 07:59:38 +0000 (23:59 -0800)
committerKristian Høgsberg Kristensen <krh@owl.jf.intel.com>
Wed, 30 Dec 2015 08:03:54 +0000 (00:03 -0800)
Use nir_intrinsic_load_local_invocation_id, not
nir_intrinsic_load_invocation_id (missing 'local'), which is a geometry
shader built-in.

src/glsl/nir/nir_lower_system_values.c

index 33586e6b46e227be14a3d60a70a5d3b00cb8b82f..f642c38561a77ddea75a803c2745f5fa17378c80 100644 (file)
@@ -72,7 +72,7 @@ convert_block(nir_block *block, void *void_state)
          nir_ssa_def *group_id =
             nir_load_system_value(b, nir_intrinsic_load_work_group_id, 0);
          nir_ssa_def *local_id =
-            nir_load_system_value(b, nir_intrinsic_load_invocation_id, 0);
+            nir_load_system_value(b, nir_intrinsic_load_local_invocation_id, 0);
 
          sysval = nir_iadd(b, nir_imul(b, group_id,
                                           nir_build_imm(b, 3, local_size)),