mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
radeonsi: eliminate shader code for disabled or masked color outputs
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
This commit is contained in:
parent
509142876b
commit
bbad432e96
1 changed files with 8 additions and 0 deletions
|
|
@ -1994,6 +1994,14 @@ static inline void si_shader_selector_key(struct pipe_context *ctx, struct si_sh
|
|||
key->part.ps.epilog.color_is_int10 &= sel->info.colors_written;
|
||||
}
|
||||
|
||||
/* Eliminate shader code computing output values that are unused.
|
||||
* This enables dead code elimination between shader parts.
|
||||
* Check if any output is eliminated.
|
||||
*/
|
||||
if (sel->colors_written_4bit &
|
||||
~(sctx->framebuffer.colorbuf_enabled_4bit & blend->cb_target_enabled_4bit))
|
||||
key->opt.prefer_mono = 1;
|
||||
|
||||
bool is_poly = !util_prim_is_points_or_lines(sctx->current_rast_prim);
|
||||
bool is_line = util_prim_is_lines(sctx->current_rast_prim);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue