summaryrefslogtreecommitdiffstats
path: root/ir_reader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ir_reader.cpp')
-rw-r--r--ir_reader.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/ir_reader.cpp b/ir_reader.cpp
index 4c97cc8ebad..0a2d18e2e01 100644
--- a/ir_reader.cpp
+++ b/ir_reader.cpp
@@ -934,11 +934,12 @@ read_texture(_mesa_glsl_parse_state *st, s_list *list)
// Read sampler (must be a deref)
s_expression *sampler_expr = (s_expression *) tag->next;
- tex->sampler = read_dereference(st, sampler_expr);
- if (tex->sampler == NULL) {
+ ir_dereference *sampler = read_dereference(st, sampler_expr);
+ if (sampler == NULL) {
ir_read_error(st, NULL, "when reading sampler in (%s ...)", tag->value());
return NULL;
}
+ tex->set_sampler(sampler);
// Read coordinate (any rvalue)
s_expression *coordinate_expr = (s_expression *) sampler_expr->next;