summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
authorGravatar bunnei2016-10-03 20:21:55 -0400
committerGravatar GitHub2016-10-03 20:21:55 -0400
commit49b10339bf87ce69dafee78eb3957fb6d51424d8 (patch)
treef9255901fc887d6b252028131d3d0d7ce285d469 /src/video_core
parentMerge pull request #2083 from yuriks/opengl-scissor-cached-rect (diff)
parentgpu: DisplayTransfer: a less amazing algorithm for flip (diff)
downloadyuzu-49b10339bf87ce69dafee78eb3957fb6d51424d8.tar.gz
yuzu-49b10339bf87ce69dafee78eb3957fb6d51424d8.tar.xz
yuzu-49b10339bf87ce69dafee78eb3957fb6d51424d8.zip
Merge pull request #2103 from wwylele/gpu-reg-cleanup
GPU: DisplayTransfer & MemoryFill cleanup and param check
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/rasterizer_interface.h7
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp10
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.h1
3 files changed, 12 insertions, 6 deletions
diff --git a/src/video_core/rasterizer_interface.h b/src/video_core/rasterizer_interface.h
index 71df233b5..8ef7e74c7 100644
--- a/src/video_core/rasterizer_interface.h
+++ b/src/video_core/rasterizer_interface.h
@@ -42,11 +42,16 @@ public:
42 /// and invalidated 42 /// and invalidated
43 virtual void FlushAndInvalidateRegion(PAddr addr, u32 size) = 0; 43 virtual void FlushAndInvalidateRegion(PAddr addr, u32 size) = 0;
44 44
45 /// Attempt to use a faster method to perform a display transfer 45 /// Attempt to use a faster method to perform a display transfer with is_texture_copy = 0
46 virtual bool AccelerateDisplayTransfer(const GPU::Regs::DisplayTransferConfig& config) { 46 virtual bool AccelerateDisplayTransfer(const GPU::Regs::DisplayTransferConfig& config) {
47 return false; 47 return false;
48 } 48 }
49 49
50 /// Attempt to use a faster method to perform a display transfer with is_texture_copy = 1
51 virtual bool AccelerateTextureCopy(const GPU::Regs::DisplayTransferConfig& config) {
52 return false;
53 }
54
50 /// Attempt to use a faster method to fill a region 55 /// Attempt to use a faster method to fill a region
51 virtual bool AccelerateFill(const GPU::Regs::MemoryFillConfig& config) { 56 virtual bool AccelerateFill(const GPU::Regs::MemoryFillConfig& config) {
52 return false; 57 return false;
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 62c9af28c..7cc3b407a 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -709,11 +709,6 @@ bool RasterizerOpenGL::AccelerateDisplayTransfer(const GPU::Regs::DisplayTransfe
709 using PixelFormat = CachedSurface::PixelFormat; 709 using PixelFormat = CachedSurface::PixelFormat;
710 using SurfaceType = CachedSurface::SurfaceType; 710 using SurfaceType = CachedSurface::SurfaceType;
711 711
712 if (config.is_texture_copy) {
713 // TODO(tfarley): Try to hardware accelerate this
714 return false;
715 }
716
717 CachedSurface src_params; 712 CachedSurface src_params;
718 src_params.addr = config.GetPhysicalInputAddress(); 713 src_params.addr = config.GetPhysicalInputAddress();
719 src_params.width = config.output_width; 714 src_params.width = config.output_width;
@@ -768,6 +763,11 @@ bool RasterizerOpenGL::AccelerateDisplayTransfer(const GPU::Regs::DisplayTransfe
768 return true; 763 return true;
769} 764}
770 765
766bool RasterizerOpenGL::AccelerateTextureCopy(const GPU::Regs::DisplayTransferConfig& config) {
767 // TODO(tfarley): Try to hardware accelerate this
768 return false;
769}
770
771bool RasterizerOpenGL::AccelerateFill(const GPU::Regs::MemoryFillConfig& config) { 771bool RasterizerOpenGL::AccelerateFill(const GPU::Regs::MemoryFillConfig& config) {
772 using PixelFormat = CachedSurface::PixelFormat; 772 using PixelFormat = CachedSurface::PixelFormat;
773 using SurfaceType = CachedSurface::SurfaceType; 773 using SurfaceType = CachedSurface::SurfaceType;
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h
index 7b4ce2ac5..e1a9cb361 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer.h
@@ -238,6 +238,7 @@ public:
238 void FlushRegion(PAddr addr, u32 size) override; 238 void FlushRegion(PAddr addr, u32 size) override;
239 void FlushAndInvalidateRegion(PAddr addr, u32 size) override; 239 void FlushAndInvalidateRegion(PAddr addr, u32 size) override;
240 bool AccelerateDisplayTransfer(const GPU::Regs::DisplayTransferConfig& config) override; 240 bool AccelerateDisplayTransfer(const GPU::Regs::DisplayTransferConfig& config) override;
241 bool AccelerateTextureCopy(const GPU::Regs::DisplayTransferConfig& config) override;
241 bool AccelerateFill(const GPU::Regs::MemoryFillConfig& config) override; 242 bool AccelerateFill(const GPU::Regs::MemoryFillConfig& config) override;
242 bool AccelerateDisplay(const GPU::Regs::FramebufferConfig& config, PAddr framebuffer_addr, 243 bool AccelerateDisplay(const GPU::Regs::FramebufferConfig& config, PAddr framebuffer_addr,
243 u32 pixel_stride, ScreenInfo& screen_info) override; 244 u32 pixel_stride, ScreenInfo& screen_info) override;