mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 08:00:12 +01:00
anv: ensure null-rt bit in compiler isn't used when there is ds attachment
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Fixes:15987f49bb("anv: avoid setting up a null RT unless needed") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12396 Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> (cherry picked from commit98cdb9349a) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33113>
This commit is contained in:
parent
17381f3190
commit
e8fdb9fe5c
2 changed files with 10 additions and 1 deletions
|
|
@ -204,7 +204,7 @@
|
|||
"description": "anv: ensure null-rt bit in compiler isn't used when there is ds attachment",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "15987f49bb9ca105f7b252d90349f614c492c3d5",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -531,6 +531,15 @@ rp_color_mask(const struct vk_render_pass_state *rp)
|
|||
color_mask |= BITFIELD_BIT(i);
|
||||
}
|
||||
|
||||
/* If there is depth/stencil attachment, even if the fragment shader
|
||||
* doesn't write the depth/stencil output, we need a valid render target so
|
||||
* that the compiler doesn't use the null-rt which would cull the
|
||||
* depth/stencil output.
|
||||
*/
|
||||
if (rp->depth_attachment_format != VK_FORMAT_UNDEFINED ||
|
||||
rp->stencil_attachment_format != VK_FORMAT_UNDEFINED)
|
||||
color_mask |= 1;
|
||||
|
||||
return color_mask;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue