aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/link_interface_blocks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/link_interface_blocks.cpp')
-rw-r--r--mesalib/src/glsl/link_interface_blocks.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/mesalib/src/glsl/link_interface_blocks.cpp b/mesalib/src/glsl/link_interface_blocks.cpp
index b91860d03..928a88ee2 100644
--- a/mesalib/src/glsl/link_interface_blocks.cpp
+++ b/mesalib/src/glsl/link_interface_blocks.cpp
@@ -31,8 +31,9 @@
#include "linker.h"
#include "main/macros.h"
-bool
-validate_intrastage_interface_blocks(const gl_shader **shader_list,
+void
+validate_intrastage_interface_blocks(struct gl_shader_program *prog,
+ const gl_shader **shader_list,
unsigned num_shaders)
{
glsl_symbol_table interfaces;
@@ -62,16 +63,17 @@ validate_intrastage_interface_blocks(const gl_shader **shader_list,
interfaces.add_interface(iface_type->name, iface_type,
(enum ir_variable_mode) var->mode);
} else if (old_iface_type != iface_type) {
- return false;
+ linker_error(prog, "definitions of interface block `%s' do not"
+ " match\n", iface_type->name);
+ return;
}
}
}
-
- return true;
}
-bool
-validate_interstage_interface_blocks(const gl_shader *producer,
+void
+validate_interstage_interface_blocks(struct gl_shader_program *prog,
+ const gl_shader *producer,
const gl_shader *consumer)
{
glsl_symbol_table interfaces;
@@ -102,9 +104,10 @@ validate_interstage_interface_blocks(const gl_shader *producer,
if (expected_type == NULL)
continue;
- if (var->interface_type != expected_type)
- return false;
+ if (var->interface_type != expected_type) {
+ linker_error(prog, "definitions of interface block `%s' do not "
+ "match\n", var->interface_type->name);
+ return;
+ }
}
-
- return true;
}