early-access version 2247

This commit is contained in:
pineappleEA 2021-11-27 12:43:04 +01:00
parent ebdeb341af
commit 6873c65a94
3 changed files with 16 additions and 6 deletions

View File

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

View File

@ -725,7 +725,11 @@ ImageViewId TextureCache<P>::CreateImageView(const TICEntry& config) {
} }
const u32 layer_offset = config.BaseLayer() * info.layer_stride; const u32 layer_offset = config.BaseLayer() * info.layer_stride;
const GPUVAddr image_gpu_addr = config.Address() - layer_offset; const GPUVAddr image_gpu_addr = config.Address() - layer_offset;
const ImageId image_id = FindOrInsertImage(info, image_gpu_addr); ImageId image_id{};
do {
has_deleted_images = false;
image_id = FindOrInsertImage(info, image_gpu_addr);
} while (has_deleted_images);
if (!image_id) { if (!image_id) {
return NULL_IMAGE_VIEW_ID; return NULL_IMAGE_VIEW_ID;
} }
@ -1137,8 +1141,11 @@ typename TextureCache<P>::BlitImages TextureCache<P>::GetBlitImages(
} while (has_deleted_images); } while (has_deleted_images);
if (GetFormatType(dst_info.format) != SurfaceType::ColorTexture) { if (GetFormatType(dst_info.format) != SurfaceType::ColorTexture) {
// Make sure the images are depth and/or stencil textures. // Make sure the images are depth and/or stencil textures.
src_id = FindOrInsertImage(src_info, src_addr, RelaxedOptions{}); do {
dst_id = FindOrInsertImage(dst_info, dst_addr, RelaxedOptions{}); has_deleted_images = false;
src_id = FindOrInsertImage(src_info, src_addr, RelaxedOptions{});
dst_id = FindOrInsertImage(dst_info, dst_addr, RelaxedOptions{});
} while (has_deleted_images);
} }
return BlitImages{ return BlitImages{
.dst_id = dst_id, .dst_id = dst_id,
@ -1196,7 +1203,11 @@ template <class P>
ImageViewId TextureCache<P>::FindRenderTargetView(const ImageInfo& info, GPUVAddr gpu_addr, ImageViewId TextureCache<P>::FindRenderTargetView(const ImageInfo& info, GPUVAddr gpu_addr,
bool is_clear) { bool is_clear) {
const auto options = is_clear ? RelaxedOptions::Samples : RelaxedOptions{}; const auto options = is_clear ? RelaxedOptions::Samples : RelaxedOptions{};
const ImageId image_id = FindOrInsertImage(info, gpu_addr, options); ImageId image_id{};
do {
has_deleted_images = false;
image_id = FindOrInsertImage(info, gpu_addr, options);
} while (has_deleted_images);
if (!image_id) { if (!image_id) {
return NULL_IMAGE_VIEW_ID; return NULL_IMAGE_VIEW_ID;
} }

View File

@ -1151,7 +1151,6 @@ bool IsSubresource(const ImageInfo& candidate, const ImageBase& image, GPUVAddr
void DeduceBlitImages(ImageInfo& dst_info, ImageInfo& src_info, const ImageBase* dst, void DeduceBlitImages(ImageInfo& dst_info, ImageInfo& src_info, const ImageBase* dst,
const ImageBase* src) { const ImageBase* src) {
const auto original_src_format = src_info.format;
const auto original_dst_format = dst_info.format; const auto original_dst_format = dst_info.format;
if (src && GetFormatType(src->info.format) != SurfaceType::ColorTexture) { if (src && GetFormatType(src->info.format) != SurfaceType::ColorTexture) {
src_info.format = src->info.format; src_info.format = src->info.format;