Vulkan: Prevent submission of command buffer with open queries

This commit is contained in:
Stenzek 2019-04-01 20:49:39 +10:00
parent f2d8c8d2a8
commit 474500f07e

View File

@ -45,6 +45,10 @@ void PerfQuery::EnableQuery(PerfQueryGroup type)
if (m_query_count > m_query_buffer.size() / 2)
PartialFlush(m_query_count == PERF_QUERY_BUFFER_SIZE);
// Ensure command buffer is ready to go before beginning the query, that way we don't submit
// a buffer with open queries.
StateTracker::GetInstance()->Bind();
if (type == PQG_ZCOMP_ZCOMPLOC || type == PQG_ZCOMP)
{
ActiveQuery& entry = m_query_buffer[m_query_next_pos];