summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_reader.cpp
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-08-27 23:03:46 -0400
committerIlia Mirkin <[email protected]>2015-09-10 17:38:29 -0400
commitf9052914e979228d28502a7f7953f98ff4731f99 (patch)
tree5e7025e5de5eb58f93e6ab9f0df9dae16e4521bc /src/glsl/ir_reader.cpp
parent6efae687b7ef46eb1f738f1bc2acbde1805e364b (diff)
glsl: add ir_texture_samples texture opcode
Will be used for textureSamples() Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/ir_reader.cpp')
-rw-r--r--src/glsl/ir_reader.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp
index 979653304cc..07720e28749 100644
--- a/src/glsl/ir_reader.cpp
+++ b/src/glsl/ir_reader.cpp
@@ -960,6 +960,8 @@ ir_reader::read_texture(s_expression *expr)
{ "tg4", s_type, s_sampler, s_coord, s_offset, s_component };
s_pattern query_levels_pattern[] =
{ "query_levels", s_type, s_sampler };
+ s_pattern texture_samples_pattern[] =
+ { "samples", s_type, s_sampler };
s_pattern other_pattern[] =
{ tag, s_type, s_sampler, s_coord, s_offset, s_proj, s_shadow, s_lod };
@@ -977,6 +979,8 @@ ir_reader::read_texture(s_expression *expr)
op = ir_tg4;
} else if (MATCH(expr, query_levels_pattern)) {
op = ir_query_levels;
+ } else if (MATCH(expr, texture_samples_pattern)) {
+ op = ir_texture_samples;
} else if (MATCH(expr, other_pattern)) {
op = ir_texture::get_opcode(tag->value());
if (op == (ir_texture_opcode) -1)
@@ -1029,7 +1033,7 @@ ir_reader::read_texture(s_expression *expr)
if (op != ir_txf && op != ir_txf_ms &&
op != ir_txs && op != ir_lod && op != ir_tg4 &&
- op != ir_query_levels) {
+ op != ir_query_levels && op != ir_texture_samples) {
s_int *proj_as_int = SX_AS_INT(s_proj);
if (proj_as_int && proj_as_int->value() == 1) {
tex->projector = NULL;