summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/query_cache/query_cache.h13
-rw-r--r--src/video_core/renderer_vulkan/vk_query_cache.cpp10
2 files changed, 23 insertions, 0 deletions
diff --git a/src/video_core/query_cache/query_cache.h b/src/video_core/query_cache/query_cache.h
index 4b89b5bf6..78b42b518 100644
--- a/src/video_core/query_cache/query_cache.h
+++ b/src/video_core/query_cache/query_cache.h
@@ -256,6 +256,7 @@ void QueryCacheBase<Traits>::CounterReport(GPUVAddr addr, QueryType counter_type
256 u8* pointer = impl->cpu_memory.GetPointer(cpu_addr); 256 u8* pointer = impl->cpu_memory.GetPointer(cpu_addr);
257 u8* pointer_timestamp = impl->cpu_memory.GetPointer(cpu_addr + 8); 257 u8* pointer_timestamp = impl->cpu_memory.GetPointer(cpu_addr + 8);
258 bool is_synced = !Settings::IsGPULevelHigh() && is_fence; 258 bool is_synced = !Settings::IsGPULevelHigh() && is_fence;
259
259 std::function<void()> operation([this, is_synced, streamer, query_base = query, query_location, 260 std::function<void()> operation([this, is_synced, streamer, query_base = query, query_location,
260 pointer, pointer_timestamp] { 261 pointer, pointer_timestamp] {
261 if (True(query_base->flags & QueryFlagBits::IsInvalidated)) { 262 if (True(query_base->flags & QueryFlagBits::IsInvalidated)) {
@@ -285,6 +286,18 @@ void QueryCacheBase<Traits>::CounterReport(GPUVAddr addr, QueryType counter_type
285 if (is_fence) { 286 if (is_fence) {
286 impl->rasterizer.SignalFence(std::move(operation)); 287 impl->rasterizer.SignalFence(std::move(operation));
287 } else { 288 } else {
289 if (!Settings::IsGPULevelHigh() && counter_type == QueryType::Payload) {
290 if (has_timestamp) {
291 u64 timestamp = impl->gpu.GetTicks();
292 u64 value = static_cast<u64>(payload);
293 std::memcpy(pointer_timestamp, &timestamp, sizeof(timestamp));
294 std::memcpy(pointer, &value, sizeof(value));
295 } else {
296 std::memcpy(pointer, &payload, sizeof(payload));
297 }
298 streamer->Free(new_query_id);
299 return;
300 }
288 impl->rasterizer.SyncOperation(std::move(operation)); 301 impl->rasterizer.SyncOperation(std::move(operation));
289 } 302 }
290 if (is_synced) { 303 if (is_synced) {
diff --git a/src/video_core/renderer_vulkan/vk_query_cache.cpp b/src/video_core/renderer_vulkan/vk_query_cache.cpp
index 825e1a72e..2cc007716 100644
--- a/src/video_core/renderer_vulkan/vk_query_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_query_cache.cpp
@@ -1365,6 +1365,11 @@ bool QueryCacheRuntime::HostConditionalRenderingCompareValues(VideoCommon::Looku
1365 return false; 1365 return false;
1366 } 1366 }
1367 1367
1368 const bool is_gpu_high = Settings::IsGPULevelHigh();
1369 if (!is_gpu_high && impl->device.GetDriverID() == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS) {
1370 return true;
1371 }
1372
1368 for (size_t i = 0; i < 2; i++) { 1373 for (size_t i = 0; i < 2; i++) {
1369 is_null[i] = !is_in_ac[i] && check_value(objects[i]->address); 1374 is_null[i] = !is_in_ac[i] && check_value(objects[i]->address);
1370 } 1375 }
@@ -1376,6 +1381,11 @@ bool QueryCacheRuntime::HostConditionalRenderingCompareValues(VideoCommon::Looku
1376 return true; 1381 return true;
1377 } 1382 }
1378 } 1383 }
1384
1385 if (!is_gpu_high) {
1386 return true;
1387 }
1388
1379 if (!is_in_bc[0] && !is_in_bc[1]) { 1389 if (!is_in_bc[0] && !is_in_bc[1]) {
1380 // Both queries are in query cache, it's best to just flush. 1390 // Both queries are in query cache, it's best to just flush.
1381 return true; 1391 return true;