summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-09-29 17:53:18 +0200
committerbunnei <bunneidev@gmail.com>2018-09-30 20:31:58 +0200
commit29782273ecf2d679a9e5043fdc15152e1294625f (patch)
treefb5e92b63779167969d4a07c92b08f740e6b0f7c /src/video_core/renderer_opengl
parentgl_rasterizer_cache: Implement render to cubemap. (diff)
downloadyuzu-29782273ecf2d679a9e5043fdc15152e1294625f.tar
yuzu-29782273ecf2d679a9e5043fdc15152e1294625f.tar.gz
yuzu-29782273ecf2d679a9e5043fdc15152e1294625f.tar.bz2
yuzu-29782273ecf2d679a9e5043fdc15152e1294625f.tar.lz
yuzu-29782273ecf2d679a9e5043fdc15152e1294625f.tar.xz
yuzu-29782273ecf2d679a9e5043fdc15152e1294625f.tar.zst
yuzu-29782273ecf2d679a9e5043fdc15152e1294625f.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index 8abbe0113..249b0061a 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -1061,6 +1061,14 @@ Surface RasterizerCacheOpenGL::RecreateSurface(const Surface& old_surface,
const u32 byte_stride{old_params.rt.layer_stride *
(SurfaceParams::GetFormatBpp(old_params.pixel_format) / CHAR_BIT)};
+ if (old_params.rt.array_mode != 1) {
+ // TODO(bunnei): This is used by Breath of the Wild, I'm not sure how to implement this
+ // yet (array rendering used as a cubemap texture).
+ LOG_CRITICAL(HW_GPU, "Unhandled rendertarget array_mode {}", old_params.rt.array_mode);
+ UNREACHABLE();
+ return new_surface;
+ }
+
// This seems to be used for render-to-cubemap texture
const std::size_t size_with_mipmaps{new_params.SizeInBytes2DWithMipmap()};
ASSERT_MSG(size_with_mipmaps == byte_stride, "Unexpected");