Skip to content

Commit 7c112fa

Browse files
authored
Merge pull request #7 from llvm-beanz/revert-4-dsets
Revert "Fix setting root descriptor table"
2 parents 7a682c8 + 215868f commit 7c112fa

File tree

2 files changed

+7
-66
lines changed

2 files changed

+7
-66
lines changed

lib/API/DX/Device.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -513,14 +513,16 @@ class DXDevice : public hlsltest::Device {
513513

514514
uint32_t Inc = Device->GetDescriptorHandleIncrementSize(
515515
D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);
516-
CD3DX12_GPU_DESCRIPTOR_HANDLE Handle{
517-
IS.DescHeap->GetGPUDescriptorHandleForHeapStart()};
518516

519-
for (uint32_t Idx = 0; Idx < P.Sets.size(); ++Idx) {
517+
uint32_t Offset = 0;
518+
for (uint32_t Idx = 0; Idx < P.Sets.size(); ++Idx, Offset += Inc) {
519+
D3D12_GPU_DESCRIPTOR_HANDLE Handle =
520+
IS.DescHeap->GetGPUDescriptorHandleForHeapStart();
521+
Handle.ptr += Offset;
520522
IS.CmdList->SetComputeRootDescriptorTable(Idx, Handle);
521-
Handle.Offset(P.Sets[Idx].Resources.size(), Inc);
523+
// TODO: This probably computes the wrong offsets if I have multiple
524+
// descriptor tables in use.
522525
}
523-
524526
IS.CmdList->Dispatch(P.DispatchSize[0], P.DispatchSize[1],
525527
P.DispatchSize[2]);
526528

test/Basic/DescriptorSets.test

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)