diff options
author | Paul Berry <stereotype441@gmail.com> | 2013-07-27 11:08:31 -0700 |
---|---|---|
committer | Paul Berry <stereotype441@gmail.com> | 2013-07-30 10:10:26 -0700 |
commit | b95d237fe6731055dad2ff3eaa59e4d6fc14bfff (patch) | |
tree | 4fda4c39f30b71e5d36b6dfde466b412ff115be5 /src/glsl/linker.h | |
parent | 659ec1c958b59b77b5334d1121722ea0c80dddf8 (diff) | |
download | external_mesa3d-b95d237fe6731055dad2ff3eaa59e4d6fc14bfff.zip external_mesa3d-b95d237fe6731055dad2ff3eaa59e4d6fc14bfff.tar.gz external_mesa3d-b95d237fe6731055dad2ff3eaa59e4d6fc14bfff.tar.bz2 |
glsl: Use a consistent technique for tracking link success/failure.
This patch changes link_shaders() so that it sets prog->LinkStatus to
true when it starts, and then relies on linker_error() to set it to
false if a link failure occurs.
Previously, link_shaders() would set prog->LinkStatus to true halfway
through its execution; as a result, linker functions that executed
during the first half of link_shaders() would have to do their own
success/failure tracking; if they didn't, then calling linker_error()
would add an error message to the log, but not cause the link to fail.
Since it wasn't always obvious from looking at a linker function
whether it was called before or after link_shaders() set
prog->LinkStatus to true, this carried a high risk of bugs.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/glsl/linker.h')
-rw-r--r-- | src/glsl/linker.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/glsl/linker.h b/src/glsl/linker.h index 9f5deb5..0ce747d 100644 --- a/src/glsl/linker.h +++ b/src/glsl/linker.h @@ -60,13 +60,14 @@ link_uniform_blocks(void *mem_ctx, unsigned num_shaders, struct gl_uniform_block **blocks_ret); -bool +void validate_intrastage_interface_blocks(struct gl_shader_program *prog, const gl_shader **shader_list, unsigned num_shaders); -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); /** |