mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
D3D12: Fix rare case where command list was executed with open queries
This commit is contained in:
@ -57,6 +57,12 @@ void PerfQuery::EnableQuery(PerfQueryGroup type)
|
||||
PartialFlush(do_resolve, blocking);
|
||||
}
|
||||
|
||||
// Ensure all state is applied before beginning the query.
|
||||
// This is because we can't leave a query open when submitting a command list, and the draw
|
||||
// call itself may need to execute a command list if we run out of descriptors. Note that
|
||||
// this assumes that the caller has bound all required state prior to enabling the query.
|
||||
Renderer::GetInstance()->ApplyState();
|
||||
|
||||
if (type == PQG_ZCOMP_ZCOMPLOC || type == PQG_ZCOMP)
|
||||
{
|
||||
ActiveQuery& entry = m_query_buffer[m_query_next_pos];
|
||||
|
@ -89,6 +89,9 @@ public:
|
||||
void SetVertexBuffer(D3D12_GPU_VIRTUAL_ADDRESS address, u32 stride, u32 size);
|
||||
void SetIndexBuffer(D3D12_GPU_VIRTUAL_ADDRESS address, u32 size, DXGI_FORMAT format);
|
||||
|
||||
// Binds all dirty state
|
||||
bool ApplyState();
|
||||
|
||||
protected:
|
||||
void OnConfigChanged(u32 bits) override;
|
||||
|
||||
@ -131,8 +134,6 @@ private:
|
||||
|
||||
void CheckForSwapChainChanges();
|
||||
|
||||
// Binds all dirty state
|
||||
bool ApplyState();
|
||||
void BindFramebuffer(DXFramebuffer* fb);
|
||||
void SetRootSignatures();
|
||||
void SetDescriptorHeaps();
|
||||
|
Reference in New Issue
Block a user