Support texture rectangle targets (non-normalized coords)

This commit is contained in:
gdkchan 2019-12-16 01:59:46 -03:00 committed by Thog
parent 2eccc7023a
commit 9d7a142a48
23 changed files with 473 additions and 356 deletions

View file

@ -36,11 +36,7 @@ namespace Ryujinx.Graphics.Gpu.Image
if (texture == null)
{
ulong address = Address + (ulong)(uint)id * DescriptorSize;
Span<byte> data = Context.PhysicalMemory.Read(address, DescriptorSize);
TextureDescriptor descriptor = MemoryMarshal.Cast<byte, TextureDescriptor>(data)[0];
TextureDescriptor descriptor = GetDescriptor(id);
TextureInfo info = GetInfo(descriptor);
@ -66,6 +62,15 @@ namespace Ryujinx.Graphics.Gpu.Image
return texture;
}
public TextureDescriptor GetDescriptor(int id)
{
ulong address = Address + (ulong)(uint)id * DescriptorSize;
Span<byte> data = Context.PhysicalMemory.Read(address, DescriptorSize);
return MemoryMarshal.Cast<byte, TextureDescriptor>(data)[0];
}
protected override void InvalidateRangeImpl(ulong address, ulong size)
{
ulong endAddress = address + size;