diff options
author | Samuel Pitoiset <[email protected]> | 2017-04-26 13:49:13 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-04-27 22:52:21 +0200 |
commit | 75a31a20af269c047661af33e28f793269537b79 (patch) | |
tree | 2bd78e1c3e7f0b2f649106eb0e6f62c909c3fc9d /src/compiler | |
parent | b295a528362239e4500c89e94e0af0cc78b896c1 (diff) |
glsl: set vector_elements to 1 for samplers
I don't see any reasons why vector_elements is 1 for images and
0 for samplers. This increases consistency and allows to clean
up some code a bit.
This will also help for ARB_bindless_texture.
No piglit regressions with RadeonSI.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl_types.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp index 0480bef80ec..bf078ad6141 100644 --- a/src/compiler/glsl_types.cpp +++ b/src/compiler/glsl_types.cpp @@ -95,12 +95,7 @@ glsl_type::glsl_type(GLenum gl_type, glsl_base_type base_type, memset(& fields, 0, sizeof(fields)); - if (is_sampler()) { - /* Samplers take no storage whatsoever. */ - matrix_columns = vector_elements = 0; - } else { - matrix_columns = vector_elements = 1; - } + matrix_columns = vector_elements = 1; } glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields, |