Commit graph

1342 commits

Author SHA1 Message Date
gdkchan 8d168574eb
Use explicit buffer and texture bindings on shaders (#1666)
* Use explicit buffer and texture bindings on shaders

* More XML docs and other nits
2020-11-08 12:10:00 +01:00
riperiperi 5561a3b95e
Synchronize Rasterizer State before Clear (#1680) 2020-11-07 16:21:10 -03:00
riperiperi 500b48251c
Only report that GPU commands are available when the queue is not empty. (#1656)
* Only report that commands are available when the queue is not empty.

* Address Feedback

Co-authored-by: FICTURE7 <FICTURE7@gmail.com>

Co-authored-by: FICTURE7 <FICTURE7@gmail.com>
2020-11-06 23:04:26 -03:00
EmulationFanatic 61d83760f5
Update game compatibility list info in README.md (#1675)
* Update game compatibility list info in README.md

* clarity on playable games
2020-11-06 22:05:35 +01:00
Ac_K b677e44300
Loaders: Log extra NSO informations (#1661)
NSO files can contains useful informations who aren't currently logged.
This PR fix that by logging Module name, Libraries and SDK Version when they are available.
2020-11-06 19:58:57 +01:00
Mary 61e67b64ea
updater: Ignore first commandline argument when passing commandline to updated binary (#1674)
Fix a regression caused by #1643.
2020-11-06 19:46:22 +01:00
gdkchan ce9105a130
Support single precision contants for double precision operations (#1673) 2020-11-06 18:54:13 +01:00
riperiperi a16f201a6f
Do not align sizes for buffer texture targets. (#1671)
This should fix a random crash in Hyrule Warriors, and potentially other games that use buffer textures.
2020-11-06 18:45:30 +01:00
gdkchan 24dbfc0fe6
Correct BPP of buffer to texture copies (#1670) 2020-11-06 18:37:05 +01:00
gdkchan a89b81a812
Separate zeta from color formats (#1647) 2020-11-05 23:50:34 +01:00
FICTURE7 64088f04e3
Fix LiveInterval.Split (#1660)
Before when splitting intervals, the end of the range would be included
in the split check, this can produce empty ranges in the child split.

This in turn can affect spilling decisions since the child split will
have a different start position and this empty range will get a register
and move to the active set for a brief moment.

For example:

  A = [153, 172[; [1899, 1916[; [1991, 2010[; [2397, 2414[; ...

  Split(A, 1916)

  A0 = [153, 172[; [1899, 1916[
  A1 = [1916, 1916[; [1991, 2010[; [2397, 2414[; ...
2020-11-04 23:09:45 -03:00
riperiperi 4c6feb652f
Add seamless cubemap flag in sampler parameters. (#1658)
* Add seamless cubemap flag in sampler parameters.

* Check for the extension
2020-11-02 17:03:06 -03:00
riperiperi e1da7df207
Support res scale on images, correctly blacklist for SUST, move logic out of backend. (#1657)
* Support res scale on images, correctly blacklist for SUST, move logic
out of backend.

* Fix Typo
2020-11-02 16:53:23 -03:00
gdkchan 11a7c99764
Support 3D BC4 and BC5 compressed textures (#1655)
* Support 3D BC4 and BC5 compressed textures

* PR feedback

* Fix some typos
2020-11-01 15:32:53 -03:00
gdkchan 6222f173f0
Fix compressed to non-compressed texture copy size (#1649) 2020-11-01 15:26:24 -03:00
gdkchan 876fa656f6
Remove unused texture and sampler pool invalidation code (#1648) 2020-11-01 15:17:29 -03:00
CeruleanSky b5a760bde9
Preserve command line arguments when updater restarts Ryujinx (#1643)
Command line arguements are not preserved by the updater, and this causes an issue when the updater restarts Ryujinx in portable mode as it will create/use/modify its default directory instead.

This simple pull addresses the first part of #1594 

As far as the second part of the issue, where the updater perhaps overzealously deletes everything but log files and folders, which causes problems in portable installs with a user subfolder or something else inside the Ryujinx folder. 

Perhaps an UpdateList.txt containing a list of files that the updater deletes is included in the ryujinx.zip/tar.gz/etc and placed in the upacked directory for the updater to use upon the next upgrade.

The build system can run something like `forfiles /s /m *.txt /c "cmd /c echo @relpath"` or the correct command for the OS and include it in the distribution, or it could be generated by the updater itself.
2020-10-29 23:07:10 +01:00
gdkchan 423da5cc91
Scale texture resolution before sending to backend (#1646)
* Work

* Propagate scale factor to copy temp. Not really needed, just here for consistency

* PR feedback
2020-10-29 22:57:34 +01:00
riperiperi 780c7530d6
Add scaling for Texture2DArray when using TexelFetch. (#1645)
* Add scaling for Texture2DArray when using TexelFetch.

* Should only really trigger for Texture2D. (do not emit texelfetch for
TextureBufferArray(?) and Texture1DArray)

* Address nit.
2020-10-28 21:27:46 +01:00
gdkchan 0031edae27
Avoid sampler conflicts on bindless samplers with the same name (#1642) 2020-10-28 21:20:43 +01:00
emmauss 9f13f957af
Motion Fixes (#1589)
* fix stalling when server is offline

* add retry timer to fail server connections, fix alt slot number

* fix alt slot key issue

* fix crash when saving controller config with empty fields

* code fixes

* add index check in motion hid update, made HandleResponse async

Co-authored-by: Emmanuel <nhv3@localhost.localdomain>
2020-10-28 20:52:07 +01:00
gdkchan c9841dab38
Fix vertex buffer handle null check (#1638) 2020-10-26 01:40:50 +01:00
gdkchan 812e32f775
Fix transform feedback errors caused by host pause/resume and multiple uses (#1634)
* Fix transform feedback errors caused by host pause/resume

* Fix TFB being used as something else issue with copies

* This is supposed to be StreamCopy
2020-10-25 17:23:42 -03:00
gdkchan cf0f0fc4e7
Improve the speed of redundant ASTC texture data updates (#1636) 2020-10-25 17:09:45 -03:00
gdkchan 49f970d5bd
Implement CAL and RET shader instructions (#1618)
* Add support for CAL and RET shader instructions

* Remove unused stuff

* Fix a bug that could cause the wrong values to be passed to a function

* Avoid repopulating function id dictionary every time

* PR feedback

* Fix vertex shader A/B merge
2020-10-25 17:00:44 -03:00
gdkchan 973a615d40
Fix shader image load/store array index register (#1637)
* Fix shader image load/store array index register

* Y should come before the array index
2020-10-25 14:51:26 -03:00
gdkchan 2f16491712
Get rid of Reflection.Emit dependency on CPU and Shader projects (#1626)
* Get rid of Reflection.Emit dependency on CPU and Shader projects

* Remove useless private sets

* Missed those due to the alignment
2020-10-21 09:13:44 -03:00
gdkchan efa77a2415
Add missing null check on image binding (#1632) 2020-10-21 14:06:13 +02:00
gdkchan 2dcc6333f8
Fix image binding format (#1625)
* Fix image binding format

* XML doc
2020-10-20 19:03:20 -03:00
riperiperi 08332bdc04
Ensure storage is set for Buffer Textures when binding an Image. (#1627) 2020-10-20 18:56:23 -03:00
gdkchan 5264d55b39
Fix gl_in being used with built-in variables that are not per-vertex (#1624) 2020-10-17 10:16:40 +02:00
riperiperi b4d8d893a4
Memory Read/Write Tracking using Region Handles (#1272)
* WIP Range Tracking

- Texture invalidation seems to have large problems
- Buffer/Pool invalidation may have problems
- Mirror memory tracking puts an additional `add` in compiled code, we likely just want to make HLE access slower if this is the final solution.
- Native project is in the messiest possible location.
- [HACK] JIT memory access always uses native "fast" path
- [HACK] Trying some things with texture invalidation and views.

It works :)

Still a few hacks, messy things, slow things

More work in progress stuff (also move to memory project)

Quite a bit faster now.
- Unmapping GPU VA and CPU VA will now correctly update write tracking regions, and invalidate textures for the former.
- The Virtual range list is now non-overlapping like the physical one.
- Fixed some bugs where regions could leak.
- Introduced a weird bug that I still need to track down (consistent invalid buffer in MK8 ribbon road)

Move some stuff.

I think we'll eventually just put the dll and so for this in a nuget package.

Fix rebase.

[WIP] MultiRegionHandle variable size ranges

- Avoid reprotecting regions that change often (needs some tweaking)
- There's still a bug in buffers, somehow.
- Might want different api for minimum granularity

Fix rebase issue

Commit everything needed for software only tracking.

Remove native components.

Remove more native stuff.

Cleanup

Use a separate window for the background context, update opentk. (fixes linux)

Some experimental changes

Should get things working up to scratch - still need to try some things with flush/modification and res scale.

Include address with the region action.

Initial work to make range tracking work

Still a ton of bugs

Fix some issues with the new stuff.

* Fix texture flush instability

There's still some weird behaviour, but it's much improved without this. (textures with cpu modified data were flushing over it)

* Find the destination texture for Buffer->Texture full copy

Greatly improves performance for nvdec videos (with range tracking)

* Further improve texture tracking

* Disable Memory Tracking for view parents

This is a temporary approach to better match behaviour on master (where invalidations would be soaked up by views, rather than trigger twice)

The assumption is that when views are created to a texture, they will cover all of its data anyways. Of course, this can easily be improved in future.

* Introduce some tracking tests.

WIP

* Complete base tests.

* Add more tests for multiregion, fix existing test.

* Cleanup Part 1

* Remove unnecessary code from memory tracking

* Fix some inconsistencies with 3D texture rule.

* Add dispose tests.

* Use a background thread for the background context.

Rather than setting and unsetting a context as current, doing the work on a dedicated thread with signals seems to be a bit faster.

Also nerf the multithreading test a bit.

* Copy to texture with matching alignment

This extends the copy to work for some videos with unusual size, such as tutorial videos in SMO. It will only occur if the destination texture already exists at XCount size.

* Track reads for buffer copies. Synchronize new buffers before copying overlaps.

* Remove old texture flushing mechanisms.

Range tracking all the way, baby.

* Wake the background thread when disposing.

Avoids a deadlock when games are closed.

* Address Feedback 1

* Separate TextureCopy instance for background thread

Also `BackgroundContextWorker.InBackground` for a more sensible idenfifier for if we're in a background thread.

* Add missing XML docs.

* Address Feedback

* Maybe I should start drinking coffee.

* Some more feedback.

* Remove flush warning, Refocus window after making background context
2020-10-16 17:18:35 -03:00
gdkchan f02791b20c
Fix LOP3 (cbuf) shader instruction encoding (#1616) 2020-10-13 19:33:04 -03:00
riperiperi aec8177850
Replace Host FPS with GPU command queue load ("Fifo %") (#1585)
* Replace Host FPS with FIFO%

* Change measurement order. Improve calculation.

Now at 100% when FIFO is blocking game exectution, rather than "0".

* Address feedback (1)

* Remove Host FPS

* FIFO rather than Fifo

* Address Ac_k feedback

* Rebase
2020-10-14 07:54:42 +11:00
LDj3SNuD 04e330cc00
Add Umaal & Vabd_I, Vabdl_I, Vaddl_I, Vhadd, Vqshrn, Vshll inst.s (slow paths). (#1577)
* Add Umaal & Vabd_I, Vabdl_I, Vaddl_I, Vhadd, Vqshrn, Vshll inst.s (slow paths).

No test provided (i.e. draft).

* Ptc InternalVersion = 1577
2020-10-13 22:41:33 +02:00
gdkchan 329ba5b39b
Fix incorrect GPU GL blend func values (#1612) 2020-10-13 14:45:41 +11:00
gdkchan d36c4bfba5
Fix output component register on pixel shaders (#1613)
* Fix output component register on pixel shaders

* Clean up usings

* Do not advance if no component is enabled for the target, this keeps the previous behavior
2020-10-13 14:44:55 +11:00
gdkchan 6a51b628f9
Fix error when dual source blend is used (#1610)
* Fix error when dual source blend is used

* Ensure framebuffer
2020-10-12 21:50:41 -03:00
gdkchan e4777717cd
Implement LEA.HI shader instruction (#1609) 2020-10-12 21:46:04 -03:00
gdkchan b066cfc1a3
Add support for shader constant buffer slot indexing (#1608)
* Add support for shader constant buffer slot indexing

* Fix typo
2020-10-12 21:40:50 -03:00
gdkchan 14fd9aa640
Fix H264 output frame size when decoding videos of different sizes (#1606) 2020-10-11 11:09:38 +02:00
Mary c482718d2e
surfaceflinger: Disable async buffer (#1603)
This fix a mistake I made during my original reimplementation of SurfaceFlinger by disabling async buffer.

This fix a memory corruption on Super Mario All-Stars 3D (Super Mario Sunshine & Super
Mario Galaxy now go ingame).

Thanks to @gdkchan for tracing the memory corruption.
2020-10-10 21:45:49 +11:00
Thog ace67ed324 Rollback the CreateExitDialog function that was lost with auto updater 2020-10-10 01:22:25 +02:00
Xpl0itR ce87650d81
Show confirmation dialog when attempting to close while a game is loaded (#1582) 2020-10-10 01:06:48 +02:00
Mary 8506b7a334
Fix exiting emulator with multi programs (#1590)
THis fix a bug introduced in #1560 that would cause "Stop emulation" to
actually restart the game all the time.
2020-10-10 00:52:11 +02:00
gdkchan 0954e76a26
Improve BRX target detection heuristics (#1591) 2020-10-03 15:43:33 +10:00
gdkchan 86412ed30a
Supper 2D array ASTC compressed texture formats decoding (#1593) 2020-10-02 11:22:23 +10:00
jduncanator f8c41a9a51
Touch README (#1592)
This touches the README to trigger a rebuild of CI.
2020-10-01 09:39:27 +02:00
Mary 2ac0ce4557
Fix GetStream implementation (#1588)
Fix wrong argument usage on GetStream.

Doesn't change anything as it's not used but a nice catch from jD ^^.
2020-10-01 05:22:09 +02:00
gdkchan f2b12c9749
Remove old, unused CPU optimization (#1586) 2020-09-30 16:16:34 -03:00