diff options
| author | 2020-02-18 11:31:06 -0400 | |
|---|---|---|
| committer | 2020-02-18 11:31:06 -0400 | |
| commit | 93acfbd3a5c0e52a0031cc2d0475c82449e0f340 (patch) | |
| tree | 5f49c1d148aa64551bfb792f9702e567a2e5547f /src/video_core/rasterizer_interface.h | |
| parent | Merge pull request #3412 from Morph1984/aspect-ratio (diff) | |
| parent | query_cache: Address feedback (diff) | |
| download | yuzu-93acfbd3a5c0e52a0031cc2d0475c82449e0f340.tar.gz yuzu-93acfbd3a5c0e52a0031cc2d0475c82449e0f340.tar.xz yuzu-93acfbd3a5c0e52a0031cc2d0475c82449e0f340.zip | |
Merge pull request #3409 from ReinUsesLisp/host-queries
query_cache: Implement a query cache and query 21 (samples passed)
Diffstat (limited to 'src/video_core/rasterizer_interface.h')
| -rw-r--r-- | src/video_core/rasterizer_interface.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/video_core/rasterizer_interface.h b/src/video_core/rasterizer_interface.h index c586cd6fe..e9f1436f0 100644 --- a/src/video_core/rasterizer_interface.h +++ b/src/video_core/rasterizer_interface.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <atomic> | 7 | #include <atomic> |
| 8 | #include <functional> | 8 | #include <functional> |
| 9 | #include <optional> | ||
| 9 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 10 | #include "video_core/engines/fermi_2d.h" | 11 | #include "video_core/engines/fermi_2d.h" |
| 11 | #include "video_core/gpu.h" | 12 | #include "video_core/gpu.h" |
| @@ -17,6 +18,11 @@ class MemoryManager; | |||
| 17 | 18 | ||
| 18 | namespace VideoCore { | 19 | namespace VideoCore { |
| 19 | 20 | ||
| 21 | enum class QueryType { | ||
| 22 | SamplesPassed, | ||
| 23 | }; | ||
| 24 | constexpr std::size_t NumQueryTypes = 1; | ||
| 25 | |||
| 20 | enum class LoadCallbackStage { | 26 | enum class LoadCallbackStage { |
| 21 | Prepare, | 27 | Prepare, |
| 22 | Decompile, | 28 | Decompile, |
| @@ -41,6 +47,12 @@ public: | |||
| 41 | /// Dispatches a compute shader invocation | 47 | /// Dispatches a compute shader invocation |
| 42 | virtual void DispatchCompute(GPUVAddr code_addr) = 0; | 48 | virtual void DispatchCompute(GPUVAddr code_addr) = 0; |
| 43 | 49 | ||
| 50 | /// Resets the counter of a query | ||
| 51 | virtual void ResetCounter(QueryType type) = 0; | ||
| 52 | |||
| 53 | /// Records a GPU query and caches it | ||
| 54 | virtual void Query(GPUVAddr gpu_addr, QueryType type, std::optional<u64> timestamp) = 0; | ||
| 55 | |||
| 44 | /// Notify rasterizer that all caches should be flushed to Switch memory | 56 | /// Notify rasterizer that all caches should be flushed to Switch memory |
| 45 | virtual void FlushAll() = 0; | 57 | virtual void FlushAll() = 0; |
| 46 | 58 | ||