File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -150,8 +150,10 @@ static D3D12_RESOURCE_DESC getResourceDescription(const Resource &R) {
150150 R.isTexture () ? B.OutputProps .Width : getUAVBufferSize (R);
151151 const uint32_t Height = R.isTexture () ? B.OutputProps .Height : 1 ;
152152 D3D12_TEXTURE_LAYOUT Layout;
153- if (R.isTexture () && getDXKind (R.Kind ) == SRV)
154- Layout = D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE;
153+ if (R.isTexture ())
154+ Layout = getDXKind (R.Kind ) == SRV
155+ ? D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE
156+ : D3D12_TEXTURE_LAYOUT_UNKNOWN;
155157 else
156158 Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
157159
@@ -589,7 +591,7 @@ class DXDevice : public offloadtest::Device {
589591 HeapDesc.Alignment = D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT;
590592 HeapDesc.SizeInBytes = static_cast <UINT64>(NumTiles) *
591593 D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT;
592- HeapDesc.Flags = D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS ;
594+ HeapDesc.Flags = D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES ;
593595
594596 if (auto Err =
595597 HR::toError (Device->CreateHeap (&HeapDesc, IID_PPV_ARGS (&Heap)),
You can’t perform that action at this time.
0 commit comments