diff --git a/tools/clang/unittests/HLSLExec/HlslExecTestUtils.cpp b/tools/clang/unittests/HLSLExec/HlslExecTestUtils.cpp index cf00afc2bf..b1197f4d6c 100644 --- a/tools/clang/unittests/HLSLExec/HlslExecTestUtils.cpp +++ b/tools/clang/unittests/HLSLExec/HlslExecTestUtils.cpp @@ -860,9 +860,10 @@ void addSRVBuffer(st::ShaderOp *Op, const char *Name, UINT64 Width, Res.Desc.MipLevels = 1; Res.Desc.SampleDesc.Count = 1; Res.Desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR; - Res.Desc.Flags = D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS; + Res.Desc.Flags = D3D12_RESOURCE_FLAG_NONE; Res.InitialResourceState = D3D12_RESOURCE_STATE_COPY_DEST; - Res.TransitionTo = D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE; + Res.TransitionTo = D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE | + D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE; Op->Resources.push_back(Res); } diff --git a/tools/clang/unittests/HLSLExec/ShaderOpTest.cpp b/tools/clang/unittests/HLSLExec/ShaderOpTest.cpp index 62bf7f5155..6531fc85fc 100644 --- a/tools/clang/unittests/HLSLExec/ShaderOpTest.cpp +++ b/tools/clang/unittests/HLSLExec/ShaderOpTest.cpp @@ -587,7 +587,8 @@ void ShaderOpTest::CreatePipelineState() { void ShaderOpTest::CreateResources() { CommandListRefs ResCommandList; - ResCommandList.CreateForDevice(m_pDevice, true); + // Graphics-only transition states require a DIRECT list. + ResCommandList.CreateForDevice(m_pDevice, /*compute*/ false); ResCommandList.Allocator->SetName( L"ShaderOpTest Resource Creation Allocation"); ResCommandList.Queue->SetName(L"ShaderOpTest Resource Creation Queue");