Commit graph

2533 commits

Author SHA1 Message Date
gdkchan
c0791b70e7 Texture/Vertex/Index data cache (#132)
* Initial implementation of the texture cache

* Cache vertex and index data aswell, some cleanup

* Improve handling of the cache by storing cached ranges on a list for each page

* Delete old data from the caches automatically, ensure that the cache is cleaned when the mapping/size changes, and some general cleanup
2024-02-22 19:13:38 -05:00
riperiperi
d06edd356b ReadBytes function in AMemory, with cleaner range check. (#136) 2024-02-22 19:13:38 -05:00
greggameplayer
de8e04d3e3 Add & Correct ErrorModules (#137)
* Add & Correct ErrorModules

* Remove LibNX specific ErrorModules

* Remove Homebrew Specific ErrorModules
2024-02-22 19:13:38 -05:00
gdkchan
4a94313fe2 Force inline some of the vector read/write methods 2024-02-22 19:13:38 -05:00
gdkchan
b3f675874c Fix ILibraryAppletCreator CreateStorage, implement Write on IStorageAccessor 2024-02-22 19:13:38 -05:00
gdkchan
a1e3dacb89 Use GetBufferType0x21 on TransactParcelAuto aswell 2024-02-22 19:13:38 -05:00
Starlet
3c403aa71d SMO stubs and implementations (#129)
* WIP SMO stubs and implementations

* fixes?

* Add StorageHelper

* Whoops

* Compliant with review.

* Remove unnecessary usings
2024-02-22 19:13:37 -05:00
gdkchan
e56fae18f1 Fix copy-paste mistake, also related to astc... 2024-02-22 19:13:37 -05:00
gdkchan
95867fc50a Fix mistake on astc conversion, make some static methods that shouldn't be public private, remove old commmented out code 2024-02-22 19:13:37 -05:00
gdkchan
7d0227b89a Re add some texture formats that I somehow removed by accident on OGLEnumConverter 2024-02-22 19:13:37 -05:00
gdkchan
30bb60a874 Some small gpu improvements and shader improvements, add support for ASTC 4x4 textures (slow!) 2024-02-22 19:13:37 -05:00
Ac_K
8a385d2e26 Add an ASTC Decoder (Not currently used in Ryujinx) (#131)
* Add an ASTC Decoder (Not currently used in Ryujinx)

* Update ASTCDecoder.cs
2024-02-22 19:13:37 -05:00
gdkchan
9f22e38f25 Added support for more shader instructions and texture formats, fix swapped channels in RGB565 and RGBA5551? texture formats, allow zero values on blending registers, initial work to build CFG on the shader decoder, update the BRA instruction to work with it (WIP) 2024-02-22 19:13:37 -05:00
gdkchan
08dd15b8c8 Initial work to support AArch32 with a interpreter, plus nvmm stubs (not used for now) 2024-02-22 19:13:37 -05:00
Starlet
f156278fc2 [IApplicationFunctions/INvDrvServices] Stub GetPseudoDeviceId, FinishInitialize and add more pctl service names. (#127)
* [INvDrvServices] Stub FinishInitialize

* [IApplicationFunctions] Stub GetPseudoDeviceId

* I need to proofread my shit...

* Also add more pctl service names
2024-02-22 19:13:37 -05:00
gdkchan
4625af5d16 Fix wrong type on CMTST instruction 2024-02-22 19:13:37 -05:00
gdkchan
234fbde388 Remove some calls generated on the CPU for inexistent intrinsic methods 2024-02-22 19:13:37 -05:00
gdkchan
e08289662d Improve shader sending method to GAL, use a memory interface instead of reading a fixed array size and sending every time 2024-02-22 19:13:37 -05:00
Starlet
39a52d234d [SvcSystem/SvcMemory] Implement SvcGetInfo 16, SvcMapPhysicalMemory & SvcUnmapPhysicalMemory (#126)
* [SvcSystem] Implement SvcGetInfo 16

SvcGetInfo 16 always should be 1(?)

* Implement SvcMapPhysicalMemory &  SvcUnmapPhysicalMemory

* Adjusted to review.
2024-02-22 19:13:37 -05:00
Thomas Guillemard
32bf275e2e Add a C++ demangler (#119)
* Add a C++ demangler for PrintStackTrace

This is a simple C++ demangler (only supporting name demangling) that will
probably be enough for any stacktrace cases.

* Create Ryujinx.Core.OsHle.Diagnostics.Demangler and move DemangleName

* Rename Demangler -> Demangle + Fix coding style

* Starting a real parsing for demangler (still simple and no compression support yet)

* Partially implement decompression

* Improve compression support (still need to fix errored compression indexing)

* Some cleanup

* Fix Demangle.Parse call in PrintStackTrace

* Trim parameters result to get more clear prototypes

* Rename Demangle -> Demangler and fix access level

* Fix substitution possible issues also improve code readability

* Redo compression indexing to be more accurate

* Add support of not nested function name
2024-02-22 19:13:37 -05:00
gdkchan
060bbeb933 Add scalar variants of FCVTZS/FCVTZU, fix a issue on Ryushader 2024-02-22 19:13:37 -05:00
gdkchan
ba5e369087 Added more shader instructions, including BFE, BRA (partial), FMNMX, ISCADD, SHL, LD_C, some shader related fixes, added support for texture component selection 2024-02-22 19:13:37 -05:00
gdkchan
db6645cfc0 Only use higher priority on yield, change reschedule to be per-thread instead of using SchedulerThread to store the reschedule flag 2024-02-22 19:13:36 -05:00
gdkchan
7615886d7c Fix some races in SvcThreadSync and change the way how yield works 2024-02-22 19:13:36 -05:00
Ac_K
ce46c6ea8c Update README.md 2024-02-22 19:13:36 -05:00
gdkchan
acf166610a Fix typo and update priority/avoid duplicates on UpdateMutexOwner 2024-02-22 19:13:36 -05:00
gdkchan
5fadde53aa Some improvements to SetThreadCoreMask, simplified implementation of wait lists 2024-02-22 19:13:36 -05:00
gdkchan
3742ee9ac1 Implement GetTpcMasks on nvservices 2024-02-22 19:13:36 -05:00
gdkchan
7cac6a93c7 Better implementation of SetThreadCoreMask that allows changing the Core Mask (untested, no clue if it actually works) 2024-02-22 19:13:36 -05:00
gdkchan
6cb8ca969f Initial work to support changing thread core on the scheduler, also some cond var priority fixes 2024-02-22 19:13:36 -05:00
gdkchan
a480fd22c4 Allow using self thread id on some svcs (fixes #117) 2024-02-22 19:13:36 -05:00
gdkchan
bed4efd4af Fix WidthInGobs on the GPU 2024-02-22 19:13:36 -05:00
gdkchan
60895d2929 Update min sdk version on readme (for real this time) 2024-02-22 19:13:36 -05:00
gdkchan
71272d1392 Update min sdk version on readme 2024-02-22 19:13:36 -05:00
gdkchan
abbd412356 Add intrinsics support (#121)
* Initial intrinsics support

* Update tests to work with the new Vector128 type and intrinsics

* Drop SSE4.1 requirement

* Fix copy-paste mistake
2024-02-22 19:13:36 -05:00
Starlet
aebab93fd3 Fix NV stubs (#124)
* Fix NV stubs

* Compliant with feedback

* Oops, Compliant with feedback #2
2024-02-22 19:13:36 -05:00
Thomas Guillemard
f565a00707 Implement ISystemDisplayService::GetDisplayMode & Add IManagerDisplayService::SetLayerVisibility stub (#118)
* Add ISystemDisplayService::GetDisplayMode & IManagerDisplayService::SetLayerVisibility

Also add some missing PrintStub calls

* Fix import ordering & Fix incorrect value for the third word in GetDisplayMode
2024-02-22 19:13:36 -05:00
gdkchan
ecfbe27980 Fix regression caused by wrong endian on GetAudioRendererWorkBufferSize version check 2024-02-22 19:13:36 -05:00
gdkchan
c17de10661 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
2024-02-22 19:13:35 -05:00
Ac_K
d32b42a6de Update IAudioRendererManager.cs 2024-02-22 19:13:35 -05:00
Ac_K
4fe6c6cbaf A REAL fix for some games. (#116)
* Update IAudioRendererManager.cs

* Update IAudioRendererManager.cs

* Update IAudioRendererManager.cs
2024-02-22 19:13:35 -05:00
gdkchan
12b535becb Ignore ZR target texture color registers on shader 2024-02-22 19:13:35 -05:00
LDj3SNuD
630a38435a Add Sqxtn_S, Sqxtn_V, Uqxtn_S, Uqxtn_V instructions and Tests (6). (#110)
* Update ILGeneratorEx.cs

* Update AOpCodeTable.cs

* Update AInstEmitSimdArithmetic.cs

* Update CpuTestSimd.cs

* Update CpuTestSimdReg.cs

* Update CpuTest.cs

* Update Pseudocode.cs

* Update Instructions.cs

* Update AInstEmitSimdArithmetic.cs

* Update AInstEmitSimdArithmetic.cs

* Update AInstEmitSimdArithmetic.cs
2024-02-22 19:13:35 -05:00
gdkchan
a1b35e5eea Fix GetDesiredLanguage and expose a way to set the desired language, default to english 2024-02-22 19:13:35 -05:00
gdkchan
d9b8c6fb90 Properly support multiple vertex buffers, stub 2 ioctls, fix a shader issue, change the way how the vertex buffer size is calculated for the buffers with limit = 0 2024-02-22 19:13:35 -05:00
gdkchan
f6bc36b6a9 Remove unnecessary casts from NxSettings 2024-02-22 19:13:35 -05:00
gdkchan
b091970fd9 Add null terminator to audio device names when writing to the output buffer 2024-02-22 19:13:35 -05:00
gdkchan
9821a50c96 Remove thread from the threads list when it finishes, remove debug code 2024-02-22 19:13:35 -05:00
LDj3SNuD
a3dffb299b Update AOpCodeTable.cs (#108) 2024-02-22 19:13:35 -05:00
LDj3SNuD
96c0a31109 Add Cls_V, Clz_V, Orn_V instructions. Add 18 Tests: And_V, Bic_V, Bif_V, Bit_V, Bsl_V, Cls_V, Clz_V, Orn_V, Orr_V. (#104)
* Update AOpCodeTable.cs

* Update AInstEmitSimdLogical.cs

* Update AInstEmitSimdArithmetic.cs

* Update ASoftFallback.cs

* Update AInstEmitAlu.cs

* Update Pseudocode.cs

* Update Instructions.cs

* Update CpuTestSimdReg.cs

* Update CpuTestSimd.cs
2024-02-22 19:13:35 -05:00