Commit graph

30 commits

Author SHA1 Message Date
Thog 644de99e86
Implement GPU syncpoints (#980)
* Implement GPU syncpoints

This adds support for GPU syncpoints on the GPU backend & nvservices.

Everything that was implemented here is based on my researches,
hardware testing of the GM20B and reversing of nvservices (8.1.0).

Thanks to @fincs for the informations about some behaviours of the pusher
and for the initial informations about syncpoints.

* syncpoint: address gdkchan's comments

* Add some missing logic to handle SubmitGpfifo correctly

* Handle the NV event API correctly

* evnt => hostEvent

* Finish addressing gdkchan's comments

* nvservices: write the output buffer even when an error is returned

* dma pusher: Implemnet prefetch barrier

lso fix when the commands should be prefetch.

* Partially fix prefetch barrier

* Add a missing syncpoint check in QueryEvent of NvHostSyncPt

* Address Ac_K's comments and fix GetSyncpoint for ChannelResourcePolicy == Channel

* fix SyncptWait & SyncptWaitEx cmds logic

* Address ripinperi's comments

* Address gdkchan's comments

* Move user event management to the control channel

* Fix mm implementation, nvdec works again

* Address ripinperi's comments

* Address gdkchan's comments

* Implement nvhost-ctrl close accurately + make nvservices dispose channels when stopping the emulator

* Fix typo in MultiMediaOperationType
2020-04-19 11:25:57 +10:00
mageven 4960ab85f8
Implement Depth Clamping (#1120)
* Implement Depth Clamping and add misc enums

* Fix formatting
2020-04-17 11:16:49 +10:00
mageven 468d8f841f
Simple GPU fixes (#1093)
* Implement RasterizeEnable

* Match viewport count to hardware

* Simplify ScissorTest tracking around Blits

* Disable RasterizerDiscard around Blits and track its state

* Read RasterizeEnable reg as bool and add doc
2020-04-07 19:19:45 +10:00
gdkchan 9948a7be53
Support constant attributes (with a value of zero) (#1066)
* Support constant attributes (with a value of zero)

* Remove extra line
2020-03-30 13:11:24 +11:00
gdkchan ab4867505e
Implement GPU scissors (#1058)
* Implement GPU scissors

* Remove unused using

* Add missing changes for Clear
2020-03-29 14:02:58 +11:00
riperiperi 6db16b4110
Only enumerate cached textures that are modified when flushing. (#918)
* Only enumarate cached textures that are modified when flushing, rather than all of them.

* Remove locking.

* Add missing clear.

* Remove texture from modified list when data is disposed.

In case the game does not call either flush method at any point.

* Add ReferenceEqualityComparer from jD for the HashSet
2020-02-07 08:49:26 +11:00
gdkchan f373f870f7
Support configurable point size (#916) 2020-02-02 10:19:46 +11:00
gdkchan 532ccf929a Ignore exit flag on branch delay slot (#899) 2020-01-22 02:11:43 +01:00
gdkchan b8e3909d80 Add a GetSpan method to the memory manager and use it on GPU (#877) 2020-01-13 10:27:50 +11:00
gdkchan 383452f5cf Fix some shader disposal issues 2020-01-09 02:13:00 +01:00
gdkchan 92703af555 Address PR feedback 2020-01-09 02:13:00 +01:00
gdkchan 9bfb373bdf Remove more unused code 2020-01-09 02:13:00 +01:00
gdkchan 59fdaa744b GPU resource disposal 2020-01-09 02:13:00 +01:00
gdkchan 4a4e2f7c72 Add XML documentation to Ryujinx.Graphics.Gpu.Engine 2020-01-09 02:13:00 +01:00
gdkchan 80ff2eab29 Change GPU errors to debug and reduce log messages 2020-01-09 02:13:00 +01:00
gdkchan 654e617fe7 Some code cleanup 2020-01-09 02:13:00 +01:00
gdkchan 947e14d3be Reimplement limited bindless textures support 2020-01-09 02:13:00 +01:00
gdkchan 9d7a142a48 Support texture rectangle targets (non-normalized coords) 2020-01-09 02:13:00 +01:00
gdkchan 7ce5584f9e Support depth clip mode and disable shader fast math optimization on NVIDIA as a workaround for compiler bugs (?) 2020-01-09 02:13:00 +01:00
gdkchan 17fb11ddb9 Fix wrong maximum id on sampler pool in some cases 2020-01-09 02:13:00 +01:00
gdkchan cb171f6ebf Support shared color mask, implement more shader instructions
Support shared color masks (used by Nouveau and maybe the NVIDIA
driver).
Support draw buffers (also required by OpenGL).
Support viewport transform disable (disabled for now as it breaks some
games).
Fix instanced rendering draw being ignored for multi draw.
Fix IADD and IADD3 immediate shader encodings, that was not matching
some ops.
Implement FFMA32I shader instruction.
Implement IMAD shader instruction.
2020-01-09 02:13:00 +01:00
gdkchan e25b7c9848 Initial support for the guest OpenGL driver (NVIDIA and Nouveau) 2020-01-09 02:13:00 +01:00
gdk 16d88c21fc Improved and simplified window texture presentation 2020-01-09 02:13:00 +01:00
gdk 2437ccca0e Separate sub-channel state 2020-01-09 02:13:00 +01:00
gdk 6e399061ce Invalidate shaders when they are modified 2020-01-09 02:13:00 +01:00
gdk 3ab5c23f49 Add partial support for array of samplers, and add pass to identify them from bindless texture accesses 2020-01-09 02:13:00 +01:00
gdk d786d8d2b9 Support copy of slices to 3D textures, remove old 3D render target layered render support, do not delete textures with existing views created from them 2020-01-09 02:13:00 +01:00
gdk 8cba252b23 Add per-source type memory change tracking, simplified state change tracking, other fixes 2020-01-09 02:13:00 +01:00
gdk 1b7d955195 Initial support for image stores, support texture sample on compute 2020-01-09 02:13:00 +01:00
gdk 1876b346fe Initial work 2020-01-09 02:13:00 +01:00