mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
glsl: call nir version of lower_blend_equation_advanced()
Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22711>
This commit is contained in:
parent
7f3f429308
commit
c02252950c
2 changed files with 9 additions and 4 deletions
|
|
@ -81,10 +81,6 @@ link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
|
|||
ctx->st->has_half_float_packing);
|
||||
do_mat_op_to_vec(ir);
|
||||
|
||||
if (stage == MESA_SHADER_FRAGMENT && pscreen->get_param(pscreen, PIPE_CAP_FBFETCH))
|
||||
lower_blend_equation_advanced(
|
||||
shader, ctx->Extensions.KHR_blend_equation_advanced_coherent);
|
||||
|
||||
lower_instructions(ir, have_dround,
|
||||
ctx->Extensions.ARB_gpu_shader5);
|
||||
|
||||
|
|
|
|||
|
|
@ -339,6 +339,15 @@ st_nir_preprocess(struct st_context *st, struct gl_program *prog,
|
|||
assert(options);
|
||||
nir_shader *nir = prog->nir;
|
||||
|
||||
if (prog->info.stage == MESA_SHADER_FRAGMENT &&
|
||||
st->screen->get_param(st->screen, PIPE_CAP_FBFETCH)) {
|
||||
nir_shader_gather_info(prog->nir, nir_shader_get_entrypoint(prog->nir));
|
||||
NIR_PASS_V(prog->nir, gl_nir_lower_blend_equation_advanced,
|
||||
st->ctx->Extensions.KHR_blend_equation_advanced_coherent);
|
||||
nir_lower_global_vars_to_local(prog->nir);
|
||||
NIR_PASS_V(prog->nir, nir_opt_combine_stores, nir_var_shader_out);
|
||||
}
|
||||
|
||||
/* Set the next shader stage hint for VS and TES. */
|
||||
if (!nir->info.separate_shader &&
|
||||
(nir->info.stage == MESA_SHADER_VERTEX ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue