Skip to content

Commit

Permalink
Add c_initialRead/UAVTargetState to help with PC vs. Xbox warnings (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn authored Mar 12, 2024
1 parent ca971ac commit c94ad84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@
{ "name": "arm64-Debug" , "configurePreset": "arm64-Debug" },
{ "name": "arm64-Release", "configurePreset": "arm64-Release" },

{ "name": "x64-Debug-VCPKG" , "configurePreset": "x64-Debug-VCPKG" },
{ "name": "x64-Release-VCPKG" , "configurePreset": "x64-Release-VCPKG" },

{ "name": "x64-Debug-Clang" , "configurePreset": "x64-Debug-Clang" },
{ "name": "x64-Release-Clang" , "configurePreset": "x64-Release-Clang" },
{ "name": "x86-Debug-Clang" , "configurePreset": "x86-Debug-Clang" },
Expand Down
4 changes: 4 additions & 0 deletions Inc/DirectXHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,12 @@ namespace DirectX
{
#if (defined(_XBOX_ONE) && defined(_TITLE)) || defined(_GAMING_XBOX)
constexpr D3D12_RESOURCE_STATES c_initialCopyTargetState = D3D12_RESOURCE_STATE_COPY_DEST;
constexpr D3D12_RESOURCE_STATES c_initialReadTargetState = D3D12_RESOURCE_STATE_GENERIC_READ;
constexpr D3D12_RESOURCE_STATES c_initialUAVTargetState = D3D12_RESOURCE_STATE_UNORDERED_ACCESS;
#else
constexpr D3D12_RESOURCE_STATES c_initialCopyTargetState = D3D12_RESOURCE_STATE_COMMON;
constexpr D3D12_RESOURCE_STATES c_initialReadTargetState = D3D12_RESOURCE_STATE_COMMON;
constexpr D3D12_RESOURCE_STATES c_initialUAVTargetState = D3D12_RESOURCE_STATE_COMMON;
#endif

constexpr D3D12_CPU_DESCRIPTOR_HANDLE D3D12_CPU_DESCRIPTOR_HANDLE_ZERO = {};
Expand Down

0 comments on commit c94ad84

Please sign in to comment.