[Mesa-dev] [PATCH 3/7] nir: Add gl_LocalInvocationID variable
Jordan Justen
jordan.l.justen at intel.com
Mon Aug 3 23:00:07 PDT 2015
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
src/glsl/nir/nir_intrinsics.h | 1 +
src/glsl/nir/nir_lower_system_values.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/src/glsl/nir/nir_intrinsics.h b/src/glsl/nir/nir_intrinsics.h
index bc6e6b8..29b5e64 100644
--- a/src/glsl/nir/nir_intrinsics.h
+++ b/src/glsl/nir/nir_intrinsics.h
@@ -137,6 +137,7 @@ SYSTEM_VALUE(sample_id, 1)
SYSTEM_VALUE(sample_pos, 2)
SYSTEM_VALUE(sample_mask_in, 1)
SYSTEM_VALUE(invocation_id, 1)
+SYSTEM_VALUE(local_invocation_id, 3)
/*
* The first and only index is the base address to load from. Indirect
diff --git a/src/glsl/nir/nir_lower_system_values.c b/src/glsl/nir/nir_lower_system_values.c
index a6eec65..ee375ea 100644
--- a/src/glsl/nir/nir_lower_system_values.c
+++ b/src/glsl/nir/nir_lower_system_values.c
@@ -70,6 +70,9 @@ convert_instr(nir_intrinsic_instr *instr)
case SYSTEM_VALUE_INVOCATION_ID:
op = nir_intrinsic_load_invocation_id;
break;
+ case SYSTEM_VALUE_LOCAL_INVOCATION_ID:
+ op = nir_intrinsic_load_local_invocation_id;
+ break;
default:
unreachable("not reached");
}
--
2.1.4
More information about the mesa-dev
mailing list