* Reset the command list. */
| 874 | * Reset the command list. |
| 875 | */ |
| 876 | void 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. |