glsl: Add error message for intrastage interface block mismatch.
Previously we failed to link (which is correct), but we did not output an error message, which could have been confusing for users. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
4682b9b7bf
commit
659ec1c958
|
@ -32,7 +32,8 @@
|
|||
#include "main/macros.h"
|
||||
|
||||
bool
|
||||
validate_intrastage_interface_blocks(const gl_shader **shader_list,
|
||||
validate_intrastage_interface_blocks(struct gl_shader_program *prog,
|
||||
const gl_shader **shader_list,
|
||||
unsigned num_shaders)
|
||||
{
|
||||
glsl_symbol_table interfaces;
|
||||
|
@ -62,6 +63,8 @@ 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) {
|
||||
linker_error(prog, "definitions of interface block `%s' do not"
|
||||
" match\n", iface_type->name);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -960,7 +960,8 @@ link_intrastage_shaders(void *mem_ctx,
|
|||
|
||||
/* Check that interface blocks defined in multiple shaders are consistent.
|
||||
*/
|
||||
if (!validate_intrastage_interface_blocks((const gl_shader **)shader_list,
|
||||
if (!validate_intrastage_interface_blocks(prog,
|
||||
(const gl_shader **)shader_list,
|
||||
num_shaders))
|
||||
return NULL;
|
||||
|
||||
|
|
|
@ -61,7 +61,8 @@ link_uniform_blocks(void *mem_ctx,
|
|||
struct gl_uniform_block **blocks_ret);
|
||||
|
||||
bool
|
||||
validate_intrastage_interface_blocks(const gl_shader **shader_list,
|
||||
validate_intrastage_interface_blocks(struct gl_shader_program *prog,
|
||||
const gl_shader **shader_list,
|
||||
unsigned num_shaders);
|
||||
|
||||
bool
|
||||
|
|
Loading…
Reference in New Issue