diff options
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir.c | 4 | ||||
-rw-r--r-- | src/compiler/nir/nir_intrinsics.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 0abf9b6212e..8f7ed8a50f6 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -1905,6 +1905,8 @@ nir_intrinsic_from_system_value(gl_system_value val) return nir_intrinsic_load_patch_vertices_in; case SYSTEM_VALUE_HELPER_INVOCATION: return nir_intrinsic_load_helper_invocation; + case SYSTEM_VALUE_VIEW_INDEX: + return nir_intrinsic_load_view_index; default: unreachable("system value does not directly correspond to intrinsic"); } @@ -1956,6 +1958,8 @@ nir_system_value_from_intrinsic(nir_intrinsic_op intrin) return SYSTEM_VALUE_VERTICES_IN; case nir_intrinsic_load_helper_invocation: return SYSTEM_VALUE_HELPER_INVOCATION; + case nir_intrinsic_load_view_index: + return SYSTEM_VALUE_VIEW_INDEX; default: unreachable("intrinsic doesn't produce a system value"); } diff --git a/src/compiler/nir/nir_intrinsics.h b/src/compiler/nir/nir_intrinsics.h index 3a519a73ddd..21e7d904b78 100644 --- a/src/compiler/nir/nir_intrinsics.h +++ b/src/compiler/nir/nir_intrinsics.h @@ -329,6 +329,7 @@ SYSTEM_VALUE(helper_invocation, 1, 0, xx, xx, xx) SYSTEM_VALUE(channel_num, 1, 0, xx, xx, xx) SYSTEM_VALUE(alpha_ref_float, 1, 0, xx, xx, xx) SYSTEM_VALUE(layer_id, 1, 0, xx, xx, xx) +SYSTEM_VALUE(view_index, 1, 0, xx, xx, xx) /* Blend constant color values. Float values are clamped. */ SYSTEM_VALUE(blend_const_color_r_float, 1, 0, xx, xx, xx) |