diff options
| author | 2023-08-04 03:32:30 +0200 | |
|---|---|---|
| committer | 2023-09-23 23:05:29 +0200 | |
| commit | f1a2e367113518b277f34ffbb04499882c3b6051 (patch) | |
| tree | 0920a98bd359b9207130d01f6df4ae5135ec805c /src/video_core/renderer_null | |
| parent | Query Cache: Setup Base rework (diff) | |
| download | yuzu-f1a2e367113518b277f34ffbb04499882c3b6051.tar.gz yuzu-f1a2e367113518b277f34ffbb04499882c3b6051.tar.xz yuzu-f1a2e367113518b277f34ffbb04499882c3b6051.zip | |
Query Cachge: Fully rework Vulkan's query cache
Diffstat (limited to 'src/video_core/renderer_null')
| -rw-r--r-- | src/video_core/renderer_null/null_rasterizer.cpp | 18 | ||||
| -rw-r--r-- | src/video_core/renderer_null/null_rasterizer.h | 6 |
2 files changed, 13 insertions, 11 deletions
diff --git a/src/video_core/renderer_null/null_rasterizer.cpp b/src/video_core/renderer_null/null_rasterizer.cpp index 92ecf6682..65cd5aa06 100644 --- a/src/video_core/renderer_null/null_rasterizer.cpp +++ b/src/video_core/renderer_null/null_rasterizer.cpp | |||
| @@ -26,16 +26,18 @@ void RasterizerNull::Draw(bool is_indexed, u32 instance_count) {} | |||
| 26 | void RasterizerNull::DrawTexture() {} | 26 | void RasterizerNull::DrawTexture() {} |
| 27 | void RasterizerNull::Clear(u32 layer_count) {} | 27 | void RasterizerNull::Clear(u32 layer_count) {} |
| 28 | void RasterizerNull::DispatchCompute() {} | 28 | void RasterizerNull::DispatchCompute() {} |
| 29 | void RasterizerNull::ResetCounter(VideoCore::QueryType type) {} | 29 | void RasterizerNull::ResetCounter(VideoCommon::QueryType type) {} |
| 30 | void RasterizerNull::Query(GPUVAddr gpu_addr, VideoCore::QueryType type, | 30 | void RasterizerNull::Query(GPUVAddr gpu_addr, VideoCommon::QueryType type, |
| 31 | std::optional<u64> timestamp) { | 31 | VideoCommon::QueryPropertiesFlags flags, u32 payload, u32 subreport) { |
| 32 | if (!gpu_memory) { | 32 | if (!gpu_memory) { |
| 33 | return; | 33 | return; |
| 34 | } | 34 | } |
| 35 | 35 | if (True(flags & VideoCommon::QueryPropertiesFlags::HasTimeout)) { | |
| 36 | gpu_memory->Write(gpu_addr, u64{0}); | 36 | u64 ticks = m_gpu.GetTicks(); |
| 37 | if (timestamp) { | 37 | gpu_memory->Write<u64>(gpu_addr + 8, ticks); |
| 38 | gpu_memory->Write(gpu_addr + 8, *timestamp); | 38 | gpu_memory->Write<u64>(gpu_addr, static_cast<u64>(payload)); |
| 39 | } else { | ||
| 40 | gpu_memory->Write<u32>(gpu_addr, payload); | ||
| 39 | } | 41 | } |
| 40 | } | 42 | } |
| 41 | void RasterizerNull::BindGraphicsUniformBuffer(size_t stage, u32 index, GPUVAddr gpu_addr, | 43 | void RasterizerNull::BindGraphicsUniformBuffer(size_t stage, u32 index, GPUVAddr gpu_addr, |
| @@ -74,7 +76,7 @@ void RasterizerNull::SignalSyncPoint(u32 value) { | |||
| 74 | syncpoint_manager.IncrementHost(value); | 76 | syncpoint_manager.IncrementHost(value); |
| 75 | } | 77 | } |
| 76 | void RasterizerNull::SignalReference() {} | 78 | void RasterizerNull::SignalReference() {} |
| 77 | void RasterizerNull::ReleaseFences() {} | 79 | void RasterizerNull::ReleaseFences(bool) {} |
| 78 | void RasterizerNull::FlushAndInvalidateRegion(VAddr addr, u64 size, VideoCommon::CacheType) {} | 80 | void RasterizerNull::FlushAndInvalidateRegion(VAddr addr, u64 size, VideoCommon::CacheType) {} |
| 79 | void RasterizerNull::WaitForIdle() {} | 81 | void RasterizerNull::WaitForIdle() {} |
| 80 | void RasterizerNull::FragmentBarrier() {} | 82 | void RasterizerNull::FragmentBarrier() {} |
diff --git a/src/video_core/renderer_null/null_rasterizer.h b/src/video_core/renderer_null/null_rasterizer.h index 93b9a6971..57a8c4c85 100644 --- a/src/video_core/renderer_null/null_rasterizer.h +++ b/src/video_core/renderer_null/null_rasterizer.h | |||
| @@ -42,8 +42,8 @@ public: | |||
| 42 | void DrawTexture() override; | 42 | void DrawTexture() override; |
| 43 | void Clear(u32 layer_count) override; | 43 | void Clear(u32 layer_count) override; |
| 44 | void DispatchCompute() override; | 44 | void DispatchCompute() override; |
| 45 | void ResetCounter(VideoCore::QueryType type) override; | 45 | void ResetCounter(VideoCommon::QueryType type) override; |
| 46 | void Query(GPUVAddr gpu_addr, VideoCore::QueryType type, std::optional<u64> timestamp) override; | 46 | void Query(GPUVAddr gpu_addr, VideoCommon::QueryType type, VideoCommon::QueryPropertiesFlags flags, u32 payload, u32 subreport) override; |
| 47 | void BindGraphicsUniformBuffer(size_t stage, u32 index, GPUVAddr gpu_addr, u32 size) override; | 47 | void BindGraphicsUniformBuffer(size_t stage, u32 index, GPUVAddr gpu_addr, u32 size) override; |
| 48 | void DisableGraphicsUniformBuffer(size_t stage, u32 index) override; | 48 | void DisableGraphicsUniformBuffer(size_t stage, u32 index) override; |
| 49 | void FlushAll() override; | 49 | void FlushAll() override; |
| @@ -63,7 +63,7 @@ public: | |||
| 63 | void SyncOperation(std::function<void()>&& func) override; | 63 | void SyncOperation(std::function<void()>&& func) override; |
| 64 | void SignalSyncPoint(u32 value) override; | 64 | void SignalSyncPoint(u32 value) override; |
| 65 | void SignalReference() override; | 65 | void SignalReference() override; |
| 66 | void ReleaseFences() override; | 66 | void ReleaseFences(bool force) override; |
| 67 | void FlushAndInvalidateRegion( | 67 | void FlushAndInvalidateRegion( |
| 68 | VAddr addr, u64 size, VideoCommon::CacheType which = VideoCommon::CacheType::All) override; | 68 | VAddr addr, u64 size, VideoCommon::CacheType which = VideoCommon::CacheType::All) override; |
| 69 | void WaitForIdle() override; | 69 | void WaitForIdle() override; |