diff options
author | Rob Clark <[email protected]> | 2015-10-09 16:27:45 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-10-16 19:33:37 -0400 |
commit | 33de998230414bf5603927424ffca85792b176d1 (patch) | |
tree | a65d0db1ec153baf6e3420bf59c47ef43a6259f6 /src/glsl/nir/shader_enums.h | |
parent | 698cdbf49207c30bc2ac38e2f16e531dd3a54db3 (diff) |
glsl: couple shader_enums cleanups
Add missing enum to gl_system_value_name() and move VARYING_SLOT_MAX /
FRAG_RESULT_MAX / etc into shader_enums.h as suggested by Emil.
v2: add STATIC_ASSERT()'s
Reported-by: Emil Velikov <[email protected]>
Acked-by: Emil Velikov <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/glsl/nir/shader_enums.h')
-rw-r--r-- | src/glsl/nir/shader_enums.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glsl/nir/shader_enums.h b/src/glsl/nir/shader_enums.h index 2a5d2c5bfa7..77638ba4e34 100644 --- a/src/glsl/nir/shader_enums.h +++ b/src/glsl/nir/shader_enums.h @@ -233,6 +233,11 @@ typedef enum VARYING_SLOT_VAR31, } gl_varying_slot; + +#define VARYING_SLOT_MAX (VARYING_SLOT_VAR0 + MAX_VARYING) +#define VARYING_SLOT_PATCH0 (VARYING_SLOT_MAX) +#define VARYING_SLOT_TESS_MAX (VARYING_SLOT_PATCH0 + MAX_VARYING) + const char * gl_varying_slot_name(gl_varying_slot slot); /** @@ -473,4 +478,6 @@ typedef enum const char * gl_frag_result_name(gl_frag_result result); +#define FRAG_RESULT_MAX (FRAG_RESULT_DATA0 + MAX_DRAW_BUFFERS) + #endif /* SHADER_ENUMS_H */ |