[d3d11] Do not add UINT formats to all UAV format lists

Analogous to vkd3d-proton changes. Allows drivers to use compression more
frequently.
This commit is contained in:
Philip Rebohle 2022-04-25 17:37:10 +02:00
parent a85f7c48a5
commit 6ddd0cfe0a
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
1 changed files with 5 additions and 19 deletions

View File

@ -60,25 +60,11 @@ namespace dxvk {
if (!pDevice->GetOptions()->disableMsaa)
DecodeSampleCount(m_desc.SampleDesc.Count, &imageInfo.sampleCount);
// Integer clear operations on UAVs are implemented using
// a view with a bit-compatible integer format, so we'll
// have to include that format in the format family
if (m_desc.BindFlags & D3D11_BIND_UNORDERED_ACCESS) {
DXGI_VK_FORMAT_INFO formatBase = m_device->LookupFormat(
m_desc.Format, DXGI_VK_FORMAT_MODE_RAW);
if (formatBase.Format != formatInfo.Format
&& formatBase.Format != VK_FORMAT_UNDEFINED) {
formatFamily.Add(formatInfo.Format);
formatFamily.Add(formatBase.Format);
}
if (IsR32UavCompatibleFormat(m_desc.Format)) {
formatFamily.Add(formatInfo.Format);
formatFamily.Add(VK_FORMAT_R32_SFLOAT);
formatFamily.Add(VK_FORMAT_R32_UINT);
formatFamily.Add(VK_FORMAT_R32_SINT);
}
if ((m_desc.BindFlags & D3D11_BIND_UNORDERED_ACCESS) && IsR32UavCompatibleFormat(m_desc.Format)) {
formatFamily.Add(formatInfo.Format);
formatFamily.Add(VK_FORMAT_R32_SFLOAT);
formatFamily.Add(VK_FORMAT_R32_UINT);
formatFamily.Add(VK_FORMAT_R32_SINT);
}
// The image must be marked as mutable if it can be reinterpreted