diff options
author | Fabian Bieler <[email protected]> | 2014-03-10 17:55:36 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-07-23 00:59:27 +0200 |
commit | 73a9a1539a85ae8fe22e11b4064105d588597736 (patch) | |
tree | 74aa1f405af4f0163138272519f8666a63e01144 /src/glsl/link_varyings.h | |
parent | 54f29502972cdd33302e69e029c8d07fb31b7bdf (diff) |
glsl: lower gl_TessLevel* from float[n] to vecn.
Similar to gl_ClipDistance -> gl_ClipDistanceMESA
v2: - renamed is_mesa_var to lowered_builtin_array_variable
- moved LowerTessLevel into gl_constants
- cosmetic changes in lower_tess_level.cpp
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/link_varyings.h')
-rw-r--r-- | src/glsl/link_varyings.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/glsl/link_varyings.h b/src/glsl/link_varyings.h index afc16a8baa7..c0ad53bf1da 100644 --- a/src/glsl/link_varyings.h +++ b/src/glsl/link_varyings.h @@ -128,7 +128,7 @@ public: */ unsigned num_components() const { - if (this->is_clip_distance_mesa) + if (this->lowered_builtin_array_variable) return this->size; else return this->vector_elements * this->matrix_columns * this->size; @@ -161,10 +161,15 @@ private: unsigned array_subscript; /** - * True if the variable is gl_ClipDistance and the driver lowers - * gl_ClipDistance to gl_ClipDistanceMESA. + * Non-zero if the variable is gl_ClipDistance, glTessLevelOuter or + * gl_TessLevelInner and the driver lowers it to gl_*MESA. */ - bool is_clip_distance_mesa; + enum { + none, + clip_distance, + tess_level_outer, + tess_level_inner, + } lowered_builtin_array_variable; /** * The vertex shader output location that the linker assigned for this |