MCPcopy Create free account
hub / github.com/crosire/reshade / ExecuteCommandLists

Method ExecuteCommandLists

source/d3d12/d3d12_command_queue.cpp:179–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177 _orig->CopyTileMappings(pDstResource, pDstRegionStartCoordinate, pSrcResource, pSrcRegionStartCoordinate, pRegionSize, Flags);
178}
179void STDMETHODCALLTYPE D3D12CommandQueue::ExecuteCommandLists(UINT NumCommandLists, ID3D12CommandList *const *ppCommandLists)
180{
181 // Synchronize access to this command queue while events are invoked and the immediate command list may be accessed
182 std::unique_lock<std::recursive_mutex> lock(_mutex);
183
184 temp_mem<ID3D12CommandList *> command_lists(NumCommandLists);
185 for (UINT i = 0; i < NumCommandLists; ++i)
186 {
187 assert(ppCommandLists[i] != nullptr);
188
189 if (com_ptr<D3D12GraphicsCommandList> command_list_proxy;
190 SUCCEEDED(ppCommandLists[i]->QueryInterface(&command_list_proxy)))
191 {
192#if RESHADE_ADDON
193 reshade::invoke_addon_event<reshade::addon_event::execute_command_list>(this, command_list_proxy.get());
194#endif
195
196 // Get original command list pointer from proxy object
197 command_lists[i] = command_list_proxy->_orig;
198 }
199 else
200 {
201 // This can be a compute command list too, which have no proxy object
202 command_lists[i] = ppCommandLists[i];
203 }
204 }
205
206 flush_immediate_command_list();
207
208 lock.unlock();
209
210 _orig->ExecuteCommandLists(NumCommandLists, command_lists.p);
211}
212void STDMETHODCALLTYPE D3D12CommandQueue::SetMarker(UINT Metadata, const void *pData, UINT Size)
213{
214 _orig->SetMarker(Metadata, pData, Size);

Callers 2

WinMainFunction · 0.80
flushMethod · 0.80

Calls 2

QueryInterfaceMethod · 0.45
getMethod · 0.45

Tested by 1

WinMainFunction · 0.64