diff options
author | Maxence Le Dore <maxence.ledore@gmail.com> | 2012-12-24 00:57:37 +0100 |
---|---|---|
committer | Chris Forbes <chrisf@ijw.co.nz> | 2013-10-03 07:55:54 +1300 |
commit | 18002d9eda56801794cf471b30cfb9cd79fd167b (patch) | |
tree | 996f09ad1d51f934b512f59bb9c0a98ea0b73ed1 /src/glsl/ir_reader.cpp | |
parent | d3575622b7897c88c62e4f57341c196eb913c960 (diff) |
glsl: add texture gather changes
V2 [Chris Forbes]:
- Add new pattern, fixup parameter reading.
V3: Rebase onto new builtins machinery
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/glsl/ir_reader.cpp')
-rw-r--r-- | src/glsl/ir_reader.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp index f0318ea210..8038b8f5db 100644 --- a/src/glsl/ir_reader.cpp +++ b/src/glsl/ir_reader.cpp @@ -947,6 +947,8 @@ ir_reader::read_texture(s_expression *expr) { "txf_ms", s_type, s_sampler, s_coord, s_sample_index }; s_pattern txs_pattern[] = { "txs", s_type, s_sampler, s_lod }; + s_pattern tg4_pattern[] = + { "tg4", s_type, s_sampler, s_coord, s_offset }; s_pattern other_pattern[] = { tag, s_type, s_sampler, s_coord, s_offset, s_proj, s_shadow, s_lod }; @@ -960,6 +962,8 @@ ir_reader::read_texture(s_expression *expr) op = ir_txf_ms; } else if (MATCH(expr, txs_pattern)) { op = ir_txs; + } else if (MATCH(expr, tg4_pattern)) { + op = ir_tg4; } else if (MATCH(expr, other_pattern)) { op = ir_texture::get_opcode(tag->value()); if (op == -1) @@ -1010,7 +1014,7 @@ ir_reader::read_texture(s_expression *expr) } } - if (op != ir_txf && op != ir_txf_ms && op != ir_txs && op != ir_lod) { + if (op != ir_txf && op != ir_txf_ms && op != ir_txs && op != ir_lod && op != ir_tg4) { s_int *proj_as_int = SX_AS_INT(s_proj); if (proj_as_int && proj_as_int->value() == 1) { tex->projector = NULL; |