rsx: Force-align compressed formats to 4x4 texel blocks and disable 1D compressed textures.

- The PS3 allows defining 1D compressed images but this obviously doesn't work well on desktop.
This commit is contained in:
kd-11 2019-10-18 00:21:09 +03:00 committed by kd-11
parent eff4e95c99
commit 404073c74a

View File

@ -1722,7 +1722,7 @@ namespace rsx
const bool is_unnormalized = !!(tex.format() & CELL_GCM_TEXTURE_UN);
const bool is_swizzled = !(tex.format() & CELL_GCM_TEXTURE_LN);
const auto extended_dimension = tex.get_extended_texture_dimension();
auto extended_dimension = tex.get_extended_texture_dimension();
options.is_compressed_format = texture_cache_helpers::is_compressed_gcm_format(attributes.gcm_format);
@ -1786,6 +1786,14 @@ namespace rsx
}
}
if (options.is_compressed_format)
{
attributes.width = align(attributes.width, 4);
attributes.height = align(attributes.height, 4);
extended_dimension = std::max(extended_dimension, rsx::texture_dimension_extended::texture_dimension_2d);
}
const auto lookup_range = utils::address_range::start_length(attributes.address, attributes.pitch * required_surface_height);
reader_lock lock(m_cache_mutex);