summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-03-21 15:22:10 -0700
committerJason Ekstrand <[email protected]>2017-05-03 11:25:46 -0700
commitbb41d9a1d30c243b8690165cd465c53517c6a35d (patch)
tree0eb82dba200451d632bdd273b76f97b115c5f8d4 /src/compiler/nir/nir.c
parentfcf941068e67ca0483dc453dd27992e2cd27ea21 (diff)
compiler: Add a system value and varying for ViewIndex
Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.c')
-rw-r--r--src/compiler/nir/nir.c4
1 files changed, 4 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");
}