MCPcopy Create free account
hub / github.com/Apress/Ray-Tracing-Gems-II / ResetCommandList

Function ResetCommandList

Chapter_14/src/Graphics.cpp:876–885  ·  view source on GitHub ↗

* Reset the command list. */

Source from the content-addressed store, hash-verified

874* Reset the command list.
875*/
876void ResetCommandList(D3D12Global &d3d)
877{
878 // Reset the command allocator for the current frame
879 HRESULT hr = d3d.cmdAlloc[d3d.frameIndex]->Reset();
880 Utils::Validate(hr, L"Error: failed to reset command allocator!");
881
882 // Reset the command list for the current frame
883 hr = d3d.cmdList->Reset(d3d.cmdAlloc[d3d.frameIndex], nullptr);
884 Utils::Validate(hr, L"Error: failed to reset command list!");
885}
886
887/*
888* Submit the command list.

Callers 2

InitMethod · 0.85
RenderMethod · 0.85

Calls 2

ValidateFunction · 0.85
ResetMethod · 0.45

Tested by

no test coverage detected