Clone the state & flip viewport vertically (#16)

* implement texture get data

* reset all state before blit & clone state

* format

* support blit regions

* implement source region for blit

* replace bottom with top

* account for 0 size

* support image flipping

* revert presentation fixes & y flip

* revert

* flip viewport vertically

* switch face winding

* comment

* use SetBytes for texture clear

* implement missing compute builtins

* change storage and texture buffer alignment

* correct compute builtins

* don't use nullable for textures and samplers

* remove incorrect texture get data implementation

* Cleanup IntPtrs

---------

Co-authored-by: Isaac Marovitz <isaacryu@icloud.com>
This commit is contained in:
SamoZ256 2024-05-27 13:58:03 +02:00 committed by Isaac Marovitz
parent 20b1f6a6ee
commit 1f91c74a95
8 changed files with 91 additions and 69 deletions

View file

@ -93,10 +93,11 @@ namespace Ryujinx.Graphics.Metal
public static MTLWinding Convert(this FrontFace frontFace)
{
// The viewport is flipped vertically, therefore we need to switch the winding order as well
return frontFace switch
{
FrontFace.Clockwise => MTLWinding.Clockwise,
FrontFace.CounterClockwise => MTLWinding.CounterClockwise,
FrontFace.Clockwise => MTLWinding.CounterClockwise,
FrontFace.CounterClockwise => MTLWinding.Clockwise,
_ => LogInvalidAndReturn(frontFace, nameof(FrontFace), MTLWinding.Clockwise)
};
}