Commit graph

658 commits

Author SHA1 Message Date
Thog
207b996c81
Don't throw an exception in the layer handling 2019-02-17 15:27:35 +01:00
Thog
3697d65009
Implement GetGpuSize + fix somes issues with 2d engine copies
TODO: mipmap level in it
2019-02-17 15:27:35 +01:00
Thog
deb3c58020
Support 2D array copy operation in the 2D engine
This make every copy right in the GPU side.
Thie CPU copy probably needs to be updated
2019-02-17 15:27:35 +01:00
Thog
17550a21cd
Fix binding isuses on the 2d copy engine
TODO: support 2d array copy
2019-02-17 15:27:35 +01:00
Thog
e0c20dab93
Fix shader compilation error for TLD4.AOFFI with no DC 2019-02-17 15:27:35 +01:00
Thog
6dc88c85c9
Support AOFFI with TLD4 and TLD4S 2019-02-17 15:27:35 +01:00
Thog
0879ec824e
Fix DC & AOFFI combinaison with TEX/TEXS 2019-02-17 15:27:34 +01:00
Thog
f04853ee10
Fix shader build issues with sampler1DShadow and texture 2019-02-17 15:27:34 +01:00
Thog
44ea0787d4
ImageFormat depth should be 1 for all image format 2019-02-17 15:27:34 +01:00
Thog
8a186e2e65
Fix TEXS ARRAY_2D index 2019-02-17 15:27:34 +01:00
Thog
e3d9609f7e
Revert "Disable LL, LZ and LB support in the decompiler"
This reverts commit 64536c3d9f673645faff3152838d1413c3203395.
2019-02-17 15:27:34 +01:00
Thog
19ec09112f
Disable LL, LZ and LB support in the decompiler
This needs more work at the GL level (GLSL implementation should be
right)
2019-02-17 15:27:34 +01:00
Thog
bdeb47d97d
finish renaming TextureType to TextureTarget 2019-02-17 15:27:34 +01:00
Thog
c9b0ee8178
TextureType => GalTextureTarget 2019-02-17 15:27:34 +01:00
Thog
8a3a128ecb
AOFFI => AOffI 2019-02-17 15:27:33 +01:00
Thog
78d55796af
Remove GetSuffix local functions 2019-02-17 15:27:33 +01:00
Thog
fb228c3be7
Fix some nits + rename some things to be less confusing 2019-02-17 15:27:33 +01:00
Thog
e496f4bfd4
fix some code style issues 2019-02-17 15:27:33 +01:00
Thog
3e6f75772f
updates comments 2019-02-17 15:27:33 +01:00
Thog
72a963ee9d
Add Texture 1D support 2019-02-17 15:27:33 +01:00
Thog
a1df758958
Implement TLD4 and TLD4S 2019-02-17 15:27:33 +01:00
Thog
82e10ad3ad
Implement CubeMap textures in OGLTexture.Create 2019-02-17 15:27:32 +01:00
Thog
be47d4d16c
some code clean up 2019-02-17 15:27:32 +01:00
Thog
47f6f5776f
Implement depth compare 2019-02-17 15:27:32 +01:00
Thog
df99afeded
Proper cube map textures support + fix TEXS.LZ 2019-02-17 15:27:32 +01:00
Thog
5f0da0245e
Support depth in read/writeTexture
Also support WrapR and detect mipmap
2019-02-17 15:27:32 +01:00
Thog
f426de7e15
Start implementing texture instructions suffixes
Fix wrong texture type with cube and TEXS

Also support array textures in TEX and TEX.B

Clean up TEX and TEXS coords managment

Fix TEXS.LL with non-2d textures

Implement TEX.AOFFI

Get the right arguments for TEX, TEXS and TLDS

Also, store suffix operands in appropriate values to support multiple
suffix combinaisons
2019-02-17 15:27:32 +01:00
Thog
b9a8380ac5
Initial non 2D textures support
- Shaders still need to be changed
- Some types aren't yet implemented
2019-02-17 15:27:32 +01:00
AlexLavoie42
17ac118946 Added "ROM not found." message if specified file is invalid. (#592)
* Added "ROM not found." message if specified file is invalid.

* Fixed styling

* Made message more specific and changed both cases to warnings.
2019-02-17 20:52:16 +11:00
jduncanator
f8a9faa1b9
Config: Correct MulticoreSched casing (#588) 2019-02-16 19:37:22 +11:00
gdkchan
b5fcf883e8 Implement IStorage GetSize (#585) 2019-02-15 16:44:25 +01:00
jduncanator
fec8e3489d
Vi: Implement ConvertScalingMode (#581)
* Vi: Implement ConvertScalingMode

For now, it seems Nintendo just map 1:1 between the two enums.

* Resolve style nits

* Vi: Correct mapping order
2019-02-15 15:47:40 +11:00
gdkchan
9cbcbaa90c Fix XMAD shader instruction, gl_FrontFacing and enable face culling (#583)
* Fix XMAD shader instruction implementation

* Fix gl_FrontFacing constant value

* Enable face culling again

* Fix typo
2019-02-15 14:23:14 +11:00
Thomas Guillemard
b126ea48c6 Support HomeBrew Loader (#577)
* Make it possibles to load hb-loader and hb-menu

One issue remains with hb-menu homebrew icons because of SIMD issues
(libjpeg-turbo related) and netloader doesn't work.

* Implement GetApplicationControlData

* Fix shared fonts for NSO/NRO

* Add homebrew NRO romfs support

This readd the NRO support by parsing the ASET header

* Address comments about HomebrewRomFs

* override Dispose in homebrew romfs stream

* Use a struct for file timestamp

* Simplify positional increments in GetApplicationControlData

* Address comments

* improve readability of the memory permission check in SetProcessMemoryPermission

* Fix previous broken check

* Add address space checks in SetProcessMemoryPermission
2019-02-14 11:44:39 +11:00
gdkchan
7e9f555574 Change timestamp value on GPU query with timestamp and counter writeback (#547)
This issue was reported by `Mark290580`, and, according to them causes rendering issues on SMO.
2019-02-13 13:40:25 +11:00
jduncanator
c734137f41
Audio: Select a shared audio device by default (#574)
* Audio: Select a shared audio device by default

This ensures that a non-raw audio device is selected wherever possible.

* Audio: Resolve libsoundio version mismatch between bindings and binaries

It turns out we were using bindings generated with libsoundio 1.1.0 git source, but the binaries we were using were built from master git source. I've rebuilt both binaries and bindings to ensure they are version matched.

This should resolve all outstanding issues with libsoundio (including the Linux segfault issue, and the "cannot open device" Windows issue).

* Audio: Reformat MarshalExtensions

* Resolve code indentation issues
2019-02-13 12:59:26 +11:00
jduncanator
f73c11744e Config: Resolve config and file log to application directory (#580) 2019-02-12 20:24:11 -03:00
gdkchan
8eebbc736e
Do not increment played wave buffers count for empty wave buffers (#568)
* Do not increment played wave buffers count for empty wave buffers

* Remove unused setter
2019-02-12 14:05:05 -03:00
jduncanator
d306115750 Logger and Configuration Refactoring (#573)
* Logging: Refactor log targets into Ryujinx.Common

* Logger: Implement JSON Log Target

* Logger: Optimize Console/File logging targets

Implement a simple ObjectPool to pool up StringBuilders to avoid causing excessive GCing of gen1/2 items when large amounts of log entries are being generated.

We can also pre-determine the async overflow action at initialization time, allowing for an easy optimization in the message enqueue function, avoiding a number of comparisons.

* Logger: Implement LogFormatters

* Config: Refactor configuration file and loading

* Config: Rename to .jsonc to avoid highlighting issues in VSC and GitHub

* Resolve style nits

* Config: Resolve incorrect default key binding

* Config: Also update key binding default in schema

* Tidy up namespace imports

* Config: Update CONFIG.md to reflect new Config file
2019-02-11 09:00:32 -03:00
gdkchan
a694420d11
Implement speculative translation on the CPU (#515)
* Implement speculative translation on the cpu, and change the way how branches to unknown or untranslated addresses works

* Port t0opt changes and other cleanups

* Change namespace from translation related classes to ChocolArm64.Translation, other minor tweaks

* Fix typo

* Translate higher quality code for indirect jumps aswell, and on some cases that were missed when lower quality (tier 0) code was available

* Remove debug print

* Remove direct argument passing optimization, and enable tail calls for BR instructions

* Call delegates directly with Callvirt rather than calling Execute, do not emit calls for tier 0 code

* Remove unused property

* Rename argument on ArmSubroutine delegate
2019-02-04 18:26:05 -03:00
BaronKiko
f5b4f6ccc4 Scissor test fix (#563)
* Handle negative viewport coordinates

* Disable scissor before framebuffer blit

* Comment to explain scissor disable will be reenabled if needed

* Comma and spelling mistake
2019-01-31 22:37:07 -03:00
emmauss
d191b256a6
Disable file log by default 2019-01-31 14:35:01 +00:00
gdkchan
e10ff17e2d
Initial support for shader half float instructions (#507) 2019-01-31 09:43:24 -03:00
emmauss
c81abdde4c Add file logging and handle unhandled exceptions (#558)
* add unhandled exception handler

* added file logging

* add option in config

* consolidated console and file log
2019-01-30 23:49:15 -03:00
gdkchan
c1bdf19061
Implement some ARM32 memory instructions and CMP (#565)
* Implement ARM32 memory instructions: LDM, LDR, LDRB, LDRD, LDRH, LDRSB, LDRSH, STM, STR, STRB, STRD, STRH (immediate and register + immediate variants), implement CMP (immediate and register shifted by immediate variants)

* Rename some opcode classes and flag masks for consistency

* Fix a few suboptimal ARM32 codegen issues, only loads should be considered on decoder when checking if Rt == PC, and only NZCV flags should be considered for comparison optimizations

* Take into account Rt2 for LDRD instructions aswell when checking if the instruction changes PC

* Re-align arm32 instructions on the opcode table
2019-01-29 13:06:11 -03:00
LDj3SNuD
8f7fcede7f Add Smlal_Ve, Smlsl_Ve, Smull_Ve, Umlal_Ve, Umlsl_Ve, Umull_Ve Inst.; add Tests. Add Sse Opt. for Trn1/2_V and Uzp1/2_V Inst. Nits. (#566)
* Update OpCodeTable.cs

* Update InstEmitSimdArithmetic.cs

* Update InstEmitSimdHelper.cs

* Update CpuTestSimdRegElem.cs

* Update InstEmitSimdMove.cs

* Update InstEmitSimdCvt.cs

* Update SoftFallback.cs

* Update InstEmitSimdHelper.cs

* Update SoftFloat.cs

* Update CryptoHelper.cs

* Update InstEmitSimdArithmetic.cs

* Update InstEmitSimdCmp.cs

* Address PR feedback.

* Address PR feedback.
2019-01-29 10:54:39 -03:00
gdkchan
36b9ab0e48
Add ARM32 support on the translator (#561)
* Remove ARM32 interpreter and add ARM32 support on the translator

* Nits.

* Rename Cond -> Condition

* Align code again

* Rename Data to Alu

* Enable ARM32 support and handle undefined instructions

* Use the IsThumb method to check if its a thumb opcode

* Remove another 32-bits check
2019-01-24 23:59:53 -02:00
Thomas Guillemard
72157e03eb Add support of PFS0 as ExeFS (#564)
Also add .pfs0 support
2019-01-24 23:51:28 -02:00
jduncanator
1af6c31dc0 Resolve build merge conflict (#559) 2019-01-21 00:04:52 -02:00
gdkchan
22bacc6188
Improve kernel IPC implementation (#550)
* Implement some IPC related kernel SVCs properly

* Fix BLZ decompression when the segment also has a uncompressed chunck

* Set default cpu core on process start from ProgramLoader, remove debug message

* Load process capabilities properly on KIPs

* Fix a copy/paste error in UnmapPhysicalMemory64

* Implement smarter switching between old and new IPC system to support the old HLE services implementation without the manual switch

* Implement RegisterService on sm and AcceptSession (partial)

* Misc fixes and improvements on new IPC methods

* Move IPC related SVCs into a separate file, and logging on RegisterService (sm)

* Some small fixes related to receive list buffers and error cases

* Load NSOs using the correct pool partition

* Fix corner case on GetMaskFromMinMax where range is 64, doesn't happen in pratice however

* Fix send static buffer copy

* Session release, implement closing requests on client disconnect

* Implement ConnectToPort SVC

* KLightSession init
2019-01-18 20:26:39 -02:00