diff options
Diffstat (limited to 'src/video_core/rasterizer_interface.h')
| -rw-r--r-- | src/video_core/rasterizer_interface.h | 61 |
1 files changed, 61 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..6c7bd0826 --- /dev/null +++ b/src/video_core/rasterizer_interface.h | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | // Copyright 2018 yuzu 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 | |||
| 9 | struct ScreenInfo; | ||
| 10 | |||
| 11 | namespace VideoCore { | ||
| 12 | |||
| 13 | class RasterizerInterface { | ||
| 14 | public: | ||
| 15 | virtual ~RasterizerInterface() {} | ||
| 16 | |||
| 17 | /// Draw the current batch of triangles | ||
| 18 | virtual void DrawTriangles() = 0; | ||
| 19 | |||
| 20 | /// Notify rasterizer that the specified Maxwell register has been changed | ||
| 21 | virtual void NotifyMaxwellRegisterChanged(u32 id) = 0; | ||
| 22 | |||
| 23 | /// Notify rasterizer that all caches should be flushed to 3DS memory | ||
| 24 | virtual void FlushAll() = 0; | ||
| 25 | |||
| 26 | /// Notify rasterizer that any caches of the specified region should be flushed to 3DS memory | ||
| 27 | virtual void FlushRegion(PAddr addr, u32 size) = 0; | ||
| 28 | |||
| 29 | /// Notify rasterizer that any caches of the specified region should be invalidated | ||
| 30 | virtual void InvalidateRegion(PAddr addr, u32 size) = 0; | ||
| 31 | |||
| 32 | /// Notify rasterizer that any caches of the specified region should be flushed to 3DS memory | ||
| 33 | /// and invalidated | ||
| 34 | virtual void FlushAndInvalidateRegion(PAddr addr, u32 size) = 0; | ||
| 35 | |||
| 36 | /// Attempt to use a faster method to perform a display transfer with is_texture_copy = 0 | ||
| 37 | virtual bool AccelerateDisplayTransfer(const void* config) { | ||
| 38 | return false; | ||
| 39 | } | ||
| 40 | |||
| 41 | /// Attempt to use a faster method to perform a display transfer with is_texture_copy = 1 | ||
| 42 | virtual bool AccelerateTextureCopy(const void* config) { | ||
| 43 | return false; | ||
| 44 | } | ||
| 45 | |||
| 46 | /// Attempt to use a faster method to fill a region | ||
| 47 | virtual bool AccelerateFill(const void* config) { | ||
| 48 | return false; | ||
| 49 | } | ||
| 50 | |||
| 51 | /// Attempt to use a faster method to display the framebuffer to screen | ||
| 52 | virtual bool AccelerateDisplay(const void* config, PAddr framebuffer_addr, u32 pixel_stride, | ||
| 53 | ScreenInfo& screen_info) { | ||
| 54 | return false; | ||
| 55 | } | ||
| 56 | |||
| 57 | virtual bool AccelerateDrawBatch(bool is_indexed) { | ||
| 58 | return false; | ||
| 59 | } | ||
| 60 | }; | ||
| 61 | } // namespace VideoCore | ||