File tree Expand file tree Collapse file tree 2 files changed +7
-66
lines changed Expand file tree Collapse file tree 2 files changed +7
-66
lines changed Original file line number Diff line number Diff line change @@ -513,14 +513,16 @@ class DXDevice : public hlsltest::Device {
513
513
514
514
uint32_t Inc = Device->GetDescriptorHandleIncrementSize (
515
515
D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);
516
- CD3DX12_GPU_DESCRIPTOR_HANDLE Handle{
517
- IS.DescHeap ->GetGPUDescriptorHandleForHeapStart ()};
518
516
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;
520
522
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.
522
525
}
523
-
524
526
IS.CmdList ->Dispatch (P.DispatchSize [0 ], P.DispatchSize [1 ],
525
527
P.DispatchSize [2 ]);
526
528
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments