early-access version 3574

This commit is contained in:
pineappleEA 2023-05-09 04:34:04 +02:00
parent 8b74a66045
commit 7137fbf907
4 changed files with 8 additions and 8 deletions

View file

@ -1,7 +1,7 @@
yuzu emulator early access yuzu emulator early access
============= =============
This is the source code for early-access 3573. This is the source code for early-access 3574.
## Legal Notice ## Legal Notice

View file

@ -231,7 +231,7 @@ void ApplySwizzle(GLuint handle, PixelFormat format, std::array<SwizzleSource, 4
[[nodiscard]] bool CanBeAccelerated(const TextureCacheRuntime& runtime, [[nodiscard]] bool CanBeAccelerated(const TextureCacheRuntime& runtime,
const VideoCommon::ImageInfo& info) { const VideoCommon::ImageInfo& info) {
if (IsPixelFormatASTC(info.format) && !runtime.HasNativeASTC()) { if (IsPixelFormatASTC(info.format) && info.size.depth == 1 && !runtime.HasNativeASTC()) {
return Settings::values.accelerate_astc.GetValue() && return Settings::values.accelerate_astc.GetValue() &&
!Settings::values.async_astc.GetValue(); !Settings::values.async_astc.GetValue();
} }

View file

@ -1268,7 +1268,7 @@ Image::Image(TextureCacheRuntime& runtime_, const ImageInfo& info_, GPUVAddr gpu
if (IsPixelFormatASTC(info.format) && !runtime->device.IsOptimalAstcSupported()) { if (IsPixelFormatASTC(info.format) && !runtime->device.IsOptimalAstcSupported()) {
if (Settings::values.async_astc.GetValue()) { if (Settings::values.async_astc.GetValue()) {
flags |= VideoCommon::ImageFlagBits::AsynchronousDecode; flags |= VideoCommon::ImageFlagBits::AsynchronousDecode;
} else if (Settings::values.accelerate_astc.GetValue()) { } else if (Settings::values.accelerate_astc.GetValue() && info.size.depth == 1) {
flags |= VideoCommon::ImageFlagBits::AcceleratedUpload; flags |= VideoCommon::ImageFlagBits::AcceleratedUpload;
} }
flags |= VideoCommon::ImageFlagBits::Converted; flags |= VideoCommon::ImageFlagBits::Converted;

View file

@ -896,10 +896,10 @@ void ConvertImage(std::span<const u8> input, const ImageInfo& info, std::span<u8
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));
if (IsPixelFormatASTC(info.format)) { if (IsPixelFormatASTC(info.format)) {
ASSERT(copy.image_extent.depth == 1); Tegra::Texture::ASTC::Decompress(
Tegra::Texture::ASTC::Decompress(input.subspan(copy.buffer_offset), input.subspan(copy.buffer_offset), copy.image_extent.width,
copy.image_extent.width, copy.image_extent.height, copy.image_extent.height,
copy.image_subresource.num_layers, tile_size.width, copy.image_subresource.num_layers * copy.image_extent.depth, tile_size.width,
tile_size.height, output.subspan(output_offset)); tile_size.height, output.subspan(output_offset));
} else { } else {
DecompressBC4(input.subspan(copy.buffer_offset), copy.image_extent, DecompressBC4(input.subspan(copy.buffer_offset), copy.image_extent,