summaryrefslogtreecommitdiff
path: root/src/video_core/rasterizer_interface.h
diff options
context:
space:
mode:
authorGravatar Chloe2020-11-18 01:40:03 +1100
committerGravatar GitHub2020-11-18 01:40:03 +1100
commit2dc9dbb809eaebff568568fef90bbb0f19f976ad (patch)
tree5aedcd50951924e2e08c2344843b4ea4d5c48ac2 /src/video_core/rasterizer_interface.h
parentMerge pull request #4929 from lioncash/nodiscard-input (diff)
parentrasterizer_interface: Make use of [[nodiscard]] where applicable (diff)
downloadyuzu-2dc9dbb809eaebff568568fef90bbb0f19f976ad.tar.gz
yuzu-2dc9dbb809eaebff568568fef90bbb0f19f976ad.tar.xz
yuzu-2dc9dbb809eaebff568568fef90bbb0f19f976ad.zip
Merge pull request #4933 from lioncash/nodisc-gpu
[gpu, render_base, rasterizer_interface]: Make use of [[nodiscard]] where applicable
Diffstat (limited to 'src/video_core/rasterizer_interface.h')
-rw-r--r--src/video_core/rasterizer_interface.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/video_core/rasterizer_interface.h b/src/video_core/rasterizer_interface.h
index b3e0919f8..27ef4c69a 100644
--- a/src/video_core/rasterizer_interface.h
+++ b/src/video_core/rasterizer_interface.h
@@ -32,7 +32,7 @@ using DiskResourceLoadCallback = std::function<void(LoadCallbackStage, std::size
32 32
33class RasterizerInterface { 33class RasterizerInterface {
34public: 34public:
35 virtual ~RasterizerInterface() {} 35 virtual ~RasterizerInterface() = default;
36 36
37 /// Dispatches a draw invocation 37 /// Dispatches a draw invocation
38 virtual void Draw(bool is_indexed, bool is_instanced) = 0; 38 virtual void Draw(bool is_indexed, bool is_instanced) = 0;
@@ -90,15 +90,16 @@ public:
90 virtual void TickFrame() = 0; 90 virtual void TickFrame() = 0;
91 91
92 /// Attempt to use a faster method to perform a surface copy 92 /// Attempt to use a faster method to perform a surface copy
93 virtual bool AccelerateSurfaceCopy(const Tegra::Engines::Fermi2D::Regs::Surface& src, 93 [[nodiscard]] virtual bool AccelerateSurfaceCopy(
94 const Tegra::Engines::Fermi2D::Regs::Surface& dst, 94 const Tegra::Engines::Fermi2D::Regs::Surface& src,
95 const Tegra::Engines::Fermi2D::Config& copy_config) { 95 const Tegra::Engines::Fermi2D::Regs::Surface& dst,
96 const Tegra::Engines::Fermi2D::Config& copy_config) {
96 return false; 97 return false;
97 } 98 }
98 99
99 /// Attempt to use a faster method to display the framebuffer to screen 100 /// Attempt to use a faster method to display the framebuffer to screen
100 virtual bool AccelerateDisplay(const Tegra::FramebufferConfig& config, VAddr framebuffer_addr, 101 [[nodiscard]] virtual bool AccelerateDisplay(const Tegra::FramebufferConfig& config,
101 u32 pixel_stride) { 102 VAddr framebuffer_addr, u32 pixel_stride) {
102 return false; 103 return false;
103 } 104 }
104 105
@@ -110,12 +111,12 @@ public:
110 const DiskResourceLoadCallback& callback) {} 111 const DiskResourceLoadCallback& callback) {}
111 112
112 /// Grant access to the Guest Driver Profile for recording/obtaining info on the guest driver. 113 /// Grant access to the Guest Driver Profile for recording/obtaining info on the guest driver.
113 GuestDriverProfile& AccessGuestDriverProfile() { 114 [[nodiscard]] GuestDriverProfile& AccessGuestDriverProfile() {
114 return guest_driver_profile; 115 return guest_driver_profile;
115 } 116 }
116 117
117 /// Grant access to the Guest Driver Profile for recording/obtaining info on the guest driver. 118 /// Grant access to the Guest Driver Profile for recording/obtaining info on the guest driver.
118 const GuestDriverProfile& AccessGuestDriverProfile() const { 119 [[nodiscard]] const GuestDriverProfile& AccessGuestDriverProfile() const {
119 return guest_driver_profile; 120 return guest_driver_profile;
120 } 121 }
121 122