gl_shader_cache: Remove cache_width/cache_height.

- This was once an optimization, but we no longer need it with the cache reserve.
- This is also inaccurate.
This commit is contained in:
bunnei 2018-09-11 20:12:29 -04:00
parent 1470b85af9
commit cdddd71d08
2 changed files with 2 additions and 12 deletions

View file

@ -53,8 +53,6 @@ static VAddr TryGetCpuAddr(Tegra::GPUVAddr gpu_addr) {
params.width = Common::AlignUp(config.tic.Width(), GetCompressionFactor(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.height = Common::AlignUp(config.tic.Height(), GetCompressionFactor(params.pixel_format));
params.unaligned_height = config.tic.Height(); params.unaligned_height = config.tic.Height();
params.cache_width = Common::AlignUp(params.width, 8);
params.cache_height = Common::AlignUp(params.height, 8);
params.target = SurfaceTargetFromTextureType(config.tic.texture_type); params.target = SurfaceTargetFromTextureType(config.tic.texture_type);
switch (params.target) { switch (params.target) {
@ -89,8 +87,6 @@ static VAddr TryGetCpuAddr(Tegra::GPUVAddr gpu_addr) {
params.width = config.width; params.width = config.width;
params.height = config.height; params.height = config.height;
params.unaligned_height = config.height; params.unaligned_height = config.height;
params.cache_width = Common::AlignUp(params.width, 8);
params.cache_height = Common::AlignUp(params.height, 8);
params.target = SurfaceTarget::Texture2D; params.target = SurfaceTarget::Texture2D;
params.depth = 1; params.depth = 1;
params.size_in_bytes = params.SizeInBytes(); params.size_in_bytes = params.SizeInBytes();
@ -110,8 +106,6 @@ static VAddr TryGetCpuAddr(Tegra::GPUVAddr gpu_addr) {
params.width = zeta_width; params.width = zeta_width;
params.height = zeta_height; params.height = zeta_height;
params.unaligned_height = zeta_height; params.unaligned_height = zeta_height;
params.cache_width = Common::AlignUp(params.width, 8);
params.cache_height = Common::AlignUp(params.height, 8);
params.target = SurfaceTarget::Texture2D; params.target = SurfaceTarget::Texture2D;
params.depth = 1; params.depth = 1;
params.size_in_bytes = params.SizeInBytes(); params.size_in_bytes = params.SizeInBytes();

View file

@ -680,8 +680,8 @@ struct SurfaceParams {
/// Checks if surfaces are compatible for caching /// Checks if surfaces are compatible for caching
bool IsCompatibleSurface(const SurfaceParams& other) const { bool IsCompatibleSurface(const SurfaceParams& other) const {
return std::tie(pixel_format, type, cache_width, cache_height) == return std::tie(pixel_format, type, width, height) ==
std::tie(other.pixel_format, other.type, other.cache_width, other.cache_height); std::tie(other.pixel_format, other.type, other.width, other.height);
} }
VAddr addr; VAddr addr;
@ -696,10 +696,6 @@ struct SurfaceParams {
u32 unaligned_height; u32 unaligned_height;
size_t size_in_bytes; size_t size_in_bytes;
SurfaceTarget target; SurfaceTarget target;
// Parameters used for caching only
u32 cache_width;
u32 cache_height;
}; };
}; // namespace OpenGL }; // namespace OpenGL