@@ -504,14 +504,8 @@ class DXDevice : public hlsltest::Device {
504
504
return waitForSignal (IS);
505
505
}
506
506
507
- llvm::Error createComputeCommands (Pipeline &P, InvocationState &IS) {
508
- if (auto Err =
509
- HR::toError (IS.Allocator ->Reset (), " Failed to reset allocator." ))
510
- return Err;
511
- if (auto Err = HR::toError (IS.CmdList ->Reset (IS.Allocator , IS.PSO ),
512
- " Failed to reset command list." ))
513
- return Err;
514
-
507
+ void createComputeCommands (Pipeline &P, InvocationState &IS) {
508
+ IS.CmdList ->SetPipelineState (IS.PSO );
515
509
IS.CmdList ->SetComputeRootSignature (IS.RootSig );
516
510
517
511
ID3D12DescriptorHeap *const Heaps[] = {IS.DescHeap };
@@ -537,8 +531,6 @@ class DXDevice : public hlsltest::Device {
537
531
IS.CmdList ->CopyResource (Out.second .Readback , Out.second .Buffer );
538
532
addReadbackEndBarrier (IS, Out.second .Buffer );
539
533
}
540
-
541
- return llvm::Error::success ();
542
534
}
543
535
544
536
llvm::Error readBack (Pipeline &P, InvocationState &IS) {
@@ -587,11 +579,7 @@ class DXDevice : public hlsltest::Device {
587
579
if (auto Err = createEvent (State))
588
580
return Err;
589
581
llvm::outs () << " Event prepared.\n " ;
590
- if (auto Err = executeCommandList (State))
591
- return Err;
592
- llvm::outs () << " Preparation commands executed.\n " ;
593
- if (auto Err = createComputeCommands (P, State))
594
- return Err;
582
+ createComputeCommands (P, State);
595
583
llvm::outs () << " Compute command list created.\n " ;
596
584
if (auto Err = executeCommandList (State))
597
585
return Err;
0 commit comments