aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/rasterizer_interface.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-02-18 11:31:06 -0400
committerGitHub <noreply@github.com>2020-02-18 11:31:06 -0400
commit93acfbd3a5c0e52a0031cc2d0475c82449e0f340 (patch)
tree5f49c1d148aa64551bfb792f9702e567a2e5547f /src/video_core/rasterizer_interface.h
parent72d4c6fee0eed8bad5686f1db6043446900020d9 (diff)
parent6d3a046caa894997946736d3466855682d770d45 (diff)
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.h12
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 @@
#include <atomic>
#include <functional>
+#include <optional>
#include "common/common_types.h"
#include "video_core/engines/fermi_2d.h"
#include "video_core/gpu.h"
@@ -17,6 +18,11 @@ class MemoryManager;
namespace VideoCore {
+enum class QueryType {
+ SamplesPassed,
+};
+constexpr std::size_t NumQueryTypes = 1;
+
enum class LoadCallbackStage {
Prepare,
Decompile,
@@ -41,6 +47,12 @@ public:
/// Dispatches a compute shader invocation
virtual void DispatchCompute(GPUVAddr code_addr) = 0;
+ /// Resets the counter of a query
+ virtual void ResetCounter(QueryType type) = 0;
+
+ /// Records a GPU query and caches it
+ virtual void Query(GPUVAddr gpu_addr, QueryType type, std::optional<u64> timestamp) = 0;
+
/// Notify rasterizer that all caches should be flushed to Switch memory
virtual void FlushAll() = 0;