diff options
author | bunnei <bunneidev@gmail.com> | 2018-03-24 05:47:33 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-03-27 03:16:51 +0200 |
commit | 170ac3f9ee3c2f3fe0b22f11e4933373e7742fd6 (patch) | |
tree | a08914110bebc8b7ad2f912f2ef06cc225c2da42 /src/video_core/renderer_opengl/gl_rasterizer_cache.h | |
parent | maxwell: Add RenderTargetFormat enum. (diff) | |
download | yuzu-170ac3f9ee3c2f3fe0b22f11e4933373e7742fd6.tar yuzu-170ac3f9ee3c2f3fe0b22f11e4933373e7742fd6.tar.gz yuzu-170ac3f9ee3c2f3fe0b22f11e4933373e7742fd6.tar.bz2 yuzu-170ac3f9ee3c2f3fe0b22f11e4933373e7742fd6.tar.lz yuzu-170ac3f9ee3c2f3fe0b22f11e4933373e7742fd6.tar.xz yuzu-170ac3f9ee3c2f3fe0b22f11e4933373e7742fd6.tar.zst yuzu-170ac3f9ee3c2f3fe0b22f11e4933373e7742fd6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index 14f3cdc38..0e1c481d7 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -116,6 +116,15 @@ struct SurfaceParams { return GetFormatBpp(pixel_format); } + static PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format) { + switch (format) { + case Tegra::RenderTargetFormat::RGBA8_UNORM: + return PixelFormat::RGBA8; + default: + UNREACHABLE(); + } + } + static PixelFormat PixelFormatFromGPUPixelFormat(Tegra::FramebufferConfig::PixelFormat format) { switch (format) { case Tegra::FramebufferConfig::PixelFormat::ABGR8: @@ -308,7 +317,7 @@ public: /// Get the color and depth surfaces based on the framebuffer configuration SurfaceSurfaceRect_Tuple GetFramebufferSurfaces(bool using_color_fb, bool using_depth_fb, - const MathUtil::Rectangle<s32>& viewport_rect); + const MathUtil::Rectangle<s32>& viewport); /// Get a surface that matches the fill config Surface GetFillSurface(const void* config); |