summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ir.cpp
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-02-24 14:40:21 +0100
committerSamuel Pitoiset <[email protected]>2017-02-27 19:41:14 +0100
commit08a052966fff77b1d3c04f0b75fb1199988ba1fd (patch)
tree519d658ebc0056f302b6737e8ee5cd659b8441ce /src/compiler/glsl/ir.cpp
parente12f4edf9ce69ff76d4c81b1cebd6e2d4934f3c5 (diff)
glsl: use is_sampler() anywhere it's possible
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ir.cpp')
-rw-r--r--src/compiler/glsl/ir.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp
index 28511b5b81c..f80bd811ac0 100644
--- a/src/compiler/glsl/ir.cpp
+++ b/src/compiler/glsl/ir.cpp
@@ -1501,7 +1501,7 @@ ir_texture::set_sampler(ir_dereference *sampler, const glsl_type *type)
assert(type->base_type == GLSL_TYPE_FLOAT);
} else if (this->op == ir_samples_identical) {
assert(type == glsl_type::bool_type);
- assert(sampler->type->base_type == GLSL_TYPE_SAMPLER);
+ assert(sampler->type->is_sampler());
assert(sampler->type->sampler_dimensionality == GLSL_SAMPLER_DIM_MS);
} else {
assert(sampler->type->sampled_type == (int) type->base_type);
@@ -1738,7 +1738,7 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name,
this->data.fb_fetch_output = false;
if (type != NULL) {
- if (type->base_type == GLSL_TYPE_SAMPLER)
+ if (type->is_sampler())
this->data.read_only = true;
if (type->is_interface())