diff options
author | Plamena Manolova <[email protected]> | 2018-05-25 22:49:47 +0100 |
---|---|---|
committer | Plamena Manolova <[email protected]> | 2018-06-07 14:53:12 +0100 |
commit | 3ba16d640e8ae1b3f34dcb1254f169fb1ccb1dba (patch) | |
tree | 24f1609cf8c8330340774291f535401d007722d8 /src/compiler/nir/nir.c | |
parent | 61edad216ea113b1bb9f97c696af1e4a40fbb9ac (diff) |
nir: Add global invocation id intrinsic.
Add the missing nir intrinsic for the gl_GlobalInvocationID
compute shader variable.
Signed-off-by: Plamena Manolova <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.c')
-rw-r--r-- | src/compiler/nir/nir.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index dc1c560319e..36a79f57ee5 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -2051,6 +2051,8 @@ nir_intrinsic_from_system_value(gl_system_value val) return nir_intrinsic_load_subgroup_id; case SYSTEM_VALUE_LOCAL_GROUP_SIZE: return nir_intrinsic_load_local_group_size; + case SYSTEM_VALUE_GLOBAL_INVOCATION_ID: + return nir_intrinsic_load_global_invocation_id; default: unreachable("system value does not directly correspond to intrinsic"); } @@ -2130,6 +2132,8 @@ nir_system_value_from_intrinsic(nir_intrinsic_op intrin) return SYSTEM_VALUE_SUBGROUP_ID; case nir_intrinsic_load_local_group_size: return SYSTEM_VALUE_LOCAL_GROUP_SIZE; + case nir_intrinsic_load_global_invocation_id: + return SYSTEM_VALUE_GLOBAL_INVOCATION_ID; default: unreachable("intrinsic doesn't produce a system value"); } |