diff options
Diffstat (limited to 'src/glsl/ir_reader.cpp')
-rw-r--r-- | src/glsl/ir_reader.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp index ea0c09aebeb..00e2db9a3f0 100644 --- a/src/glsl/ir_reader.cpp +++ b/src/glsl/ir_reader.cpp @@ -934,6 +934,7 @@ ir_reader::read_texture(s_expression *expr) s_list *s_shadow = NULL; s_expression *s_lod = NULL; s_expression *s_sample_index = NULL; + s_expression *s_component = NULL; ir_texture_opcode op = ir_tex; /* silence warning */ @@ -948,7 +949,7 @@ ir_reader::read_texture(s_expression *expr) s_pattern txs_pattern[] = { "txs", s_type, s_sampler, s_lod }; s_pattern tg4_pattern[] = - { "tg4", s_type, s_sampler, s_coord, s_offset }; + { "tg4", s_type, s_sampler, s_coord, s_offset, s_component }; s_pattern query_levels_pattern[] = { "query_levels", s_type, s_sampler }; s_pattern other_pattern[] = @@ -1089,6 +1090,13 @@ ir_reader::read_texture(s_expression *expr) } break; } + case ir_tg4: + tex->lod_info.component = read_rvalue(s_component); + if (tex->lod_info.component == NULL) { + ir_read_error(NULL, "when reading component in (tg4 ...)"); + return NULL; + } + break; default: // tex and lod don't have any extra parameters. break; |