@ -47,6 +47,7 @@
# include "video_core/texture_cache/formatter.h"
# include "video_core/texture_cache/formatter.h"
# include "video_core/texture_cache/samples_helper.h"
# include "video_core/texture_cache/samples_helper.h"
# include "video_core/texture_cache/util.h"
# include "video_core/texture_cache/util.h"
# include "video_core/textures/astc.h"
# include "video_core/textures/decoders.h"
# include "video_core/textures/decoders.h"
namespace VideoCommon {
namespace VideoCommon {
@ -884,8 +885,16 @@ void ConvertImage(std::span<const u8> input, const ImageInfo& info, std::span<u8
ASSERT ( copy . image_extent = = mip_size ) ;
ASSERT ( copy . image_extent = = mip_size ) ;
ASSERT ( copy . buffer_row_length = = Common : : AlignUp ( mip_size . width , tile_size . width ) ) ;
ASSERT ( copy . buffer_row_length = = Common : : AlignUp ( mip_size . width , tile_size . width ) ) ;
ASSERT ( copy . buffer_image_height = = Common : : AlignUp ( mip_size . height , tile_size . height ) ) ;
ASSERT ( copy . buffer_image_height = = Common : : AlignUp ( mip_size . height , tile_size . height ) ) ;
DecompressBC4 ( input . subspan ( copy . buffer_offset ) , copy . image_extent ,
if ( IsPixelFormatASTC ( info . format ) ) {
output . subspan ( output_offset ) ) ;
ASSERT ( copy . image_extent . depth = = 1 ) ;
Tegra : : Texture : : ASTC : : Decompress ( input . subspan ( copy . buffer_offset ) ,
copy . image_extent . width , copy . image_extent . height ,
copy . image_subresource . num_layers , tile_size . width ,
tile_size . height , output . subspan ( output_offset ) ) ;
} else {
DecompressBC4 ( input . subspan ( copy . buffer_offset ) , copy . image_extent ,
output . subspan ( output_offset ) ) ;
}
copy . buffer_offset = output_offset ;
copy . buffer_offset = output_offset ;
copy . buffer_row_length = mip_size . width ;
copy . buffer_row_length = mip_size . width ;
copy . buffer_image_height = mip_size . height ;
copy . buffer_image_height = mip_size . height ;