microsoft / DirectXTK12

The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
https://walbourn.github.io/directx-tool-kit-for-directx-12/
MIT License
1.49k stars 396 forks source link

Fix warnings when using GPU-based validation on PC #149

Closed walbourn closed 1 year ago

walbourn commented 1 year ago

When SetEnableGPUBasedValidation is enabled on Windows, the initial state for a resource will result in a harmless but noisy warning.

D3D12 WARNING: ID3D12Device::CreateCommittedResource: Ignoring InitialState D3D12_RESOURCE_STATE_COPY_DEST. Buffers are effectively created in state D3D12_RESOURCE_STATE_COMMON. [ STATE_CREATION WARNING #1328: CREATERESOURCE_STATE_IGNORED]

The fix is to use the COMMON state initially and allow it to promote automatically.

Since common state promotion/decay is optional on Xbox, it must continue to use COPY_DEST as the initial state for this platform.

walbourn commented 1 year ago

VCPKG is having infrastructure issues today due to a git change that impacted GitHub. The code isn't a problem.