radv: move a conditional check to radv_remove_color_exports()
Better to have all restrictions inside the function. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20244>
This commit is contained in:

committed by
Marge Bot

parent
a43482e8d6
commit
05d2ed7350
@@ -2207,6 +2207,10 @@ radv_remove_color_exports(const struct radv_pipeline_key *pipeline_key, nir_shad
|
||||
{
|
||||
bool fixup_derefs = false;
|
||||
|
||||
/* Do not remove color exports when a PS epilog is used because the format isn't known. */
|
||||
if (pipeline_key->ps.has_epilog)
|
||||
return;
|
||||
|
||||
/* Do not remove color exports when the write mask is dynamic. */
|
||||
if (pipeline_key->dynamic_color_write_mask)
|
||||
return;
|
||||
@@ -2607,10 +2611,7 @@ radv_pipeline_link_fs(struct radv_pipeline_stage *fs_stage,
|
||||
{
|
||||
assert(fs_stage->nir->info.stage == MESA_SHADER_FRAGMENT);
|
||||
|
||||
if (!pipeline_key->ps.has_epilog) {
|
||||
/* Only remove color exports when the format is known. */
|
||||
radv_remove_color_exports(pipeline_key, fs_stage->nir);
|
||||
}
|
||||
radv_remove_color_exports(pipeline_key, fs_stage->nir);
|
||||
|
||||
nir_foreach_shader_out_variable(var, fs_stage->nir) {
|
||||
var->data.driver_location = var->data.location + var->data.index;
|
||||
|
Reference in New Issue
Block a user