aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/lower_buffer_access.cpp
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-04-21 11:18:50 +0200
committerSamuel Pitoiset <[email protected]>2017-04-21 19:34:15 +0200
commita7bc51aef8ef7e3374e034bfbe33096e985ffb0b (patch)
treed37cd02757c0c56cf0928a871123b631be4a2017 /src/compiler/glsl/lower_buffer_access.cpp
parentcacc823c39044307e6befe12c3f51317f09973e2 (diff)
glsl: make use of glsl_type::is_float()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/compiler/glsl/lower_buffer_access.cpp')
-rw-r--r--src/compiler/glsl/lower_buffer_access.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/glsl/lower_buffer_access.cpp b/src/compiler/glsl/lower_buffer_access.cpp
index 1613806de4e..24a96e2fba4 100644
--- a/src/compiler/glsl/lower_buffer_access.cpp
+++ b/src/compiler/glsl/lower_buffer_access.cpp
@@ -164,8 +164,8 @@ lower_buffer_access::emit_access(void *mem_ctx,
/* We're dereffing a column out of a row-major matrix, so we
* gather the vector from each stored row.
*/
- assert(deref->type->base_type == GLSL_TYPE_FLOAT ||
- deref->type->is_double());
+ assert(deref->type->is_float() || deref->type->is_double());
+
/* Matrices, row_major or not, are stored as if they were
* arrays of vectors of the appropriate size in std140.
* Arrays have their strides rounded up to a vec4, so the
@@ -199,7 +199,7 @@ lower_buffer_access::emit_access(void *mem_ctx,
else
matrix_stride = glsl_align(matrix_columns * N, 16);
- const glsl_type *deref_type = deref->type->base_type == GLSL_TYPE_FLOAT ?
+ const glsl_type *deref_type = deref->type->is_float() ?
glsl_type::float_type : glsl_type::double_type;
for (unsigned i = 0; i < deref->type->vector_elements; i++) {