mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
Merge pull request #10583 from ameerj/ill-logic
AccelerateDMA: Fix incorrect check in Buffer<->Texture copies
This commit is contained in:
commit
6907d30258
@ -850,15 +850,11 @@ void TextureCache<P>::PopAsyncFlushes() {
|
|||||||
template <class P>
|
template <class P>
|
||||||
ImageId TextureCache<P>::DmaImageId(const Tegra::DMA::ImageOperand& operand, bool is_upload) {
|
ImageId TextureCache<P>::DmaImageId(const Tegra::DMA::ImageOperand& operand, bool is_upload) {
|
||||||
const ImageInfo dst_info(operand);
|
const ImageInfo dst_info(operand);
|
||||||
const ImageId dst_id = FindDMAImage(dst_info, operand.address);
|
const ImageId image_id = FindDMAImage(dst_info, operand.address);
|
||||||
if (!dst_id) {
|
if (!image_id) {
|
||||||
return NULL_IMAGE_ID;
|
|
||||||
}
|
|
||||||
auto& image = slot_images[dst_id];
|
|
||||||
if (False(image.flags & ImageFlagBits::GpuModified)) {
|
|
||||||
// No need to waste time on an image that's synced with guest
|
|
||||||
return NULL_IMAGE_ID;
|
return NULL_IMAGE_ID;
|
||||||
}
|
}
|
||||||
|
auto& image = slot_images[image_id];
|
||||||
if (!is_upload && !image.info.dma_downloaded) {
|
if (!is_upload && !image.info.dma_downloaded) {
|
||||||
// Force a full sync.
|
// Force a full sync.
|
||||||
image.info.dma_downloaded = true;
|
image.info.dma_downloaded = true;
|
||||||
@ -868,7 +864,7 @@ ImageId TextureCache<P>::DmaImageId(const Tegra::DMA::ImageOperand& operand, boo
|
|||||||
if (!base) {
|
if (!base) {
|
||||||
return NULL_IMAGE_ID;
|
return NULL_IMAGE_ID;
|
||||||
}
|
}
|
||||||
return dst_id;
|
return image_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class P>
|
template <class P>
|
||||||
|
Loading…
Reference in New Issue
Block a user