Skip to content

Commit

Permalink
Update D3D11Driver.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolftein committed Nov 11, 2024
1 parent 020d958 commit cc9e606
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions Source/Private/Aurora.Graphic/D3D11/D3D11Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1066,19 +1066,14 @@ namespace Graphic
// Resolve multisample texture(s)
for (UInt32 Slot = 0; Slot < k_MaxAttachments; ++Slot) // @TODO Stack
{
if (Ref<const D3D11Attachment> Destination = Pass.Resolves[Slot]; Destination.Object)
if (Ref<const D3D11Attachment> Resolve = Pass.Resolves[Slot]; Resolve.Object)
{
Ref<const D3D11Attachment> Source = Pass.Color[Slot];

CD3D11_RENDER_TARGET_VIEW_DESC Description; // @TODO Cache somewhere
Destination.Resource->GetDesc(AddressOf(Description));
D3D11_RENDER_TARGET_VIEW_DESC Description;
Resolve.Resource->GetDesc(AddressOf(Description));

Ref<const D3D11Attachment> Source = Pass.Color[Slot];
mDeviceImmediate->ResolveSubresource(
Destination.Object.Get(),
Destination.Level,
Source.Object.Get(),
Source.Level,
Description.Format);
Resolve.Object.Get(), Resolve.Level, Source.Object.Get(), Source.Level, Description.Format);
}
}

Expand Down Expand Up @@ -1271,7 +1266,7 @@ namespace Graphic
Description.Height = Height;
Description.MipLevels = 1;
Description.ArraySize = 1;
Description.Format = DXGI_FORMAT_D32_FLOAT_S8X24_UINT;
Description.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
Description.SampleDesc = mLimits.Multisample[Samples];
Description.Usage = D3D11_USAGE_DEFAULT;
Description.BindFlags = D3D11_BIND_DEPTH_STENCIL;
Expand Down

0 comments on commit cc9e606

Please sign in to comment.