glsl: inline do_common_optimization() call
The function was previously a helper for when some drivers still called the GLSL IR optimisations in a loop. No drivers do that anymore. Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16924>
This commit is contained in:

committed by
Marge Bot

parent
d09a37ef54
commit
893b4d98f8
@@ -3561,15 +3561,6 @@ link_varyings(const struct gl_constants *consts, struct gl_shader_program *prog,
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
linker_optimisation_loop(const struct gl_constants *consts, exec_list *ir,
|
||||
unsigned stage)
|
||||
{
|
||||
/* Run it just once, since NIR will do the real optimizaiton. */
|
||||
do_common_optimization(ir, true, &consts->ShaderCompilerOptions[stage],
|
||||
consts->NativeIntegers);
|
||||
}
|
||||
|
||||
void
|
||||
link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
||||
{
|
||||
@@ -3907,10 +3898,10 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
||||
}
|
||||
}
|
||||
|
||||
/* Call opts before lowering const arrays to uniforms so we can const
|
||||
* propagate any elements accessed directly.
|
||||
*/
|
||||
linker_optimisation_loop(consts, prog->_LinkedShaders[i]->ir, i);
|
||||
/* Run it just once, since NIR will do the real optimizaiton. */
|
||||
do_common_optimization(prog->_LinkedShaders[i]->ir, true,
|
||||
&consts->ShaderCompilerOptions[i],
|
||||
consts->NativeIntegers);
|
||||
}
|
||||
|
||||
/* Check and validate stream emissions in geometry shaders */
|
||||
|
Reference in New Issue
Block a user