Allow partially mapped textures with unmapped start (#4394)
This commit is contained in:
parent
5f38086f94
commit
61b1ce252f
2 changed files with 39 additions and 0 deletions
|
@ -474,6 +474,13 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
{
|
||||
address = memoryManager.Translate(info.GpuAddress);
|
||||
|
||||
// If the start address is unmapped, let's try to find a page of memory that is mapped.
|
||||
if (address == MemoryManager.PteUnmapped)
|
||||
{
|
||||
address = memoryManager.TranslateFirstMapped(info.GpuAddress, (ulong)info.CalculateSizeInfo(layerSize).TotalSize);
|
||||
}
|
||||
|
||||
// If address is still invalid, the texture is fully unmapped, so it has no data, just return null.
|
||||
if (address == MemoryManager.PteUnmapped)
|
||||
{
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue