mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-21 12:08:14 -05:00
gl_rasterizer_cache: Track texture depth.
This commit is contained in:
@ -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);
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user