summaryrefslogtreecommitdiff
path: root/src/video_core/rasterizer_interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/rasterizer_interface.h')
-rw-r--r--src/video_core/rasterizer_interface.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/video_core/rasterizer_interface.h b/src/video_core/rasterizer_interface.h
new file mode 100644
index 000000000..008c5827b
--- /dev/null
+++ b/src/video_core/rasterizer_interface.h
@@ -0,0 +1,48 @@
1// Copyright 2015 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "common/common_types.h"
8
9namespace Pica {
10namespace Shader {
11struct OutputVertex;
12}
13}
14
15namespace VideoCore {
16
17class RasterizerInterface {
18public:
19 virtual ~RasterizerInterface() {}
20
21 /// Initialize API-specific GPU objects
22 virtual void InitObjects() = 0;
23
24 /// Reset the rasterizer, such as flushing all caches and updating all state
25 virtual void Reset() = 0;
26
27 /// Queues the primitive formed by the given vertices for rendering
28 virtual void AddTriangle(const Pica::Shader::OutputVertex& v0,
29 const Pica::Shader::OutputVertex& v1,
30 const Pica::Shader::OutputVertex& v2) = 0;
31
32 /// Draw the current batch of triangles
33 virtual void DrawTriangles() = 0;
34
35 /// Commit the rasterizer's framebuffer contents immediately to the current 3DS memory framebuffer
36 virtual void FlushFramebuffer() = 0;
37
38 /// Notify rasterizer that the specified PICA register has been changed
39 virtual void NotifyPicaRegisterChanged(u32 id) = 0;
40
41 /// Notify rasterizer that any caches of the specified region should be flushed to 3DS memory.
42 virtual void FlushRegion(PAddr addr, u32 size) = 0;
43
44 /// Notify rasterizer that any caches of the specified region should be discraded and reloaded from 3DS memory.
45 virtual void InvalidateRegion(PAddr addr, u32 size) = 0;
46};
47
48}