Query Cache: Fix behavior in Normal Accuracy
This commit is contained in:
parent
a07c88e686
commit
bf0d6b8806
|
@ -256,6 +256,7 @@ void QueryCacheBase<Traits>::CounterReport(GPUVAddr addr, QueryType counter_type
|
||||||
u8* pointer = impl->cpu_memory.GetPointer(cpu_addr);
|
u8* pointer = impl->cpu_memory.GetPointer(cpu_addr);
|
||||||
u8* pointer_timestamp = impl->cpu_memory.GetPointer(cpu_addr + 8);
|
u8* pointer_timestamp = impl->cpu_memory.GetPointer(cpu_addr + 8);
|
||||||
bool is_synced = !Settings::IsGPULevelHigh() && is_fence;
|
bool is_synced = !Settings::IsGPULevelHigh() && is_fence;
|
||||||
|
|
||||||
std::function<void()> operation([this, is_synced, streamer, query_base = query, query_location,
|
std::function<void()> operation([this, is_synced, streamer, query_base = query, query_location,
|
||||||
pointer, pointer_timestamp] {
|
pointer, pointer_timestamp] {
|
||||||
if (True(query_base->flags & QueryFlagBits::IsInvalidated)) {
|
if (True(query_base->flags & QueryFlagBits::IsInvalidated)) {
|
||||||
|
@ -285,6 +286,18 @@ void QueryCacheBase<Traits>::CounterReport(GPUVAddr addr, QueryType counter_type
|
||||||
if (is_fence) {
|
if (is_fence) {
|
||||||
impl->rasterizer.SignalFence(std::move(operation));
|
impl->rasterizer.SignalFence(std::move(operation));
|
||||||
} else {
|
} else {
|
||||||
|
if (!Settings::IsGPULevelHigh() && counter_type == QueryType::Payload) {
|
||||||
|
if (has_timestamp) {
|
||||||
|
u64 timestamp = impl->gpu.GetTicks();
|
||||||
|
u64 value = static_cast<u64>(payload);
|
||||||
|
std::memcpy(pointer_timestamp, ×tamp, sizeof(timestamp));
|
||||||
|
std::memcpy(pointer, &value, sizeof(value));
|
||||||
|
} else {
|
||||||
|
std::memcpy(pointer, &payload, sizeof(payload));
|
||||||
|
}
|
||||||
|
streamer->Free(new_query_id);
|
||||||
|
return;
|
||||||
|
}
|
||||||
impl->rasterizer.SyncOperation(std::move(operation));
|
impl->rasterizer.SyncOperation(std::move(operation));
|
||||||
}
|
}
|
||||||
if (is_synced) {
|
if (is_synced) {
|
||||||
|
|
|
@ -1365,6 +1365,11 @@ bool QueryCacheRuntime::HostConditionalRenderingCompareValues(VideoCommon::Looku
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool is_gpu_high = Settings::IsGPULevelHigh();
|
||||||
|
if (!is_gpu_high && impl->device.GetDriverID() == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < 2; i++) {
|
for (size_t i = 0; i < 2; i++) {
|
||||||
is_null[i] = !is_in_ac[i] && check_value(objects[i]->address);
|
is_null[i] = !is_in_ac[i] && check_value(objects[i]->address);
|
||||||
}
|
}
|
||||||
|
@ -1376,6 +1381,11 @@ bool QueryCacheRuntime::HostConditionalRenderingCompareValues(VideoCommon::Looku
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!is_gpu_high) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!is_in_bc[0] && !is_in_bc[1]) {
|
if (!is_in_bc[0] && !is_in_bc[1]) {
|
||||||
// Both queries are in query cache, it's best to just flush.
|
// Both queries are in query cache, it's best to just flush.
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue