summaryrefslogtreecommitdiff
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp4
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.h3
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) {
51 params.type = GetFormatType(params.pixel_format); 51 params.type = GetFormatType(params.pixel_format);
52 params.width = Common::AlignUp(config.tic.Width(), GetCompressionFactor(params.pixel_format)); 52 params.width = Common::AlignUp(config.tic.Width(), GetCompressionFactor(params.pixel_format));
53 params.height = Common::AlignUp(config.tic.Height(), GetCompressionFactor(params.pixel_format)); 53 params.height = Common::AlignUp(config.tic.Height(), GetCompressionFactor(params.pixel_format));
54 params.depth = config.tic.Depth();
54 params.unaligned_height = config.tic.Height(); 55 params.unaligned_height = config.tic.Height();
55 params.size_in_bytes = params.SizeInBytes(); 56 params.size_in_bytes = params.SizeInBytes();
56 params.cache_width = Common::AlignUp(params.width, 16); 57 params.cache_width = Common::AlignUp(params.width, 16);
@@ -70,6 +71,7 @@ static VAddr TryGetCpuAddr(Tegra::GPUVAddr gpu_addr) {
70 params.type = GetFormatType(params.pixel_format); 71 params.type = GetFormatType(params.pixel_format);
71 params.width = config.width; 72 params.width = config.width;
72 params.height = config.height; 73 params.height = config.height;
74 params.depth = 1;
73 params.unaligned_height = config.height; 75 params.unaligned_height = config.height;
74 params.size_in_bytes = params.SizeInBytes(); 76 params.size_in_bytes = params.SizeInBytes();
75 params.cache_width = Common::AlignUp(params.width, 16); 77 params.cache_width = Common::AlignUp(params.width, 16);
@@ -88,9 +90,9 @@ static VAddr TryGetCpuAddr(Tegra::GPUVAddr gpu_addr) {
88 params.pixel_format = PixelFormatFromDepthFormat(format); 90 params.pixel_format = PixelFormatFromDepthFormat(format);
89 params.component_type = ComponentTypeFromDepthFormat(format); 91 params.component_type = ComponentTypeFromDepthFormat(format);
90 params.type = GetFormatType(params.pixel_format); 92 params.type = GetFormatType(params.pixel_format);
91 params.size_in_bytes = params.SizeInBytes();
92 params.width = zeta_width; 93 params.width = zeta_width;
93 params.height = zeta_height; 94 params.height = zeta_height;
95 params.depth = 1;
94 params.unaligned_height = zeta_height; 96 params.unaligned_height = zeta_height;
95 params.size_in_bytes = params.SizeInBytes(); 97 params.size_in_bytes = params.SizeInBytes();
96 params.cache_width = Common::AlignUp(params.width, 16); 98 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 {
662 ASSERT(width % compression_factor == 0); 662 ASSERT(width % compression_factor == 0);
663 ASSERT(height % compression_factor == 0); 663 ASSERT(height % compression_factor == 0);
664 return (width / compression_factor) * (height / compression_factor) * 664 return (width / compression_factor) * (height / compression_factor) *
665 GetFormatBpp(pixel_format) / CHAR_BIT; 665 GetFormatBpp(pixel_format) * depth / CHAR_BIT;
666 } 666 }
667 667
668 /// Creates SurfaceParams from a texture configuration 668 /// Creates SurfaceParams from a texture configuration
@@ -691,6 +691,7 @@ struct SurfaceParams {
691 SurfaceType type; 691 SurfaceType type;
692 u32 width; 692 u32 width;
693 u32 height; 693 u32 height;
694 u32 depth;
694 u32 unaligned_height; 695 u32 unaligned_height;
695 size_t size_in_bytes; 696 size_t size_in_bytes;
696 SurfaceTarget target; 697 SurfaceTarget target;