summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ir.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/ir.cpp b/ir.cpp
index 4c1f307e8a..90df67bbf1 100644
--- a/ir.cpp
+++ b/ir.cpp
@@ -240,6 +240,9 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name)
{
this->type = type;
this->name = name;
+
+ if (type && type->base_type == GLSL_TYPE_SAMPLER)
+ this->read_only = true;
}