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>
This commit is contained in:
Ilia Mirkin
2020-04-10 16:02:09 -04:00
parent 54424a3d13
commit cc6661bfc8
9 changed files with 150 additions and 3 deletions

View File

@@ -191,6 +191,9 @@ typedef struct shader_info {
/* 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 */