Fixed false-positive image reuploads (#1557)

* Fixed false-positive image reuploads

* Fixed userfaultfd path, removed dead code, simplified calculations

* oopsie

* track potentially dirty images and hash them

* untrack only first page of the image in case of head access

* rebase, initialize hash, fix bounds check

* include image tail in the calculations
This commit is contained in:
Vladislav Mikhalin 2024-11-26 23:45:15 +03:00 committed by GitHub
parent 3f1be5a4ce
commit 18a36c5daa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 196 additions and 40 deletions

View file

@ -635,7 +635,7 @@ bool BufferCache::SynchronizeBufferFromImage(Buffer& buffer, VAddr device_addr,
"Texel buffer aliases image subresources {:x} : {:x}", device_addr,
image.info.guest_address);
boost::container::small_vector<vk::BufferImageCopy, 8> copies;
u32 offset = buffer.Offset(image.cpu_addr);
u32 offset = buffer.Offset(image.info.guest_address);
const u32 num_layers = image.info.resources.layers;
const u32 max_offset = offset + size;
for (u32 m = 0; m < image.info.resources.levels; m++) {