diff options
author | Samuel Pitoiset <[email protected]> | 2017-02-24 14:40:20 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-02-27 19:41:11 +0100 |
commit | e12f4edf9ce69ff76d4c81b1cebd6e2d4934f3c5 (patch) | |
tree | 12e4b67c77fd93e3a69d8b47612e6e63f8550086 /src/compiler | |
parent | 46562a062b77ff9f63a7599ba1396772fb53786b (diff) |
glsl: use is_image() anywhere it's possible
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/link_uniform_initializers.cpp | 2 | ||||
-rw-r--r-- | src/compiler/glsl_types.cpp | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/compiler/glsl/link_uniform_initializers.cpp b/src/compiler/glsl/link_uniform_initializers.cpp index fe0841f472f..7e5b80d5c7e 100644 --- a/src/compiler/glsl/link_uniform_initializers.cpp +++ b/src/compiler/glsl/link_uniform_initializers.cpp @@ -140,7 +140,7 @@ set_opaque_binding(void *mem_ctx, gl_shader_program *prog, storage->storage[i].i; } - } else if (storage->type->base_type == GLSL_TYPE_IMAGE && + } else if (storage->type->is_image() && storage->opaque[sh].active) { for (unsigned i = 0; i < elements; i++) { const unsigned index = storage->opaque[sh].index + i; diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp index a431edcdd3f..7cbb21112f2 100644 --- a/src/compiler/glsl_types.cpp +++ b/src/compiler/glsl_types.cpp @@ -2032,8 +2032,7 @@ glsl_type::coordinate_components() const * cubemap faces. */ if (sampler_array && - !(base_type == GLSL_TYPE_IMAGE && - sampler_dimensionality == GLSL_SAMPLER_DIM_CUBE)) + !(is_image() && sampler_dimensionality == GLSL_SAMPLER_DIM_CUBE)) size += 1; return size; |