[Mesa-dev] [PATCH 2/2] glsl: replace unreachable code path with assert
Timothy Arceri
timothy.arceri at collabora.com
Thu Jan 7 20:25:37 PST 2016
The lower_named_interface_blocks() pass is called before we try
assign locations to varyings so this shouldn't be reachable.
---
src/glsl/link_varyings.cpp | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp
index 1a3f2fa..b001330 100644
--- a/src/glsl/link_varyings.cpp
+++ b/src/glsl/link_varyings.cpp
@@ -1353,13 +1353,12 @@ public:
void process(ir_variable *var)
{
+ /* All named varying interface blocks should be flattened by now */
+ assert(!var->is_interface_instance());
+
this->toplevel_var = var;
this->varying_floats = 0;
- if (var->is_interface_instance())
- program_resource_visitor::process(var->get_interface_type(),
- var->get_interface_type()->name);
- else
- program_resource_visitor::process(var);
+ program_resource_visitor::process(var);
}
private:
--
2.4.3
More information about the mesa-dev
mailing list