texture_cache: Remove assert

This commit is contained in:
IndecisiveTurtle 2024-12-13 02:24:37 +02:00
parent d956f711af
commit 07eed00d62
2 changed files with 5 additions and 3 deletions

View file

@ -93,8 +93,6 @@ struct Image {
}
void AssociateDepth(ImageId image_id) {
ASSERT_MSG(!depth_id || image_id == depth_id,
"Stencil attachment bound to multiple depth targets");
depth_id = image_id;
}

View file

@ -447,7 +447,11 @@ ImageView& TextureCache::FindDepthTarget(BaseDesc& desc) {
if (desc.info.stencil_addr != 0) {
ImageId stencil_id{};
ForEachImageInRegion(desc.info.stencil_addr, desc.info.stencil_size,
[&](ImageId image_id, Image&) { stencil_id = image_id; });
[&](ImageId image_id, Image& image) {
if (image.info.guest_address == desc.info.stencil_addr) {
stencil_id = image_id;
}
});
if (!stencil_id) {
ImageInfo info{};
info.guest_address = desc.info.stencil_addr;