mirror of https://gitlab.freedesktop.org/mesa/mesa
vulkan/runtime: add a subpass bit for legacy dithering
v2: use bit only when dithering enabled on device Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19414>
This commit is contained in:
parent
826d467e40
commit
e7ce48557a
|
@ -482,6 +482,11 @@ vk_common_CreateRenderPass2(VkDevice _device,
|
||||||
subpass->attachment_count = num_subpass_attachments2(desc);
|
subpass->attachment_count = num_subpass_attachments2(desc);
|
||||||
subpass->attachments = next_subpass_attachment;
|
subpass->attachments = next_subpass_attachment;
|
||||||
|
|
||||||
|
if (device->enabled_features.legacyDithering) {
|
||||||
|
subpass->legacy_dithering_enabled =
|
||||||
|
desc->flags & VK_SUBPASS_DESCRIPTION_ENABLE_LEGACY_DITHERING_BIT_EXT;
|
||||||
|
}
|
||||||
|
|
||||||
/* From the Vulkan 1.3.204 spec:
|
/* From the Vulkan 1.3.204 spec:
|
||||||
*
|
*
|
||||||
* VUID-VkRenderPassCreateInfo2-viewMask-03058
|
* VUID-VkRenderPassCreateInfo2-viewMask-03058
|
||||||
|
@ -2114,6 +2119,8 @@ begin_subpass(struct vk_command_buffer *cmd_buffer,
|
||||||
.pColorAttachments = color_attachments,
|
.pColorAttachments = color_attachments,
|
||||||
.pDepthAttachment = &depth_attachment,
|
.pDepthAttachment = &depth_attachment,
|
||||||
.pStencilAttachment = &stencil_attachment,
|
.pStencilAttachment = &stencil_attachment,
|
||||||
|
.flags = subpass->legacy_dithering_enabled ?
|
||||||
|
VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT : 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
VkRenderingFragmentShadingRateAttachmentInfoKHR fsr_attachment;
|
VkRenderingFragmentShadingRateAttachmentInfoKHR fsr_attachment;
|
||||||
|
|
|
@ -182,6 +182,9 @@ struct vk_subpass {
|
||||||
|
|
||||||
/** VkMultisampledRenderToSingleSampledInfoEXT for this subpass */
|
/** VkMultisampledRenderToSingleSampledInfoEXT for this subpass */
|
||||||
VkMultisampledRenderToSingleSampledInfoEXT mrtss;
|
VkMultisampledRenderToSingleSampledInfoEXT mrtss;
|
||||||
|
|
||||||
|
/** True if legacy dithering is enabled for this subpass. */
|
||||||
|
bool legacy_dithering_enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
/***/
|
/***/
|
||||||
|
|
Loading…
Reference in New Issue