mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 12:40:23 +01:00
anv: add support for VK_EXT_dynamic_rendering_unused_attachments
Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23294>
This commit is contained in:
parent
b50c9ba692
commit
d17af98abc
2 changed files with 14 additions and 2 deletions
|
|
@ -308,6 +308,7 @@ get_device_extensions(const struct anv_physical_device *device,
|
|||
#ifdef VK_USE_PLATFORM_DISPLAY_KHR
|
||||
.EXT_display_control = true,
|
||||
#endif
|
||||
.EXT_dynamic_rendering_unused_attachments = true,
|
||||
.EXT_extended_dynamic_state = true,
|
||||
.EXT_extended_dynamic_state2 = true,
|
||||
.EXT_extended_dynamic_state3 = true,
|
||||
|
|
@ -810,6 +811,9 @@ get_features(const struct anv_physical_device *pdevice,
|
|||
|
||||
/* VK_KHR_ray_tracing_position_fetch */
|
||||
.rayTracingPositionFetch = rt_enabled,
|
||||
|
||||
/* VK_EXT_dynamic_rendering_unused_attachments */
|
||||
.dynamicRenderingUnusedAttachments = true,
|
||||
};
|
||||
|
||||
/* The new DOOM and Wolfenstein games require depthBounds without
|
||||
|
|
|
|||
|
|
@ -525,8 +525,16 @@ populate_mesh_prog_key(const struct anv_device *device,
|
|||
static uint32_t
|
||||
rp_color_mask(const struct vk_render_pass_state *rp)
|
||||
{
|
||||
return (rp != NULL && rp->attachment_aspects != VK_IMAGE_ASPECT_METADATA_BIT) ?
|
||||
((1u << rp->color_attachment_count) - 1) : ((1u << MAX_RTS) - 1);
|
||||
if (rp == NULL || rp->attachment_aspects == VK_IMAGE_ASPECT_METADATA_BIT)
|
||||
return ((1u << MAX_RTS) - 1);
|
||||
|
||||
uint32_t color_mask = 0;
|
||||
for (uint32_t i = 0; i < rp->color_attachment_count; i++) {
|
||||
if (rp->color_attachment_formats[i] != VK_FORMAT_UNDEFINED)
|
||||
color_mask |= BITFIELD_BIT(i);
|
||||
}
|
||||
|
||||
return color_mask;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue