Merge pull request #1658 from billhollings/fix-query-pool-wait-block
Fix query pool wait block when query is not encoded to be written to.
This commit is contained in:
commit
ed1f1f4866
@ -27,6 +27,7 @@ Released TBD
|
|||||||
- Work around MTLCounterSet crash on additional Intel Iris Plus Graphics drivers.
|
- Work around MTLCounterSet crash on additional Intel Iris Plus Graphics drivers.
|
||||||
- Check `MTLDevice` to enable support for `VK_KHR_fragment_shader_barycentric`
|
- Check `MTLDevice` to enable support for `VK_KHR_fragment_shader_barycentric`
|
||||||
and `VK_NV_fragment_shader_barycentric` extensions.
|
and `VK_NV_fragment_shader_barycentric` extensions.
|
||||||
|
- Fix query pool wait block when query is not encoded to be written to.
|
||||||
- Update `VK_MVK_MOLTENVK_SPEC_VERSION` to version `35`.
|
- Update `VK_MVK_MOLTENVK_SPEC_VERSION` to version `35`.
|
||||||
|
|
||||||
|
|
||||||
|
@ -107,12 +107,16 @@ bool MVKQueryPool::areQueriesDeviceAvailable(uint32_t firstQuery, uint32_t endQu
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns whether all the queries between the start (inclusive) and end (exclusive) queries are available.
|
// Returns whether any queries between the start (inclusive) and end (exclusive) queries,
|
||||||
|
// that were encoded to be written to by an earlier EndQuery or Timestamp command, are now available.
|
||||||
|
// Queries that were not encoded to be written, will be in Initial state.
|
||||||
|
// Queries that were encoded to be written, and are available, will be in Available state.
|
||||||
|
// Queries that were encoded to be written, but are not available, will be in DeviceAvailable state.
|
||||||
bool MVKQueryPool::areQueriesHostAvailable(uint32_t firstQuery, uint32_t endQuery) {
|
bool MVKQueryPool::areQueriesHostAvailable(uint32_t firstQuery, uint32_t endQuery) {
|
||||||
// If we lost the device, stop waiting immediately.
|
// If we lost the device, stop waiting immediately.
|
||||||
if (_device->getConfigurationResult() != VK_SUCCESS) { return true; }
|
if (_device->getConfigurationResult() != VK_SUCCESS) { return true; }
|
||||||
for (uint32_t query = firstQuery; query < endQuery; query++) {
|
for (uint32_t query = firstQuery; query < endQuery; query++) {
|
||||||
if ( _availability[query] < Available ) { return false; }
|
if (_availability[query] == DeviceAvailable) { return false; }
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user