summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.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.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.cpp')
-rw-r--r--src/glsl/ir.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index 724861b1e9f..fb58c3b4ef6 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -1398,7 +1398,7 @@ ir_dereference::is_lvalue() const
}
-static const char * const tex_opcode_strs[] = { "tex", "txb", "txl", "txd", "txf", "txf_ms", "txs", "lod", "tg4", "query_levels" };
+static const char * const tex_opcode_strs[] = { "tex", "txb", "txl", "txd", "txf", "txf_ms", "txs", "lod", "tg4", "query_levels", "texture_samples" };
const char *ir_texture::opcode_string()
{
@@ -1427,7 +1427,8 @@ ir_texture::set_sampler(ir_dereference *sampler, const glsl_type *type)
this->sampler = sampler;
this->type = type;
- if (this->op == ir_txs || this->op == ir_query_levels) {
+ if (this->op == ir_txs || this->op == ir_query_levels ||
+ this->op == ir_texture_samples) {
assert(type->base_type == GLSL_TYPE_INT);
} else if (this->op == ir_lod) {
assert(type->vector_elements == 2);