From 72fc47f0b0605748c9643e61c2a879b8476aa533 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 26 Mar 2010 16:37:53 -0700 Subject: [PATCH] Set variables with the sampler base type to read only. Fixes increment3.frag. --- ir.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ir.cpp b/ir.cpp index 4c1f307e8af..90df67bbf1d 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; } -- 2.30.2