summaryrefslogtreecommitdiffstats
path: root/ir_reader.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-06-03 15:07:34 -0700
committerKenneth Graunke <[email protected]>2010-06-09 11:14:57 -0700
commit56d3f6ad782e9819b40544494826954d3fcf978b (patch)
tree8a20d5ca82e423d6d775aa358288c1655610f2ef /ir_reader.cpp
parentdd5b4a544bd53f192cc86441f4e7e95d93707382 (diff)
Set the type of ir_texture properly; infer it from the sampler type.
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;