mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 04:00:10 +01:00
glsl: combine shader stage loops in linker
The gs validation that was run between these loops can be run after merging them without any issue. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26628>
This commit is contained in:
parent
5d98592e04
commit
5147e9a26e
1 changed files with 7 additions and 12 deletions
|
|
@ -3100,18 +3100,6 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
|||
if (!interstage_cross_validate_uniform_blocks(prog, true))
|
||||
goto done;
|
||||
|
||||
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
|
||||
if (prog->_LinkedShaders[i] == NULL)
|
||||
continue;
|
||||
|
||||
detect_recursion_linked(prog, prog->_LinkedShaders[i]->ir);
|
||||
if (!prog->data->LinkStatus)
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Check and validate stream emissions in geometry shaders */
|
||||
validate_geometry_shader_emissions(consts, prog);
|
||||
|
||||
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
|
||||
if (prog->_LinkedShaders[i] == NULL)
|
||||
continue;
|
||||
|
|
@ -3119,6 +3107,10 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
|||
struct gl_linked_shader *shader = prog->_LinkedShaders[i];
|
||||
exec_list *ir = shader->ir;
|
||||
|
||||
detect_recursion_linked(prog, ir);
|
||||
if (!prog->data->LinkStatus)
|
||||
goto done;
|
||||
|
||||
lower_vector_derefs(shader);
|
||||
|
||||
lower_packing_builtins(ir, ctx->Extensions.ARB_shading_language_packing,
|
||||
|
|
@ -3131,6 +3123,9 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
|||
do_vec_index_to_cond_assign(ir);
|
||||
}
|
||||
|
||||
/* Check and validate stream emissions in geometry shaders */
|
||||
validate_geometry_shader_emissions(consts, prog);
|
||||
|
||||
done:
|
||||
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
|
||||
free(shader_list[i]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue