gl_rasterizer_cache: Track texture depth.
This commit is contained in:
parent
9dccf7e1fa
commit
ce8291f6c5
3 changed files with 15 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue