mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-27 17:58:59 +02:00
[vk] CounterStreamer
This commit is contained in:
parent
f8d93780b5
commit
1a75757bbf
4 changed files with 18 additions and 7 deletions
|
|
@ -211,6 +211,12 @@ void QueryCacheBase<Traits>::CounterClose(QueryType counter_type) {
|
||||||
streamer->CloseCounter();
|
streamer->CloseCounter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename Traits>
|
||||||
|
bool QueryCacheBase<Traits>::HasStreamer(QueryType counter_type) const {
|
||||||
|
const size_t index = static_cast<size_t>(counter_type);
|
||||||
|
return impl->streamers[index] != nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename Traits>
|
template <typename Traits>
|
||||||
void QueryCacheBase<Traits>::CounterReset(QueryType counter_type) {
|
void QueryCacheBase<Traits>::CounterReset(QueryType counter_type) {
|
||||||
size_t index = static_cast<size_t>(counter_type);
|
size_t index = static_cast<size_t>(counter_type);
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
|
@ -92,6 +95,8 @@ public:
|
||||||
|
|
||||||
void CounterReset(QueryType counter_type);
|
void CounterReset(QueryType counter_type);
|
||||||
|
|
||||||
|
[[nodiscard]] bool HasStreamer(QueryType counter_type) const;
|
||||||
|
|
||||||
void CounterClose(QueryType counter_type);
|
void CounterClose(QueryType counter_type);
|
||||||
|
|
||||||
void CounterReport(GPUVAddr addr, QueryType counter_type, QueryPropertiesFlags flags,
|
void CounterReport(GPUVAddr addr, QueryType counter_type, QueryPropertiesFlags flags,
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,7 @@ void Scheduler::CommandChunk::ExecuteAll(vk::CommandBuffer cmdbuf,
|
||||||
}
|
}
|
||||||
|
|
||||||
Scheduler::Scheduler(const Device& device_, StateTracker& state_tracker_)
|
Scheduler::Scheduler(const Device& device_, StateTracker& state_tracker_)
|
||||||
: device{device_}, supports_transform_feedback{device_.IsExtTransformFeedbackSupported()},
|
: device{device_}, state_tracker{state_tracker_},
|
||||||
state_tracker{state_tracker_},
|
|
||||||
master_semaphore{std::make_unique<MasterSemaphore>(device)},
|
master_semaphore{std::make_unique<MasterSemaphore>(device)},
|
||||||
command_pool{std::make_unique<CommandPool>(*master_semaphore, device)} {
|
command_pool{std::make_unique<CommandPool>(*master_semaphore, device)} {
|
||||||
AcquireNewChunk();
|
AcquireNewChunk();
|
||||||
|
|
@ -296,11 +295,13 @@ void Scheduler::EndRenderPass()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
query_cache->CounterEnable(VideoCommon::QueryType::ZPassPixelCount64, false);
|
if (query_cache) {
|
||||||
if (supports_transform_feedback) {
|
query_cache->CounterEnable(VideoCommon::QueryType::ZPassPixelCount64, false);
|
||||||
query_cache->CounterEnable(VideoCommon::QueryType::StreamingByteCount, false);
|
if (query_cache->HasStreamer(VideoCommon::QueryType::StreamingByteCount)) {
|
||||||
|
query_cache->CounterEnable(VideoCommon::QueryType::StreamingByteCount, false);
|
||||||
|
}
|
||||||
|
query_cache->NotifySegment(false);
|
||||||
}
|
}
|
||||||
query_cache->NotifySegment(false);
|
|
||||||
|
|
||||||
Record([num_images = num_renderpass_images,
|
Record([num_images = num_renderpass_images,
|
||||||
images = renderpass_images,
|
images = renderpass_images,
|
||||||
|
|
|
||||||
|
|
@ -235,7 +235,6 @@ private:
|
||||||
void AcquireNewChunk();
|
void AcquireNewChunk();
|
||||||
|
|
||||||
const Device& device;
|
const Device& device;
|
||||||
const bool supports_transform_feedback;
|
|
||||||
StateTracker& state_tracker;
|
StateTracker& state_tracker;
|
||||||
|
|
||||||
std::unique_ptr<MasterSemaphore> master_semaphore;
|
std::unique_ptr<MasterSemaphore> master_semaphore;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue