mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-01 15:08:57 +02:00
payload based fence sync
This commit is contained in:
parent
5322bce4b8
commit
a9cabafbdf
1 changed files with 10 additions and 3 deletions
|
|
@ -260,7 +260,8 @@ void QueryCacheBase<Traits>::CounterReport(GPUVAddr addr, QueryType counter_type
|
||||||
};
|
};
|
||||||
u8* pointer = impl->device_memory.template GetPointer<u8>(cpu_addr);
|
u8* pointer = impl->device_memory.template GetPointer<u8>(cpu_addr);
|
||||||
u8* pointer_timestamp = impl->device_memory.template GetPointer<u8>(cpu_addr + 8);
|
u8* pointer_timestamp = impl->device_memory.template GetPointer<u8>(cpu_addr + 8);
|
||||||
bool is_synced = !Settings::IsGPULevelHigh() && is_fence;
|
const bool is_payload = counter_type == QueryType::Payload;
|
||||||
|
const bool is_synced = !(Settings::getDebugKnobAt(0) && is_payload) && !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)) {
|
||||||
|
|
@ -292,9 +293,15 @@ void QueryCacheBase<Traits>::CounterReport(GPUVAddr addr, QueryType counter_type
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (is_fence) {
|
if (is_fence) {
|
||||||
impl->rasterizer.SignalFence(std::move(operation));
|
if (Settings::getDebugKnobAt(0) && is_payload) {
|
||||||
|
impl->rasterizer.SyncOperation(std::move(operation));
|
||||||
|
std::function<void()> noop([] {});
|
||||||
|
impl->rasterizer.SignalFence(std::move(noop));
|
||||||
|
} else {
|
||||||
|
impl->rasterizer.SignalFence(std::move(operation));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!Settings::IsGPULevelHigh() && counter_type == QueryType::Payload) {
|
if (!Settings::IsGPULevelHigh() && is_payload) {
|
||||||
if (has_timestamp) {
|
if (has_timestamp) {
|
||||||
u64 timestamp = impl->gpu.GetTicks();
|
u64 timestamp = impl->gpu.GetTicks();
|
||||||
u64 value = static_cast<u64>(payload);
|
u64 value = static_cast<u64>(payload);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue