mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-22 04:24:44 +00:00
fix build
This commit is contained in:
parent
77af525ed6
commit
324180cd2e
3 changed files with 5 additions and 7 deletions
|
@ -541,10 +541,12 @@ void BufferCache::SynchronizeBuffer(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{};
|
||||
info.guest_address = device_addr;
|
||||
info.guest_size_bytes = size;
|
||||
info.type = vk::ImageType::e2D;
|
||||
const ImageId image_id = texture_cache.FindImage(info, flags);
|
||||
if (!image_id) {
|
||||
return false;
|
||||
|
|
|
@ -43,7 +43,7 @@ void TextureCache::InvalidateMemory(VAddr address, size_t size) {
|
|||
ForEachImageInRegion(address, size, [&](ImageId image_id, Image& image) {
|
||||
const size_t image_dist =
|
||||
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.
|
||||
image.flags |= ImageFlagBits::CpuModified;
|
||||
}
|
||||
|
@ -146,10 +146,6 @@ ImageId TextureCache::ResolveOverlap(const ImageInfo& image_info, ImageId cache_
|
|||
|
||||
FreeImage(cache_image_id);
|
||||
}
|
||||
|
||||
if (tex_cache_image.info.IsSliceOf(image_info)) {
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
return merged_image_id;
|
||||
|
|
|
@ -69,7 +69,7 @@ public:
|
|||
/// Updates image contents if it was modified by CPU.
|
||||
void UpdateImage(ImageId image_id, Vulkan::Scheduler* custom_scheduler = nullptr) {
|
||||
Image& image = slot_images[image_id];
|
||||
TrackImage(image, image_id);
|
||||
TrackImage(image_id);
|
||||
RefreshImage(image, custom_scheduler);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue