From 4c6ddd3397f9ec363342831eab710003996e77a8 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Sat, 22 Aug 2015 18:51:08 -0700 Subject: nir: Convert SYSTEM_VALUE_NUM_WORK_GROUPS to a nir intrinsic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jordan Justen Reviewed-by: Kristian Høgsberg --- src/glsl/nir/nir.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/glsl/nir/nir.c') diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c index 1206bb4dfcb..57fd959c931 100644 --- a/src/glsl/nir/nir.c +++ b/src/glsl/nir/nir.c @@ -1487,6 +1487,8 @@ nir_intrinsic_from_system_value(gl_system_value val) return nir_intrinsic_load_local_invocation_id; case SYSTEM_VALUE_WORK_GROUP_ID: return nir_intrinsic_load_work_group_id; + case SYSTEM_VALUE_NUM_WORK_GROUPS: + return nir_intrinsic_load_num_work_groups; /* FINISHME: Add tessellation intrinsics. case SYSTEM_VALUE_TESS_COORD: case SYSTEM_VALUE_VERTICES_IN: @@ -1523,6 +1525,8 @@ nir_system_value_from_intrinsic(nir_intrinsic_op intrin) return SYSTEM_VALUE_SAMPLE_MASK_IN; case nir_intrinsic_load_local_invocation_id: return SYSTEM_VALUE_LOCAL_INVOCATION_ID; + case nir_intrinsic_load_num_work_groups: + return SYSTEM_VALUE_NUM_WORK_GROUPS; case nir_intrinsic_load_work_group_id: return SYSTEM_VALUE_WORK_GROUP_ID; /* FINISHME: Add tessellation intrinsics. -- cgit v1.2.3