Query Cachge: Fully rework Vulkan's query cache
This commit is contained in:
parent
bdc01254a9
commit
f1a2e36711
35 changed files with 1573 additions and 355 deletions
|
@ -26,16 +26,18 @@ void RasterizerNull::Draw(bool is_indexed, u32 instance_count) {}
|
|||
void RasterizerNull::DrawTexture() {}
|
||||
void RasterizerNull::Clear(u32 layer_count) {}
|
||||
void RasterizerNull::DispatchCompute() {}
|
||||
void RasterizerNull::ResetCounter(VideoCore::QueryType type) {}
|
||||
void RasterizerNull::Query(GPUVAddr gpu_addr, VideoCore::QueryType type,
|
||||
std::optional<u64> timestamp) {
|
||||
void RasterizerNull::ResetCounter(VideoCommon::QueryType type) {}
|
||||
void RasterizerNull::Query(GPUVAddr gpu_addr, VideoCommon::QueryType type,
|
||||
VideoCommon::QueryPropertiesFlags flags, u32 payload, u32 subreport) {
|
||||
if (!gpu_memory) {
|
||||
return;
|
||||
}
|
||||
|
||||
gpu_memory->Write(gpu_addr, u64{0});
|
||||
if (timestamp) {
|
||||
gpu_memory->Write(gpu_addr + 8, *timestamp);
|
||||
if (True(flags & VideoCommon::QueryPropertiesFlags::HasTimeout)) {
|
||||
u64 ticks = m_gpu.GetTicks();
|
||||
gpu_memory->Write<u64>(gpu_addr + 8, ticks);
|
||||
gpu_memory->Write<u64>(gpu_addr, static_cast<u64>(payload));
|
||||
} else {
|
||||
gpu_memory->Write<u32>(gpu_addr, payload);
|
||||
}
|
||||
}
|
||||
void RasterizerNull::BindGraphicsUniformBuffer(size_t stage, u32 index, GPUVAddr gpu_addr,
|
||||
|
@ -74,7 +76,7 @@ void RasterizerNull::SignalSyncPoint(u32 value) {
|
|||
syncpoint_manager.IncrementHost(value);
|
||||
}
|
||||
void RasterizerNull::SignalReference() {}
|
||||
void RasterizerNull::ReleaseFences() {}
|
||||
void RasterizerNull::ReleaseFences(bool) {}
|
||||
void RasterizerNull::FlushAndInvalidateRegion(VAddr addr, u64 size, VideoCommon::CacheType) {}
|
||||
void RasterizerNull::WaitForIdle() {}
|
||||
void RasterizerNull::FragmentBarrier() {}
|
||||
|
|
|
@ -42,8 +42,8 @@ public:
|
|||
void DrawTexture() override;
|
||||
void Clear(u32 layer_count) override;
|
||||
void DispatchCompute() override;
|
||||
void ResetCounter(VideoCore::QueryType type) override;
|
||||
void Query(GPUVAddr gpu_addr, VideoCore::QueryType type, std::optional<u64> timestamp) override;
|
||||
void ResetCounter(VideoCommon::QueryType type) override;
|
||||
void Query(GPUVAddr gpu_addr, VideoCommon::QueryType type, VideoCommon::QueryPropertiesFlags flags, u32 payload, u32 subreport) override;
|
||||
void BindGraphicsUniformBuffer(size_t stage, u32 index, GPUVAddr gpu_addr, u32 size) override;
|
||||
void DisableGraphicsUniformBuffer(size_t stage, u32 index) override;
|
||||
void FlushAll() override;
|
||||
|
@ -63,7 +63,7 @@ public:
|
|||
void SyncOperation(std::function<void()>&& func) override;
|
||||
void SignalSyncPoint(u32 value) override;
|
||||
void SignalReference() override;
|
||||
void ReleaseFences() override;
|
||||
void ReleaseFences(bool force) override;
|
||||
void FlushAndInvalidateRegion(
|
||||
VAddr addr, u64 size, VideoCommon::CacheType which = VideoCommon::CacheType::All) override;
|
||||
void WaitForIdle() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue