Workaround qcomm resolve attachment bug

This commit is contained in:
Connor Fitzgerald authored and Dzmitry Malyshau committed 2021-12-06 13:39:20 -05:00
1 parent f4bdf5c9a7
commit d51f70e8a4
3 files changed
+16

No files matched your search

+4
View File
@@ -881,6 +881,10 @@ impl super::Instance {
== db::intel::DEVICE_SKY_LAKE_MASK);
// TODO: only enable for particular devices
workarounds |= super::Workarounds::SEPARATE_ENTRY_POINTS;
workarounds.set(
super::Workarounds::EMPTY_RESOLVE_ATTACHMENT_LISTS,
phd_capabilities.properties.vendor_id == db::qualcomm::VENDOR,
);
};
if phd_capabilities.properties.api_version == vk::API_VERSION_1_0
+9
View File
@@ -136,6 +136,15 @@ impl super::DeviceShared {
.pipeline_bind_point(vk::PipelineBindPoint::GRAPHICS)
.color_attachments(&color_refs)
.resolve_attachments(&resolve_refs);
if self
.workarounds
.contains(super::Workarounds::EMPTY_RESOLVE_ATTACHMENT_LISTS)
&& resolve_refs.is_empty()
{
vk_subpass.p_resolve_attachments = ptr::null();
}
if let Some(ref reference) = ds_ref {
vk_subpass = vk_subpass.depth_stencil_attachment(reference)
}
+3
View File
@@ -172,6 +172,9 @@ bitflags::bitflags!(
pub struct Workarounds: u32 {
/// Only generate SPIR-V for one entry point at a time.
const SEPARATE_ENTRY_POINTS = 0x1;
/// Qualcomm OOMs when there are zero color attachments but a non-null pointer
/// to a subpass resolve attachment array. This nulls out that pointer in that case.
const EMPTY_RESOLVE_ATTACHMENT_LISTS = 0x2;
}
);