Update d3dx12_resource_helpers.h for /analyze warning (#143)

This commit is contained in:
Chuck Walbourn 2024-11-07 12:36:32 -08:00 committed by GitHub
parent e692c14946
commit b5801059e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -460,7 +460,7 @@ inline bool D3DX12GetCopyableFootprints(
UINT32 MinPlanePitchWidth, PlaneWidth, PlaneHeight;
D3D12_PROPERTY_LAYOUT_FORMAT_TABLE::GetPlaneSubsampledSizeAndFormatForCopyableLayout(PlaneSlice, Format, (UINT)Width, Height, /*_Out_*/ PlaneFormat, /*_Out_*/ MinPlanePitchWidth, /* _Out_ */ PlaneWidth, /*_Out_*/ PlaneHeight);
D3D12_SUBRESOURCE_FOOTPRINT LocalPlacement;
D3D12_SUBRESOURCE_FOOTPRINT LocalPlacement = {};
auto& Placement = pLayouts ? pLayouts[uSubRes].Footprint : LocalPlacement;
Placement.Format = PlaneFormat;
Placement.Width = PlaneWidth;