2018-04-08 15:17:35 -04:00
|
|
|
using Ryujinx.Graphics.Gal;
|
|
|
|
|
NvServices refactoring (#120)
* Initial implementation of NvMap/NvHostCtrl
* More work on NvHostCtrl
* Refactoring of nvservices, move GPU Vmm, make Vmm per-process, refactor most gpu devices, move Gpu to Core, fix CbBind
* Implement GetGpuTime, support CancelSynchronization, fix issue on InsertWaitingMutex, proper double buffering support (again, not working properly for commercial games, only hb)
* Try to fix perf regression reading/writing textures, moved syncpts and events to a UserCtx class, delete global state when the process exits, other minor tweaks
* Remove now unused code, add comment about probably wrong result codes
2018-05-07 14:53:23 -04:00
|
|
|
namespace Ryujinx.Core.Gpu
|
2018-04-08 15:17:35 -04:00
|
|
|
{
|
2018-06-08 20:15:56 -04:00
|
|
|
struct Texture
|
2018-04-08 15:17:35 -04:00
|
|
|
{
|
|
|
|
public long Position { get; private set; }
|
|
|
|
|
|
|
|
public int Width { get; private set; }
|
|
|
|
public int Height { get; private set; }
|
2018-04-08 16:09:41 -04:00
|
|
|
public int Pitch { get; private set; }
|
2018-04-08 15:17:35 -04:00
|
|
|
|
|
|
|
public int BlockHeight { get; private set; }
|
|
|
|
|
|
|
|
public TextureSwizzle Swizzle { get; private set; }
|
|
|
|
|
|
|
|
public GalTextureFormat Format { get; private set; }
|
|
|
|
|
2018-04-13 14:12:58 -04:00
|
|
|
public Texture(
|
|
|
|
long Position,
|
|
|
|
int Width,
|
|
|
|
int Height)
|
|
|
|
{
|
|
|
|
this.Position = Position;
|
|
|
|
this.Width = Width;
|
|
|
|
this.Height = Height;
|
|
|
|
|
|
|
|
Pitch = 0;
|
|
|
|
|
|
|
|
BlockHeight = 16;
|
|
|
|
|
|
|
|
Swizzle = TextureSwizzle.BlockLinear;
|
|
|
|
|
|
|
|
Format = GalTextureFormat.A8B8G8R8;
|
|
|
|
}
|
|
|
|
|
2018-04-08 15:17:35 -04:00
|
|
|
public Texture(
|
|
|
|
long Position,
|
|
|
|
int Width,
|
|
|
|
int Height,
|
2018-04-08 16:09:41 -04:00
|
|
|
int Pitch,
|
2018-04-08 15:17:35 -04:00
|
|
|
int BlockHeight,
|
|
|
|
TextureSwizzle Swizzle,
|
|
|
|
GalTextureFormat Format)
|
|
|
|
{
|
|
|
|
this.Position = Position;
|
|
|
|
this.Width = Width;
|
|
|
|
this.Height = Height;
|
2018-04-08 16:09:41 -04:00
|
|
|
this.Pitch = Pitch;
|
2018-04-08 15:17:35 -04:00
|
|
|
this.BlockHeight = BlockHeight;
|
|
|
|
this.Swizzle = Swizzle;
|
|
|
|
this.Format = Format;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|