From 91d93f79083596d761a245643647c4c0066556b3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg=20Kristensen?= Date: Tue, 29 Dec 2015 23:59:38 -0800 Subject: [PATCH] nir/spirv: Lower gl_GlobalInvocationID correctly 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/nir/nir_lower_system_values.c b/src/glsl/nir/nir_lower_system_values.c index 33586e6b46e..f642c38561a 100644 --- a/src/glsl/nir/nir_lower_system_values.c +++ b/src/glsl/nir/nir_lower_system_values.c @@ -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)), -- 2.30.2