summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/ir.cpp')
-rw-r--r--src/glsl/ir.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index 724861b1e9f..2c45b9edc0f 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -342,6 +342,11 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
op0->type->vector_elements, 1);
break;
+ case ir_unop_get_buffer_size:
+ case ir_unop_ssbo_unsized_array_length:
+ this->type = glsl_type::int_type;
+ break;
+
default:
assert(!"not reached: missing automatic type setup for ir_expression");
this->type = op0->type;
@@ -571,6 +576,8 @@ static const char *const operator_strs[] = {
"noise",
"subroutine_to_int",
"interpolate_at_centroid",
+ "get_buffer_size",
+ "ssbo_unsized_array_length",
"+",
"-",
"*",
@@ -1398,7 +1405,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 +1434,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);
@@ -1657,6 +1665,7 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name,
this->data.image_coherent = false;
this->data.image_volatile = false;
this->data.image_restrict = false;
+ this->data.from_ssbo_unsized_array = false;
if (type != NULL) {
if (type->base_type == GLSL_TYPE_SAMPLER)