mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-03 16:02:26 +00:00
fix build
This commit is contained in:
parent
77af525ed6
commit
324180cd2e
@ -541,10 +541,12 @@ void BufferCache::SynchronizeBuffer(Buffer& buffer, VAddr device_addr, u32 size,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool BufferCache::SynchronizeBufferFromImage(Buffer& buffer, VAddr device_addr, u32 size) {
|
bool BufferCache::SynchronizeBufferFromImage(Buffer& buffer, VAddr device_addr, u32 size) {
|
||||||
constexpr FindFlags flags = FindFlags::NoCreate | FindFlags::FullOverlap | FindFlags::RelaxDim;
|
constexpr FindFlags flags = FindFlags::NoCreate | FindFlags::RelaxSize |
|
||||||
|
FindFlags::RelaxFmt | FindFlags::RelaxDim;
|
||||||
ImageInfo info{};
|
ImageInfo info{};
|
||||||
info.guest_address = device_addr;
|
info.guest_address = device_addr;
|
||||||
info.guest_size_bytes = size;
|
info.guest_size_bytes = size;
|
||||||
|
info.type = vk::ImageType::e2D;
|
||||||
const ImageId image_id = texture_cache.FindImage(info, flags);
|
const ImageId image_id = texture_cache.FindImage(info, flags);
|
||||||
if (!image_id) {
|
if (!image_id) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -43,7 +43,7 @@ void TextureCache::InvalidateMemory(VAddr address, size_t size) {
|
|||||||
ForEachImageInRegion(address, size, [&](ImageId image_id, Image& image) {
|
ForEachImageInRegion(address, size, [&](ImageId image_id, Image& image) {
|
||||||
const size_t image_dist =
|
const size_t image_dist =
|
||||||
image.cpu_addr > address ? image.cpu_addr - address : address - image.cpu_addr;
|
image.cpu_addr > address ? image.cpu_addr - address : address - image.cpu_addr;
|
||||||
if (image_dist < MaxInvalidateDist && image.info.size.width != 1) {
|
if (image_dist < MaxInvalidateDist && image.info.size.width > 16) {
|
||||||
// Ensure image is reuploaded when accessed again.
|
// Ensure image is reuploaded when accessed again.
|
||||||
image.flags |= ImageFlagBits::CpuModified;
|
image.flags |= ImageFlagBits::CpuModified;
|
||||||
}
|
}
|
||||||
@ -146,10 +146,6 @@ ImageId TextureCache::ResolveOverlap(const ImageInfo& image_info, ImageId cache_
|
|||||||
|
|
||||||
FreeImage(cache_image_id);
|
FreeImage(cache_image_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tex_cache_image.info.IsSliceOf(image_info)) {
|
|
||||||
UNREACHABLE();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return merged_image_id;
|
return merged_image_id;
|
||||||
|
@ -69,7 +69,7 @@ public:
|
|||||||
/// Updates image contents if it was modified by CPU.
|
/// Updates image contents if it was modified by CPU.
|
||||||
void UpdateImage(ImageId image_id, Vulkan::Scheduler* custom_scheduler = nullptr) {
|
void UpdateImage(ImageId image_id, Vulkan::Scheduler* custom_scheduler = nullptr) {
|
||||||
Image& image = slot_images[image_id];
|
Image& image = slot_images[image_id];
|
||||||
TrackImage(image, image_id);
|
TrackImage(image_id);
|
||||||
RefreshImage(image, custom_scheduler);
|
RefreshImage(image, custom_scheduler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user