glsl: add NV_viewport_array2 support
This enables gl_Layer/gl_ViewportIndex when the ext is enabled, as well
as adding the new gl_ViewportMask[] array and viewport_relative layout
qualifier for gl_Layer.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4529>
diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
index 13da17f..2e22614 100644
--- a/src/compiler/shader_info.h
+++ b/src/compiler/shader_info.h
@@ -191,6 +191,9 @@
/* Whether the shader writes memory, including transform feedback. */
bool writes_memory:1;
+ /* Whether gl_Layer is viewport-relative */
+ bool layer_viewport_relative:1;
+
union {
struct {
/* Which inputs are doubles */