mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-09-30 22:25:23 +00:00
Fix MSAA + mipmaps combination on D3D11/D3D12/Vulkan/Metal. (#3717)
This commit is contained in:
committed by
GitHub
parent
526b886105
commit
7d03e160fa
@@ -5757,6 +5757,15 @@ namespace bgfx { namespace d3d12
|
||||
}
|
||||
else
|
||||
{
|
||||
const uint32_t savedMipLevels = resourceDesc.MipLevels;
|
||||
const D3D12_RESOURCE_FLAGS savedFlags = resourceDesc.Flags;
|
||||
|
||||
if (needResolve)
|
||||
{
|
||||
resourceDesc.MipLevels = 1;
|
||||
resourceDesc.Flags &= ~D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS;
|
||||
}
|
||||
|
||||
m_ptr = createCommittedResource(
|
||||
device
|
||||
, HeapProperty::Texture
|
||||
@@ -5768,6 +5777,12 @@ namespace bgfx { namespace d3d12
|
||||
: D3D12_HEAP_FLAG_NONE
|
||||
);
|
||||
|
||||
if (needResolve)
|
||||
{
|
||||
resourceDesc.MipLevels = savedMipLevels;
|
||||
resourceDesc.Flags = savedFlags;
|
||||
}
|
||||
|
||||
if (externalShared)
|
||||
{
|
||||
DX_CHECK(device->CreateSharedHandle(
|
||||
|
||||
Reference in New Issue
Block a user