summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ir.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2015-11-15 04:32:52 -0800
committerKenneth Graunke <[email protected]>2017-01-06 15:55:25 -0800
commit6aa5cb34d03765b7be8611aa516bc201bd337f73 (patch)
treed06c3c6e2cd699f1b1682b5af7f8e054f69b4e89 /src/compiler/glsl/ir.cpp
parentaead6a1e947af84b0af2853c204d5cad6d92bfff (diff)
glsl: Create and use a new ir_variable::count_attribute_slots() wrapper.
This wraps glsl_type::count_attribute_slots(), but will soon contain a couple of overrides for a couple of GLSL built-ins variables. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ir.cpp')
-rw-r--r--src/compiler/glsl/ir.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp
index 8e4b382ebd3..a77b9a9d857 100644
--- a/src/compiler/glsl/ir.cpp
+++ b/src/compiler/glsl/ir.cpp
@@ -1618,6 +1618,13 @@ ir_variable::get_extension_warning() const
? NULL : warn_extension_table[this->data.warn_extension_index];
}
+unsigned
+ir_variable::count_attribute_slots(bool is_vertex_stage) const
+{
+ bool is_vs_input = is_vertex_stage && this->data.mode == ir_var_shader_in;
+ return this->type->count_attribute_slots(is_vs_input);
+}
+
ir_function_signature::ir_function_signature(const glsl_type *return_type,
builtin_available_predicate b)
: ir_instruction(ir_type_function_signature),