mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 07:10:09 +01:00
anv: avoid setting up a null RT unless needed
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Ivan Briano <ivan.briano@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27270>
This commit is contained in:
parent
6f5d032c6f
commit
15987f49bb
1 changed files with 6 additions and 1 deletions
|
|
@ -1560,13 +1560,18 @@ anv_pipeline_link_fs(const struct brw_compiler *compiler,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
num_rt_bindings = stage->key.wm.nr_color_regions;
|
num_rt_bindings = stage->key.wm.nr_color_regions;
|
||||||
} else {
|
} else if (brw_nir_fs_needs_null_rt(
|
||||||
|
compiler->devinfo, stage->nir,
|
||||||
|
stage->key.wm.multisample_fbo != BRW_NEVER,
|
||||||
|
stage->key.wm.alpha_to_coverage != BRW_NEVER)) {
|
||||||
/* Setup a null render target */
|
/* Setup a null render target */
|
||||||
rt_bindings[0] = (struct anv_pipeline_binding) {
|
rt_bindings[0] = (struct anv_pipeline_binding) {
|
||||||
.set = ANV_DESCRIPTOR_SET_COLOR_ATTACHMENTS,
|
.set = ANV_DESCRIPTOR_SET_COLOR_ATTACHMENTS,
|
||||||
.index = UINT32_MAX,
|
.index = UINT32_MAX,
|
||||||
};
|
};
|
||||||
num_rt_bindings = 1;
|
num_rt_bindings = 1;
|
||||||
|
} else {
|
||||||
|
num_rt_bindings = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(num_rt_bindings <= MAX_RTS);
|
assert(num_rt_bindings <= MAX_RTS);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue