diff options
author | Chris Forbes <[email protected]> | 2013-09-26 19:37:30 +1200 |
---|---|---|
committer | Chris Forbes <[email protected]> | 2013-10-05 19:16:32 +1300 |
commit | 7a4754d7d961b06652cc940c37c4f87a9111dc2a (patch) | |
tree | 54e3d8cdf02806dc1502babd4e41ec4878ad2d24 /src/glsl/ir_reader.cpp | |
parent | 6ce4e7672ed4ca2afe47ca5236f3444d4bc83a4e (diff) |
glsl: add plumbing for GL_ARB_texture_query_levels
Signed-off-by: Chris Forbes <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl/ir_reader.cpp')
-rw-r--r-- | src/glsl/ir_reader.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp index 8038b8f5db2..ea0c09aebeb 100644 --- a/src/glsl/ir_reader.cpp +++ b/src/glsl/ir_reader.cpp @@ -949,6 +949,8 @@ ir_reader::read_texture(s_expression *expr) { "txs", s_type, s_sampler, s_lod }; s_pattern tg4_pattern[] = { "tg4", s_type, s_sampler, s_coord, s_offset }; + s_pattern query_levels_pattern[] = + { "query_levels", s_type, s_sampler }; s_pattern other_pattern[] = { tag, s_type, s_sampler, s_coord, s_offset, s_proj, s_shadow, s_lod }; @@ -964,6 +966,8 @@ ir_reader::read_texture(s_expression *expr) op = ir_txs; } else if (MATCH(expr, tg4_pattern)) { op = ir_tg4; + } else if (MATCH(expr, query_levels_pattern)) { + op = ir_query_levels; } else if (MATCH(expr, other_pattern)) { op = ir_texture::get_opcode(tag->value()); if (op == -1) @@ -1014,7 +1018,9 @@ ir_reader::read_texture(s_expression *expr) } } - if (op != ir_txf && op != ir_txf_ms && op != ir_txs && op != ir_lod && op != ir_tg4) { + if (op != ir_txf && op != ir_txf_ms && + op != ir_txs && op != ir_lod && op != ir_tg4 && + op != ir_query_levels) { s_int *proj_as_int = SX_AS_INT(s_proj); if (proj_as_int && proj_as_int->value() == 1) { tex->projector = NULL; |