diff options
author | bunnei <bunneidev@gmail.com> | 2018-09-05 04:00:24 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-09-08 08:53:38 +0200 |
commit | ce8291f6c5a7e0dba5e7d72e94de06bf4423d539 (patch) | |
tree | 2012ec97e3014c2fb9e3df67d9c39545c131ddd4 /src/video_core/renderer_opengl | |
parent | gl_rasterizer_cache: Remove impl. of FlushGLBuffer. (diff) | |
download | yuzu-ce8291f6c5a7e0dba5e7d72e94de06bf4423d539.tar yuzu-ce8291f6c5a7e0dba5e7d72e94de06bf4423d539.tar.gz yuzu-ce8291f6c5a7e0dba5e7d72e94de06bf4423d539.tar.bz2 yuzu-ce8291f6c5a7e0dba5e7d72e94de06bf4423d539.tar.lz yuzu-ce8291f6c5a7e0dba5e7d72e94de06bf4423d539.tar.xz yuzu-ce8291f6c5a7e0dba5e7d72e94de06bf4423d539.tar.zst yuzu-ce8291f6c5a7e0dba5e7d72e94de06bf4423d539.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 4 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index df99dd521..1a44de332 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -51,6 +51,7 @@ static VAddr TryGetCpuAddr(Tegra::GPUVAddr gpu_addr) { params.type = GetFormatType(params.pixel_format); params.width = Common::AlignUp(config.tic.Width(), GetCompressionFactor(params.pixel_format)); params.height = Common::AlignUp(config.tic.Height(), GetCompressionFactor(params.pixel_format)); + params.depth = config.tic.Depth(); params.unaligned_height = config.tic.Height(); params.size_in_bytes = params.SizeInBytes(); params.cache_width = Common::AlignUp(params.width, 16); @@ -70,6 +71,7 @@ static VAddr TryGetCpuAddr(Tegra::GPUVAddr gpu_addr) { params.type = GetFormatType(params.pixel_format); params.width = config.width; params.height = config.height; + params.depth = 1; params.unaligned_height = config.height; params.size_in_bytes = params.SizeInBytes(); params.cache_width = Common::AlignUp(params.width, 16); @@ -88,9 +90,9 @@ static VAddr TryGetCpuAddr(Tegra::GPUVAddr gpu_addr) { params.pixel_format = PixelFormatFromDepthFormat(format); params.component_type = ComponentTypeFromDepthFormat(format); params.type = GetFormatType(params.pixel_format); - params.size_in_bytes = params.SizeInBytes(); params.width = zeta_width; params.height = zeta_height; + params.depth = 1; params.unaligned_height = zeta_height; params.size_in_bytes = params.SizeInBytes(); params.cache_width = Common::AlignUp(params.width, 16); diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index 6693b5cda..56022ea01 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -662,7 +662,7 @@ struct SurfaceParams { ASSERT(width % compression_factor == 0); ASSERT(height % compression_factor == 0); return (width / compression_factor) * (height / compression_factor) * - GetFormatBpp(pixel_format) / CHAR_BIT; + GetFormatBpp(pixel_format) * depth / CHAR_BIT; } /// Creates SurfaceParams from a texture configuration @@ -691,6 +691,7 @@ struct SurfaceParams { SurfaceType type; u32 width; u32 height; + u32 depth; u32 unaligned_height; size_t size_in_bytes; SurfaceTarget target; |