diff --git a/DDSTextureLoader/DDSTextureLoader12.cpp b/DDSTextureLoader/DDSTextureLoader12.cpp index f613199..084e2eb 100644 --- a/DDSTextureLoader/DDSTextureLoader12.cpp +++ b/DDSTextureLoader/DDSTextureLoader12.cpp @@ -1283,7 +1283,7 @@ namespace &defaultHeapProperties, D3D12_HEAP_FLAG_NONE, &desc, - D3D12_RESOURCE_STATE_COPY_DEST, + D3D12_RESOURCE_STATE_COMMON, nullptr, IID_ID3D12Resource, reinterpret_cast(texture)); if (SUCCEEDED(hr)) diff --git a/DirectXTex/DirectXTexD3D12.cpp b/DirectXTex/DirectXTexD3D12.cpp index da18489..f66b3f7 100644 --- a/DirectXTex/DirectXTexD3D12.cpp +++ b/DirectXTex/DirectXTexD3D12.cpp @@ -542,7 +542,11 @@ HRESULT DirectX::CreateTextureEx( &defaultHeapProperties, D3D12_HEAP_FLAG_NONE, &desc, + #if (defined(_XBOX_ONE) && defined(_TITLE)) || defined(_GAMING_XBOX) D3D12_RESOURCE_STATE_COPY_DEST, + #else + D3D12_RESOURCE_STATE_COMMON, + #endif nullptr, IID_GRAPHICS_PPV_ARGS(ppResource)); diff --git a/WICTextureLoader/WICTextureLoader12.cpp b/WICTextureLoader/WICTextureLoader12.cpp index 8c1293d..6735981 100644 --- a/WICTextureLoader/WICTextureLoader12.cpp +++ b/WICTextureLoader/WICTextureLoader12.cpp @@ -617,7 +617,7 @@ namespace &defaultHeapProperties, D3D12_HEAP_FLAG_NONE, &desc, - D3D12_RESOURCE_STATE_COPY_DEST, + D3D12_RESOURCE_STATE_COMMON, nullptr, IID_ID3D12Resource, reinterpret_cast(&tex)); diff --git a/build/DirectXTex-GitHub-MinGW.yml b/build/DirectXTex-GitHub-MinGW.yml index cd8ba80..e80d8a8 100644 --- a/build/DirectXTex-GitHub-MinGW.yml +++ b/build/DirectXTex-GitHub-MinGW.yml @@ -101,14 +101,13 @@ jobs: inputs: script: g++ --version - task: CmdLine@2 - # The error checks are commented out due to a bug with vcpkg not returning 0 on success. displayName: VCPKG install headers inputs: script: | call vcpkg install directxmath - REM @if ERRORLEVEL 1 goto error + @if ERRORLEVEL 1 goto error call vcpkg install directx-headers - REM @if ERRORLEVEL 1 goto error + @if ERRORLEVEL 1 goto error :finish @echo --- VCPKG COMPLETE --- exit /b 0 @@ -203,9 +202,9 @@ jobs: inputs: script: | call vcpkg install directxmath - REM @if ERRORLEVEL 1 goto error + @if ERRORLEVEL 1 goto error call vcpkg install directx-headers - REM @if ERRORLEVEL 1 goto error + @if ERRORLEVEL 1 goto error :finish @echo --- VCPKG COMPLETE --- exit /b 0