From: Kristian Høgsberg Kristensen Date: Wed, 30 Dec 2015 07:59:38 +0000 (-0800) Subject: nir/spirv: Lower gl_GlobalInvocationID correctly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=91d93f79083596d761a245643647c4c0066556b3;p=mesa.git 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. --- 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)),