From e0e01895b054847e41b98cbf3939520747a0f32d Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset <samuel.pitoiset@gmail.com> Date: Wed, 26 Apr 2017 13:49:13 +0200 Subject: glsl: set vector_elements to 1 for samplers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. This time the Intel CI system doesn't report any failures. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> --- src/compiler/glsl_types.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/compiler') 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, -- cgit v1.2.3