[TEST] Miscellaneous changes

This commit is contained in:
CamilleLaVey
2026-07-28 18:38:14 -04:00
parent 40756bbc52
commit 1616d19279
4 changed files with 24 additions and 33 deletions
+14 -11
View File
@@ -1408,6 +1408,7 @@ void TextureCache<P>::QueueAsyncDecode(Image& image, ImageId image_id) {
LOG_INFO(HW_GPU, "Queuing async texture decode");
image.flags |= ImageFlagBits::IsDecoding;
runtime.TransitionImageLayout(image);
auto decode = std::make_unique<AsyncDecodeContext>();
auto* decode_ptr = decode.get();
decode->image_id = image_id;
@@ -1440,6 +1441,7 @@ void TextureCache<P>::QueueAsyncUnswizzle(Image& image, ImageId image_id) {
}
image.flags |= ImageFlagBits::IsDecoding;
runtime.TransitionImageLayout(image);
unswizzle_queue.push_back({
.image_id = image_id,
@@ -1719,17 +1721,18 @@ ImageId TextureCache<P>::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, DA
join_copies_to_do.emplace_back(JoinCopy{false, overlap_id});
continue;
}
LOG_WARNING(HW_GPU,
"Dropping GPU modified overlap with no copy path: "
"overlap{{gpu_addr=0x{:x} format={} size={}x{}x{} levels={} layers={}}} "
"new{{gpu_addr=0x{:x} format={} size={}x{}x{} levels={} layers={}}}",
overlap.gpu_addr, static_cast<int>(overlap.info.format),
overlap.info.size.width, overlap.info.size.height,
overlap.info.size.depth, overlap.info.resources.levels,
overlap.info.resources.layers, new_image.gpu_addr,
static_cast<int>(new_info.format), new_info.size.width,
new_info.size.height, new_info.size.depth, new_info.resources.levels,
new_info.resources.layers);
if (overlap.IsSafeDownload() && False(overlap.flags & ImageFlagBits::BadOverlap) &&
gpu_memory->GpuToCpuAddress(overlap.gpu_addr).has_value()) {
QueueEvictionDownload(overlap);
} else {
LOG_WARNING(HW_GPU,
"Dropping GPU modified overlap, contents are not recoverable: "
"gpu_addr=0x{:x} format={} size={}x{}x{} levels={} layers={}",
overlap.gpu_addr, static_cast<int>(overlap.info.format),
overlap.info.size.width, overlap.info.size.height,
overlap.info.size.depth, overlap.info.resources.levels,
overlap.info.resources.layers);
}
}
if (True(overlap.flags & ImageFlagBits::Tracked)) {
UntrackImage(overlap, overlap_id);
+1 -17
View File
@@ -747,23 +747,7 @@ boost::container::small_vector<ImageCopy, 16> MakeShrinkImageCopies(const ImageI
const bool is_dst_3d = dst.type == ImageType::e3D;
if (is_dst_3d) {
if (src.type != ImageType::e3D || src.resources.levels != 1) {
LOG_CRITICAL(HW_GPU,
"Shrink copy 3D mismatch: "
"dst{{type={} format={} size={}x{}x{} levels={} layers={} "
"block_depth={} samples={}}} "
"src{{type={} format={} size={}x{}x{} levels={} layers={} "
"block_depth={} samples={}}} "
"base{{level={} layer={}}}",
static_cast<int>(dst.type), static_cast<int>(dst.format), dst.size.width,
dst.size.height, dst.size.depth, dst.resources.levels,
dst.resources.layers, dst.block.depth, dst.num_samples,
static_cast<int>(src.type), static_cast<int>(src.format), src.size.width,
src.size.height, src.size.depth, src.resources.levels,
src.resources.layers, src.block.depth, src.num_samples, base.level,
base.layer);
}
ASSERT(src.type == ImageType::e3D);
ASSERT(src.type == ImageType::e3D || src.resources.layers == 1);
ASSERT(src.resources.levels == 1);
}
const bool both_2d{src.type == ImageType::e2D && dst.type == ImageType::e2D};