Commit graph

2162 commits

Author SHA1 Message Date
ReinUsesLisp
3953fe522b Implement SSY/SYNC shader instructions (#382)
* Use a program counter to control shaders' flow

* Cleanup

* Implement SSY/SYNC

* Address feedback

* Fixup commentary

* Fixup Ssy instruction
2024-02-22 19:13:53 -05:00
ReinUsesLisp
1dc5d67162 Fixup HasColor for depth/stencil values (#379) 2024-02-22 19:13:53 -05:00
HorrorTroll
2a1a94a197 Add R32_G32 texture format (#383) 2024-02-22 19:13:53 -05:00
LDj3SNuD
d6f80069fe Add SHADD, SHSUB, UHSUB, SRHADD, URHADD, instructions; add 12 Tests. (#380)
* Update AOpCodeTable.cs

* Update AInstEmitSimdArithmetic.cs

* Update Instructions.cs

* Update CpuTestSimdReg.cs

* Update CpuTest.cs

* Update CpuTestSimd.cs

* Update CpuTestSimdCrypto.cs
2024-02-22 19:13:53 -05:00
ReinUsesLisp
be06f80f57 Use mirrored texture wraps when available (#361) 2024-02-22 19:13:53 -05:00
ReinUsesLisp
3fbe50f3db Implement vertex instancing (#381) 2024-02-22 19:13:53 -05:00
emmauss
ba57d37112 Update BSD service implementation (#363)
* Update BSD service to handle libnx's 'smart IPC buffers' for address info

* Use existing "GetBufferType0x21" for certain BSD socket methods

* Parse address port as unsigned short

* Fix bounds check on reading the IPC buffer

* Implement Read, Write methods

* rebased and cleaned

* addressed nits

* remove unused swap method

* fixed alignments
2024-02-22 19:13:53 -05:00
ReinUsesLisp
1e263d84fb Implement multiple rendertarget attachments and depth writting (#375)
* Add depth writting

* Implement multiple attachments

* Address feedback
2024-02-22 19:13:52 -05:00
gdkchan
773c315c9d Fix BinarySearchLt to return less than rather than less than or equal value (#372) 2024-02-22 19:13:52 -05:00
ReinUsesLisp
f19d9a3aaa Avoid querying and setting texture bindings in hot code (#376) 2024-02-22 19:13:52 -05:00
Thomas Guillemard
d64d56a3b3 Improve LM implementation (#373)
- Manage end of the log packet correctly.
- Add drop count, time, and program name parsing.
- Use the correct buffer type. (0x21 not 0x9)
- Prefix unknown fields with "Field"
2024-02-22 19:13:52 -05:00
Thomas Guillemard
1ad79b3032 SvcSetHeapSize: match kernel check for invalid size (#374)
This fix games like DK Country
2024-02-22 19:13:52 -05:00
ReinUsesLisp
8aac21ac9a Avoid gpr overwritting on Ld_C instruction (#371)
* Avoid gpr overwritting on LD_C instruction

* Address feedback

* Ignore invalid registers
2024-02-22 19:13:52 -05:00
ReinUsesLisp
cd0b375682 Use signed and unsigned vertex types (#370) 2024-02-22 19:13:52 -05:00
LDj3SNuD
3abd56876c Add AESD, AESE, AESIMC, AESMC instructions; add 4 simple Tests (closed box). (#365)
* Create CpuTestSimdCrypto.cs

* Update AOpCodeTable.cs

* Create AInstEmitSimdCrypto.cs

* Update ASoftFallback.cs

* Create ACryptoHelper.cs
2024-02-22 19:13:52 -05:00
ReinUsesLisp
0cf9510db3 Rendertarget attachments, texture and image changes (#358)
* Add multiple color outputs for fragment shaders

* Add registers and gal enums

* Use textures for framebuffers and split color and zeta framebuffers

* Abstract texture and framebuffer targets as an image

* Share images between framebuffers and textures

* Unstub formats

* Add some formats

* Disable multiple attachments

* Cache framebuffer attachments

* Handle format types

* Add some rendertarget formats

* Code cleanup

* Fixup half float types

* Address feedback

* Disable multiple attachments in shaders

* Add A4B4G4R4 image format

* Add reversed section for image enums
2024-02-22 19:13:52 -05:00
gdkchan
d297c815c6 Fix MapPhysicalMemory when block position is less than map position (#359)
* Fix MapPhysicalMemory when block position is less than map position

* Only try to free pages that are actually mapped

* Only unmap after freeing the memory
2024-02-22 19:13:52 -05:00
LDj3SNuD
2bbf1a9b0d Add SHA256H, SHA256H2, SHA256SU0, SHA256SU1 instructions; add 4 Tests (closed box). (#352)
* Update CpuTestSimd.cs

* Update CpuTestSimdReg.cs

* Update Pseudocode.cs

* Update Instructions.cs

* Update Bits.cs

* Update Integer.cs

* Update AOpCodeTable.cs

* Create AInstEmitSimdHash.cs

* Update ASoftFallback.cs
2024-02-22 19:13:52 -05:00
gdkchan
e2f56dc5ba Code style fixes and nits on the HLE project (#355)
* Some style fixes and nits on ITimeZoneService

* Remove some unneeded usings

* Remove the Ryujinx.HLE.OsHle.Handles namespace

* Remove hbmenu automatic load on process exit

* Rename Ns to Device, rename Os to System, rename SystemState to State

* Move Exceptions and Utilities out of OsHle

* Rename OsHle to HOS

* Rename OsHle folder to HOS

* IManagerDisplayService and ISystemDisplayService style fixes

* BsdError shouldn't be public

* Add a empty new line before using static

* Remove unused file

* Some style fixes on NPDM

* Exit gracefully when the application is closed

* Code style fixes on IGeneralService

* Add 0x prefix on values printed as hex

* Small improvements on finalization code

* Move ProcessId and ThreadId out of AThreadState

* Rename VFs to FileSystem

* FsAccessHeader shouldn't be public. Also fix file names casing

* More case changes on NPDM

* Remove unused files

* Move using to the correct place on NPDM

* Use properties on KernelAccessControlMmio

* Address PR feedback
2024-02-22 19:13:52 -05:00
gdkchan
13ec6bc774 Remove artificial call count limit for EndGl (#357) 2024-02-22 19:13:51 -05:00
ReinUsesLisp
5df3f11e26 Implement PointCoord and PointSize shader attributes (#353)
* Implement PointCoord and PointSize shader attributes

* Address feedback
2024-02-22 19:13:51 -05:00
gdkchan
0547a73420 More flexible memory manager (#307)
* Keep track mapped buffers with fixed offsets

* Started rewriting the memory manager

* Initial support for MapPhysicalMemory and UnmapPhysicalMemory, other tweaks

* MapPhysicalMemory/UnmapPhysicalMemory support, other tweaks

* Rebased

* Optimize the map/unmap physical memory svcs

* Integrate shared font support

* Fix address space reserve alignment

* Some fixes related to gpu memory mapping

* Some cleanup

* Only try uploading const buffers that are really used

* Check if memory region is contiguous

* Rebased

* Add missing count increment on IsRegionModified

* Check for reads/writes outside of the address space, optimize translation with a tail call
2024-02-22 19:13:51 -05:00
emmauss
b2abd99588 Implement ITimeZone 201, 202 (#327)
* Implement ITimeZone 201, 202

* fix alignment

* fix array count

* fix mismatching datetime kind and timezone
2024-02-22 19:13:51 -05:00
gdkchan
0e65d99f53 Zero out bits 63:32 of scalar float operations with SSE intrinsics (#273) 2024-02-22 19:13:51 -05:00
ReinUsesLisp
bf374b2c44 Reset cache on command buffer execution instead of sync calls (#341)
Also resets const buffer cache on CbData calls.
Non-const buffer data might also change while a command buffer is
executing but that's very unlikely.
2024-02-22 19:13:51 -05:00
gdkchan
372a47b6be Better support for user accounts (#349)
* Better support for user accounts

* Nits

* Check for invalid ids
2024-02-22 19:13:51 -05:00
emmauss
00c8721991 Implement IProfile Get and GetBase (#266)
* implement IProfile Get(Base)

* use default user

* changed userid
2024-02-22 19:13:51 -05:00
gdkchan
526094bba4 Fix FMUL and TEXS shader instructions (#347) 2024-02-22 19:13:51 -05:00
emmauss
f3f91ea3cf Implement AcquireNpadStyleSetUpdate event (#306)
* implement get npad set event

* move npad style set event to hid service

* fix spacing

* change event to field

* dispose event
2024-02-22 19:13:51 -05:00
gdkchan
d74d0072fc Add partial support to the TEX.B shader instruction (#342)
* Add partial support to the TEX.B shader instruction, fix for mixed indexed and non-indexed drawing

* Better exception
2024-02-22 19:13:51 -05:00
LDj3SNuD
302240c8de Add Sadalp_V, Saddlp_V, Uadalp_V, Uaddlp_V instructions; add 8 Tests. (#340)
* Update Instructions.cs

* Update CpuTestSimd.cs

* Update AOpCodeTable.cs

* Update AInstEmitSimdArithmetic.cs
2024-02-22 19:13:50 -05:00
Unknown
c05b24f330 fix DockedMode variable
delete unneeded spaces

fix DockedMode variable

fix DockedMode variable

change PerformanceMode cast to int
align ICommonStateGetter Commands
2024-02-22 19:13:50 -05:00
emmaus
9d5b0c7496 implemented ListDisplays 2024-02-22 19:13:50 -05:00
emmauss
0c4d613f1b fix dock mode style issues 2024-02-22 19:13:50 -05:00
greggameplayer
9dbc5f0f4c Add the ability to set or not docked mode via config file (#227)
* Add a toggleable DockedMode bool
2024-02-22 19:13:50 -05:00
LDj3SNuD
64810c9ac7 Add Sqdmulh_S, Sqdmulh_V, Sqrdmulh_S, Sqrdmulh_V instructions; add 6 Tests. Now all saturating methods are on ASoftFallback. (#334)
* Update Instructions.cs

* Update CpuTestSimd.cs

* Update CpuTestSimdReg.cs

* Update AOpCodeTable.cs

* Update AInstEmitSimdArithmetic.cs

* Update AInstEmitSimdHelper.cs

* Update ASoftFallback.cs

* Update CpuTestAlu.cs

* Update CpuTestAluImm.cs

* Update CpuTestAluRs.cs

* Update CpuTestAluRx.cs

* Update CpuTestBfm.cs

* Update CpuTestCcmpImm.cs

* Update CpuTestCcmpReg.cs

* Update CpuTestCsel.cs

* Update CpuTestMov.cs

* Update CpuTestMul.cs

* Update Ryujinx.Tests.csproj

* Update Ryujinx.csproj

* Update Luea.csproj

* Update Ryujinx.ShaderTools.csproj

* Address PR feedback (further tested).

* Address PR feedback.
2024-02-22 19:13:50 -05:00
gdkchan
7a02548c0c Fix load/store exclusive/atomic pairwise instructions (#337) 2024-02-22 19:13:50 -05:00
ReinUsesLisp
7bdf17ce9d Low level graphics API prerequisites (#319)
* Add GalPipelineState and IGalPipeline

* Separate UploadVertex call

* Add ConstBuffer cache

* Move Vertex Assembly into GalPipelineState

* Move Uniform binds to GalPipelineState

* Move framebuffer flip into a buffer

* Rebase

* Fix regression

* Move clear values from VertexEndGl to ClearBuffers

* Rename obscure names O->Old S->New
2024-02-22 19:13:50 -05:00
greggameplayer
96c44b35a5 Add SetScreenShotImageOrientation (#310)
* Add SetScreenShotImageOrientation

* add a stubbed print
2024-02-22 19:13:50 -05:00
gdkchan
d3572c972c Fix race condition on IdDictionary (#333) 2024-02-22 19:13:50 -05:00
Darabat
17e327e443 Changing shader decompiler to avoid vec2 and vec3 types, which were causing specific crashes. (#332)
* Changing shader decompiler to avoid vec2 and vec3 types, which were causing specific crashes.

* aligning code

* step back

* Redoing changes

* Redoing changes

* Redoing changes and avoiding concatenations

* redoing changes
2024-02-22 19:13:50 -05:00
gdkchan
c029b66908 Fix silly copy/paste error on float variant of the FMINNM instruction 2024-02-22 19:13:50 -05:00
gdkchan
9bc3eeed98 More accurate impl of FMINNM/FMAXNM, add vector variants (#296)
* More accurate impl of FMINNM/FMAXNM, add vector variants

* Optimize for the 0 case when op1 != op2

* Address PR feedback
2024-02-22 19:13:50 -05:00
Thomas Guillemard
3997916c23 Implement Shared Fonts (#215)
* Implement Shared Fonts

This fully implements shared fonts.
This commit is provided without fonts.
This commit also add Size to HSharedMem.Positions to be able to add fonts to shared zones when RequestLoad is called.

* Require the user to provide fonts in RyuFS/system

* Use File.Exits instead of relying ona try/catch and change system resource exception format a bit

* Make sure that font sum doesn't exceed 17MB

Also rename font data dictionary for coherence.
2024-02-22 19:13:50 -05:00
LDj3SNuD
2776d7c4fc Add SQADD, UQADD, SQSUB, UQSUB, SUQADD, USQADD, SQABS, SQNEG (Scalar, Vector) instructions; add 24 Tests. Most saturation instructions now on ASoftFallback. (#314)
* Update AOpCodeTable.cs

* Update AInstEmitSimdHelper.cs

* Update AInstEmitSimdArithmetic.cs

* Update Pseudocode.cs

* Update Instructions.cs

* Update CpuTestSimd.cs

* Update CpuTestSimdReg.cs

* Update AInstEmitSimdHelper.cs

* Update AInstEmitSimdHelper.cs

* Update AInstEmitSimdHelper.cs

* Update AInstEmitSimdHelper.cs

* Update ASoftFallback.cs

* Update AInstEmitSimdHelper.cs

* Update ASoftFallback.cs

* Update AInstEmitSimdHelper.cs

* Update CpuTestSimd.cs

* Update CpuTestSimdReg.cs

* Update ASoftFallback.cs

* Update AInstEmitSimdHelper.cs

* Opt. (retest).
2024-02-22 19:13:50 -05:00
gdkchan
0fe4bffe9c Fix for integer vertex attributes and iset bf flag (#323) 2024-02-22 19:13:49 -05:00
AboodMadridista
e525302479 Use the more specific NotImplementedException type instead of just Exception (#322) 2024-02-22 19:13:49 -05:00
emmaus
456f5c27dd moved metadata to process 2024-02-22 19:13:49 -05:00
Starlet
7154810367 Add Npdm parsing into Ryujinx.HLE 2024-02-22 19:13:49 -05:00
ReinUsesLisp
61ab83f97c Sleep OpenAL thread (#313) 2024-02-22 19:13:49 -05:00