Commit Graph

8335 Commits

Author SHA1 Message Date
Steveice10
ca6dae1744
fs: Fix save data secure value stubs. (#7191) 2023-11-19 10:18:23 -08:00
PabloMK7
b6acebcb11
Stub some missing AM Ticket functions (#7172) 2023-11-18 15:55:47 -08:00
Castor215
ba702043f0
externals: allow user to use system Catch2 (#7190) 2023-11-18 15:54:27 -08:00
Vitor K
a1532f813b
config: Reorder default hotkeys (#7175) 2023-11-17 03:14:17 -08:00
GPUCode
26d5727b19
video_core: Merge tex0 and tex_cube (#7173) 2023-11-17 03:14:10 -08:00
PabloMK7
680e132318
Unlock RW access to opened files on windows (#7161)
* Unlock RW access to opened files on windows

* Add missing include
2023-11-17 03:14:00 -08:00
Wunk
90a5d989e7
mic: Fix gain undeclared identifier (#7177) 2023-11-15 19:27:43 -08:00
PabloMK7
de40153fa4
Implement PS:GetRandomBytes and use openssl for random bytes (#7164) 2023-11-14 16:15:50 -08:00
PabloMK7
e9936e01c2
Stub QTM_S:GetHeadtrackingInfo (#7166)
* Stub QTM_S:GetHeadtrackingInfo

* Suggestions
2023-11-15 02:04:14 +02:00
GPUCode
e28c2a390c
core: Make running_core always match kernel current_cpu (#7159) 2023-11-14 04:31:25 -08:00
PabloMK7
63d1830429
Download TWL titles from NUS and list them in AM. (#7162)
* Download TWL titles from NUS and list them in AM.

* Remove duplicate entries.

* Move TODO comment
2023-11-14 01:33:58 -08:00
Steveice10
88cc6acb4d
hle: Fix session limits for srv: and soc:U. (#7160) 2023-11-14 01:33:47 -08:00
PabloMK7
3b31720c4d
Map MappedBuffer guard pages in a single operation. (#7158) 2023-11-14 01:33:38 -08:00
Steveice10
f9bbae81aa
hw/aes: Clean up key generator. (#7143) 2023-11-13 13:35:30 -08:00
PabloMK7
1c793deece
Lower log level of CSND::ExecuteCommands stub warning (#7163) 2023-11-13 13:34:56 -08:00
GPUCode
d5b50a9fc0
spv_fs_shader_gen: Remove OpTypeSampledImage from texture buffers (#7153) 2023-11-12 22:40:30 -08:00
GPUCode
168f168c33
spv_fs_shader_gen: Implement quaternion correction with barycentric extension (#7152) 2023-11-12 22:40:21 -08:00
Wunk
312068eebf
renderer_vulkan: Optimize descriptor binding (#7142)
For each draw, Citra will rebind all descriptor set slots and may redundantly re-bind descriptor-sets that were already bound. Instead it should only bind the descriptor-sets that have either changed or have had their buffer-offsets changed. This also allows entire calls to `vkCmdBindDescriptorSets` to be removed in the case that nothing has changed between draw calls.
2023-11-12 14:17:38 -08:00
Steveice10
5118798c30
mic: Refactor microphone state and management. (#7134) 2023-11-12 13:03:07 -08:00
Wunk
831c9c4a38
renderer_vulkan: Import host memory for screenshots (#7132) 2023-11-12 13:02:55 -08:00
SachinVin
ceeda05798
assert/logging: Stop the logging thread and flush the backends before crashing (#7146) 2023-11-11 11:55:42 -08:00
Vitor K
222b1cc0d7
arm_dyncom: remove reference nullptr comparison (#7151) 2023-11-11 11:52:40 -08:00
merry
271218b733
shader_jit_a64_compiler: Improve MAX, MIN (#7137) 2023-11-11 18:27:01 +05:30
merry
80213bf88f
shader_jit_a64_compiler: Improve Compile_SwizzleSrc (#7136) 2023-11-11 18:26:48 +05:30
Charles Lombardo
fa08df21a5
Android UI Overhaul Part 1 (#7108)
* android: Android 14 support

* android: New home UI flow

Port of the yuzu-android home UI with a few Citra specific tweaks.

A few important things to note
- New and existing Citra users will be guided through the new setup flow
- Existing game directory location is discarded and will have to be reselected
- Protections around making sure the user has selected a user directory were reworked to fit this new UI. I removed async directory init and DirectoryStateReceivers and check during MainActivity's onResume callback.
- Removed Citra premium. The light/dark theme is now available for everyone.

* android: New blue app theme

* android: Extend UI into status/navigation bar area

* android: Remove yellow theme specific styles

* android: Disable status/navigation bar contrast enforcement

We handle it ourselves so there's no need to use a contrasty background on the system bars

* android: GPU Driver Manager

Includes a rewrite of FileUtil with some helper functions for the manager

* android: Rework NativeLibrary in Kotlin

Besides the rewrite this cleans up the alert dialogs that are used for system errors. Generally removes unused JNI code and makes things a little more consistent.

* android: Home menu support + downloader

* android: Enable minify and resource shrinking

* android: Remove premium page and expose texture filtering modes

* android: Update AGP to 8.1.2

* android: Don't display emulation in cutout area

We don't currently handle the notch properly in the emulation fragment so just don't render under it for now.

* android: native.cpp ClangFormat fixes

* core: SystemTitles: Include std::optional

Without it, the android build would fail

* vk: android: Properly override GetDriverLibrary

* vk_instance: Blacklist timeline semaphore ext on turnip

* vk_platform: Hardcode apiVersion to VK_API_VERSION_1_3

* android: native: Use const where applicable

* android: native: Array pointer access style fix

* android: Share relevant log

Shares the old log if it exists and you haven't booted a game yet and shares the current log if you have booted a game.

* android: Apply dark theme color for software keyboard text

---------

Co-authored-by: GPUCode <geoster3d@gmail.com>
2023-11-10 15:16:54 -08:00
Steveice10
d4f31bc617
video_core: Fix fragment shader interlock usage on OpenGL. (#7144) 2023-11-10 13:14:52 -08:00
Steveice10
13d02c14e0
input_common: Set SDL hints to enable DualShock 4 / DualSense motion. (#7121) 2023-11-10 13:14:40 -08:00
Steveice10
84f9e9a10f
video_core: Perform quaternion correction and interpolation in fragment shader using barycentric extension. (#7126) 2023-11-09 15:23:56 -08:00
Wunk
ee372572a6
common/aarch64: Push/Pop pairs of registers at a time (#7129) 2023-11-08 15:39:11 -08:00
GPUCode
7930e1ea86
rasterizer_cache: Avoid dumping render targets (#7130) 2023-11-07 18:13:03 -08:00
Wunk
1d4d421097
shader_jit_a64: Optimize MOVA dest-enable (#7122)
Rather than branching the 3 cases of dest-enablement, just emit a single
move-and-sign-extend instruction for each case.

From this review:
https://github.com/citra-emu/citra/pull/7002#discussion_r1381560584
2023-11-07 11:46:40 -08:00
JosJuice
3f4b57635e
android: Use case insensitivity in DocumentsTree (#7115)
* android: Unify DocumentNode's `key` and `name`

They're effectively the same data, just obtained in different ways.

* android: Remove getFilenameWithExtensions method

After the previous commit, there's only one remaining use of
getFilenameWithExtensions. Let's get rid of that one in favor of
DocumentFile.getName so we no longer need to do manual URI parsing.

* android: Use case insensitivity in DocumentsTree

External storage on Android is case insensitive. This is still the case
when accessing it through SAF. (Of course, SAF makes no guarantees about
whether the storage location picked by the user is backed by external
storage or whether it's case insensitive, but I'm just going to ignore
that for now because I am *so tired of SAF*)

Because the underlying file system is case insensitive, Citra's caching
layer that had to be implemented because SAF's performance is atrocious
also needs to be case insensitive. Otherwise, we get a problem in the
following scenario:

1. Citra wants to check if a particular folder exists in sdmc, and if
   not, create it.
2. The folder does exist, but it has a different capitalization than
   Citra expects, due to a mismatch between Citra's code and (typically)
   files dumped from a real 3DS using ThreeSD.
3. Citra tries to open the folder, but DocumentsTree fails to find it,
   because the case doesn't match.
4. Citra then tries to create the folder, but creating the folder fails,
   because the underlying filesystem considers the folder to exist.
5. The game fails to start.

(Sorry, did I say creating the folder fails? Actually, a new folder does
get created, with " (1)" appended to the end of the name. SAF makes no
guarantees whatsoever about what happens in this situation – it's all
determined by the storage provider!)

This commit makes the caching layer case insensitive so that the
described scenario will work better.
2023-11-07 11:46:25 -08:00
Steveice10
86566f1c14
build: Fortify non-MSVC builds. (#7120) 2023-11-06 17:55:41 -08:00
GPUCode
3f1f0aa7c2
arm: De-virtualize ThreadContext (#7119)
* arm: Move ARM_Interface to core namespace

* arm: De-virtualize ThreadContext
2023-11-06 17:55:30 -08:00
Wunk
8fe147b8f9
video_core: Use binary memory-literals for memory-sizes (#7127)
Replaces `... * 1024 * 1024` with `_MiB`/`_GiB` literals.
2023-11-06 23:38:54 +02:00
GPUCode
1f6393e7d5
video_core: Refactor GLSL fragment emitter (#7093)
* video_core: Refactor GLSL fragment emitter

* shader: Add back custom normal maps
2023-11-06 12:26:28 -08:00
Steveice10
9b2a5926a6
frontend: Use inverted use_gles as a fallback for GL initialization. (#7117) 2023-11-05 17:23:54 -08:00
Wunk
e13735b624
video_core: Implement an arm64 shader-jit backend (#7002)
* externals: Add oaksim submodule

Used for emitting ARM64 assembly

* common: Implement aarch64 ABI

Utilize oaknut to implement a stack frame.

* tests: Allow shader-jit tests for x64 and a64

Run the shader-jit tests for both x86_64 and arm64 targets

* video_core: Initialize arm64 shader-jit backend

Passes all current unit tests!

* shader_jit_a64: protect/unprotect memory when jit-ing

Required on MacOS. Memory needs to be fully unprotected and then
re-protected when writing or there will be memory access errors on
MacOS.

* shader_jit_a64: Fix ARM64-Imm overflow

These conditionals were throwing exceptions since the immediate values
were overflowing the available space in the `EOR` instructions. Instead
they are generated from `MOV` and then `EOR`-ed after.

* shader_jit_a64: Fix Geometry shader conditional

* shader_jit_a64: Replace `ADRL` with `MOVP2R`

Fixes some immediate-generation exceptions.

* common/aarch64: Fix CallFarFunction

* shader_jit_a64: Optimize `SantitizedMul`

Co-authored-by: merryhime <merryhime@users.noreply.github.com>

* shader_jit_a64: Fix address register offset behavior

Based on https://github.com/citra-emu/citra/pull/6942
Passes unit tests.

* shader_jit_a64: Fix `RET` address offset

A64 stack is 16-byte aligned rather than 8. So a direct port of the x64
code won't work. Fixes weird branches into invalid memory for any
shaders with subroutines.

* shader_jit_a64: Increase max program size

Tuned for A64 program size.

* shader_jit_a64: Use `UBFX` for extracting loop-state

Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>

* shader_jit_a64: Optimize `SUB+CMP` to `SUBS`

Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>

* shader_jit_a64: Optimize `CMP+B` to `CBNZ`

Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>

* shader_jit_a64: Use `FMOV` for `ONE` vector

Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>

* shader_jit_a64: Remove x86-specific documentation

* shader_jit_a64: Use `UBFX` to extract exponent

Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>

* shader_jit_a64: Remove redundant MIN/MAX `SRC2`-NaN check

Special handling only needs to check SRC1 for NaN, not SRC2.
It would work as follows in the four possible cases:

No NaN: No special handling needed.
Only SRC1 is NaN: The special handling is triggered because SRC1 is NaN, and SRC2 is picked.
Only SRC2 is NaN: FMAX automatically picks SRC2 because it always picks the NaN if there is one.
Both SRC1 and SRC2 are NaN: The special handling is triggered because SRC1 is NaN, and SRC2 is picked.

Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>

* shader_jit/tests:: Add catch-stringifier for vec2f/vec3f

* shader_jit/tests: Add Dest Mask unit test

* shader_jit_a64: Fix Dest-Mask `BSL` operand order

Passes the dest-mask unit tests now.

* shader_jit_a64: Use `MOVI` for DestEnable mask

Accelerate certain cases of masking with MOVI as well

Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>

* shader_jit/tests: Add source-swizzle unit test

This is not expansive. Generating all `4^4` cases seems to make Catch2
crash. So I've added some component-masking(non-reordering) tests based
on the Dest-Mask unit-test and some additional ones to test
broadcasts/splats and component re-ordering.

* shader_jit_a64: Fix swizzle index generation

This was still generating `SHUFPS` indices and not the ones that we wanted for the `TBL` instruction. Passes all unit tests now.

* shader_jit/tests: Add `ShaderSetup` constructor to `ShaderTest`

Rather than using the direct output of `CompileShaderSetup` allow a
`ShaderSetup` object to be passed in directly.  This enabled the ability
emit assembly that is not directly supported by nihstro.

* shader_jit/tests: Add `CALL` unit-test

Tests nested `CALL` instructions to eventually reach an `EX2`
instruction.

EX2 is picked in particular since it is implemented as an even deeper
dispatch and ensures subroutines are properly implemented between `CALL`
instructions and implementation-calls.

* shader_jit_a64: Fix nested `BL` subroutines

`lr` was getting writen over by nested calls to `BL`, causing undefined
behavior with mixtures of `CALL`, `EX2`, and `LG2` instructions.

Each usage of `BL` is now protected with a stach push/pop to preserve
and restore teh `lr` register to allow nested subroutines to work
properly.

* shader_jit/tests: Allocate generated tests on heap

Each of these generated shader-test objects were causing the stack to
overflow.  Allocate each of the generated tests on the heap and use
unique_ptr so they only exist within the life-time of the `REQUIRE`
statement.

* shader_jit_a64: Preserve `lr` register from external function calls

`EMIT` makes an external function call, and should be preserving `lr`

* shader_jit/tests: Add `MAD` unit-test

The Inline Asm version requires an upstream fix:
https://github.com/neobrain/nihstro/issues/68

Instead, the program code is manually configured and added.

* shader_jit/tests: Fix uninitialized instructions

These `union`-type instruction-types were uninitialized, causing tests
to indeterminantly fail at times.

* shader_jit_a64: Remove unneeded `MOV`

Residue from the direct-port of x64 code.

* shader_jit_a64: Use `std::array` for `instr_table`

Add some type-safety and const-correctness around this type as well.

* shader_jit_a64: Avoid c-style offset casting

Add some more const-correctness to this function as well.

* video_core: Add arch preprocessor comments

* common/aarch64: Use X16 as the veneer register

https://developer.arm.com/documentation/102374/0101/Procedure-Call-Standard

* shader_jit/tests: Add uniform reading unit-test

Particularly to ensure that addresses are being properly truncated

* common/aarch64: Use `X0` as `ABI_RETURN`

`X8` is used as the indirect return result value in the case that the
result is bigger than 128-bits. Principally `X0` is the general-case
return register though.

* common/aarch64: Add veneer register note

`LR` is generally overwritten by `BLR` anyways, and would also be a safe
veneer to utilize for far-calls.

* shader_jit_a64: Remove unneeded scratch register from `SanitizedMul`

* shader_jit_a64: Fix CALLU condition

Should be `EQ` not `NE`. Fixes the regression on Kid Icarus.
No known regressions anymore!

---------

Co-authored-by: merryhime <merryhime@users.noreply.github.com>
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
2023-11-05 21:40:31 +01:00
Wunk
3218af38d0
renderer_vulkan: Add scissor and viewport to dynamic pipeline state (#7114)
Adds the current viewport and scissor to the dynamic pipeline state to
reduce redundant viewport/scissor assignments in the command buffer.
This greatly reduces the amount of API calls to `vkCmdSetViewport` and
`vkCmdSetScissor` by only emitting the API call when the state actually
changes.
2023-11-05 12:26:09 -08:00
Wunk
1cf64ffaef
vk_stream_buf: Allow dedicated allocations (#7103)
* vk_stream_buf: Avoid protected memory heaps

* Add an "Exclude" argument when finding a memory-type that avoids
  `VK_MEMORY_PROPERTY_PROTECTED_BIT` by default

* vk_stream_buf: Utilize dedicated allocations when preferred by driver

`VK_KHR_dedicated_allocation` is part of the core Vulkan 1.1
specification and should be utilized when `prefersDedicatedAllocation`
is set.
2023-11-05 12:25:59 -08:00
GPUCode
998b9a9525
kernel: Add ticks to low priority threads that arbitrate zero threads (#7096) 2023-11-05 00:20:55 +02:00
Steveice10
27bad3a699
audio_core: Replace AAC decoders with single FAAD2-based decoder. (#7098) 2023-11-04 14:56:13 -07:00
Tobias
1570aeffcb
game_list: Treat demos as applications (#7097)
* game_list: Treat demos as applications

Allows the dumping of RomFS from demos.

* game_list: Add TODO about using bitmasks for title ID high checks.

---------

Co-authored-by: Steveice10 <1269164+Steveice10@users.noreply.github.com>
2023-11-04 12:15:21 -07:00
Steveice10
09ee80f590
file_sys: Replace commented log lines from previous PR with trace logs. (#7109) 2023-11-04 20:37:55 +05:30
Wunk
b10f3d96f5
command_processor: Fix out-of-bounds float-uniform access (#7111)
Addresses:
https://github.com/citra-emu/citra/issues/6696
https://github.com/citra-emu/citra/issues/6871
2023-11-03 03:35:52 -07:00
PabloMK7
4284893044
Implement RomFS cache and async reads. (#7089)
* Implement RomFS cache and async reads.

* Suggestions and fix compilation.

* Apply suggestions
2023-11-02 17:19:00 -07:00
Steveice10
79ea06b226
qt: Update to 6.6.0 (#7099) 2023-11-01 17:58:02 -07:00
Wunk
ac9d72a95c
vk_texture_runtime: Fix debug scope label lambda-capture (#7102)
`DebugScope` was capturing a `string_view` in a lambda which is only
valid during the scope of this ctor. When the lambda gets invoked at a
later time, it will read undefined garbage. The lambda needs to make a
deep copy of this `string_view` into a `string` so that it is valid by
the time the scheduler invokes this lambda.
2023-11-01 21:30:54 +01:00
PabloMK7
597a2e8ead
Add missing FS:USER functions (#7051) 2023-10-31 14:01:25 -07:00
Steveice10
45ef11654a
audio_core: Clear time stretcher after flushing to avoid sample bleed. (#7081) 2023-10-24 17:22:10 -07:00
Dominik Kreutzer
259dbf17dc
citra-qt: ensure image interface is registered before starting game (#7090) 2023-10-24 17:21:38 -07:00
Castor215
ec55807669
build: fix build failure when not using precompiled headers (#7087)
Co-authored-by: vitor-k <vitor-kiguchi@hotmail.com>
2023-10-23 17:21:35 -03:00
GPUCode
36146459f8
renderer_vulkan: Fix screenshots under NVIDIA vulkan (#7082) 2023-10-22 22:53:14 +03:00
Wunk
597297ffb4
tests: Fix out-of-bounds access (#7085) 2023-10-22 11:07:06 -07:00
Castor215
4ac10c4a9d
externals: allow users to use system Zstandard (#7083) 2023-10-21 16:10:02 -07:00
GPUCode
ef43776c7b
shader: Fix address register offset behavior in x64 Jit (#6942)
* shader: Fix address register offset behavior in x64 Jit

* shader: Remove redundant jump

* tests: Add address register tests

* shader: Remove additional pre-multiplications by 16

* tests: Add catch-stringifier for vec4f

* tests: Format
2023-10-18 19:41:36 +03:00
Castor215
956b0868fd
externals: allow user to use system inih (#7073) 2023-10-16 19:31:56 -07:00
Steveice10
4c59443ed2
common: Add more robust ZSTD handling. (#7071) 2023-10-15 14:08:29 -07:00
Steveice10
07839fb3ce
qt: Add option to uninstall a game. (#7064)
* qt: Add option to uninstall a game.

* Address review comments.
2023-10-14 18:11:59 -07:00
GPUCode
40ba5226c6
vk_instance: Perform vulkan logging as early as possible (#7058) 2023-10-11 15:11:43 -07:00
PabloMK7
897d1fa957
Implement more HTTP:C functionality (#7035)
* Implement missing http:c functionality.

* More implementation details and cleanup.

* Organize code

* Disable treat errors as warnings for httplib

* Fix defines

* Remove pragmas that do nothing and mark as SYSTEM

* Make httplib system

* Try to fix issue from httplib

* Apply suggestions

* Fix header ordering

* Fix compilation issue

* Create and use ctx.CommandID()

* Add and use Common::TruncateString

* Apply more suggestions

* Apply suggestions

* Fix compilation

* Apply suggestions

* Fix format

* Revert SplitURL to previous version

* Apply suggestions
2023-10-11 10:09:16 -07:00
SachinVin
1acb03b579
dsp_dsp.cpp: fix registering Interrupt handler on loading savestates (#7055) 2023-10-10 12:52:57 -07:00
Steveice10
4220f69c06
renderer/opengl: Deduce GLES from actual driver in use. (#7056) 2023-10-10 12:52:47 -07:00
PabloMK7
6264b6d43c
Use RunAsync in multiple socket operations (#7053)
* Use RunAsync in multiple socket operations

* EOF newline

* Fix linux compilation

* Fix compilation on macos
2023-10-09 14:59:08 -07:00
Steveice10
6cfd00e42d
qt: Partially fix Wayland support. (#7054)
* qt: Partially fix Wayland on NVIDIA.

* qt: Fix Vulkan under Wayland.

Showing and hiding the window here messes up the surface,
causing an instant crash on load.

* qt: Properly set up GLES context when requested.
2023-10-09 14:58:38 -07:00
Steveice10
6244f9e3fd
ci: Support Android x86_64 and optimize build caching. (#7045)
* android: Support x86_64 devices.

* ci: Improve ccache hits and stats.

* ci: Compress Android artifacts.

* ci: Re-enable PCH and set ccache sloppiness appropriately.
2023-10-08 23:56:01 -07:00
Castor215
f5b8888686
externals: allow user to use system fmt (#7052) 2023-10-07 16:00:02 -07:00
SachinVin
2961dcf0fd
audio_core/hle/mixers.cpp: fix dirty flag checks (#7048) 2023-10-07 13:11:06 -07:00
SachinVin
053b3618dc
Android: gl_shader_decompiler.cpp: get rid of the not-so-accurate multiplication (#7011) 2023-10-05 10:28:26 -07:00
SachinVin
72ff0c5337
AudioCore: Refactor DSP interrupt handling (#7026) 2023-10-04 15:44:59 +02:00
PabloMK7
9ec4954380
Add HLERequestContext::RunAsync (#7027) 2023-10-02 11:09:27 -07:00
Daniel López Guimaraes
376d33cff4
audio_core/hle: Fix compile issues (#7024)
* audio_core/hle: Fix compile issues

Fix all compiling issues related with fmt (see #7015)

* audio_core/hle: Fix clang-format
2023-09-30 23:41:25 -07:00
Steveice10
50f22d1f59
video_core: Abstract shader generators. (#6990)
* video_core: Abstract shader generators.

* shader: Extract common generator structures and move generators to specific namespaces.

* shader: Minor fixes and clean-up.
2023-09-30 02:06:06 -07:00
Tobias
1492d73ccb
frd: Stub several functions (#7010)
* mii: Improve mii data variable naming

* frd: Stub several functions

Allows the friend applet to open successfully.

* frd: Address review comments
2023-09-29 20:27:15 -07:00
Vitor K
a35f8cbb78
fix include/namespace related compilation errors (#7019)
a user on discord reported compilation errors when trying to compile
on Linux with GCC 13 and Clang 16.
2023-09-28 18:36:50 +05:30
Vitor K
6cfb8e02a8
clang format (#7017) 2023-09-27 13:42:19 -03:00
Steveice10
327a00b4d5
externals: Update fmt. (#7015) 2023-09-27 03:29:13 -07:00
SachinVin
d19fe9aa4c
audio_core\hle\shared_memory.h: Update struct member names based on FE:Fates Symbols (#6995) 2023-09-22 11:53:30 -07:00
Steveice10
003a4ec09b
gsp: Downgrade StoreDataCache log to trace. (#7006)
* gsp: Downgrade StoreDataCache log to trace.

* gsp: Mark StoreDataCache parameters as maybe_unused
2023-09-22 09:15:31 -07:00
Michael J Kaye
279208347e
AndroidManifest.xml: allow launchers to start a game using the EmulationActivity intent (#6996) 2023-09-19 19:36:16 +02:00
Steveice10
28c542c2c2
build: Fix compiling citra-qt for iOS. (#6983)
* build: Fix compiling citra-qt for iOS.

* Update src/citra_qt/configuration/configure_general.cpp

Co-authored-by: Tobias <thm.frey@gmail.com>

---------

Co-authored-by: Tobias <thm.frey@gmail.com>
2023-09-17 16:07:56 -07:00
GPUCode
d1c16bad78
code: Remove save state compatibility checks (#6980) 2023-09-16 15:22:10 -07:00
GPUCode
542209c993
video_core: Initialize unrefered attributes to 1.f (#6966) 2023-09-16 14:46:44 -07:00
SachinVin
8aee625a14
externals: Add option to use system SoundTouch (#6971) 2023-09-16 14:46:32 -07:00
GPUCode
d2d37411bc
vk_platform: Check if vkEnumerateInstanceVersion exists before calling it (#6982)
Co-authored-by: Vitor K <vitor-kiguchi@hotmail.com>
2023-09-15 16:00:10 -07:00
Vitor K
43cedf59af
automap: fix power button mapping (#6972) 2023-09-14 14:41:55 -07:00
GPUCode
30fcdc5474
renderer_vulkan: Misc fixes (#6974)
* vk_platform: Check if library was loaded

* pica_to_vk: Dont crash on unknow blend equation
2023-09-15 00:21:12 +03:00
GPUCode
dfa2fd0e0d
Add vulkan backend (#6512)
* code: Prepare frontend for vulkan support

* citra_qt: Add vulkan options to the GUI

* vk_instance: Collect tooling info

* renderer_vulkan: Add vulkan backend

* qt: Fix fullscreen and resize issues on macOS. (#47)

* qt: Fix bugged macOS full screen transition.

* renderer/vulkan: Fix swapchain recreation destroying in-use semaphore.

* renderer/vulkan: Make gl_Position invariant. (#48)

This fixes an issue with black artifacts in Pokemon games on Apple GPUs.
If the vertex calculations differ slightly between render passes, it can
cause parts of model faces to fail depth test.

* vk_renderpass_cache: Bump pixel format count

* android: Custom driver code

* vk_instance: Set moltenvk configuration

* rasterizer_cache: Proper surface unregister

* citra_qt: Fix invalid characters

* vk_rasterizer: Correct special unbind

* android: Allow async presentation toggle

* vk_graphics_pipeline: Fix async shader compilation

* We were actually waiting for the pipelines regardless of the setting, oops

* vk_rasterizer: More robust attribute loading

* android: Move PollEvents to OpenGL window

* Vulkan does not need this and it causes problems

* vk_instance: Enable robust buffer access

* Improves stability on mali devices

* vk_renderpass_cache: Bring back renderpass flushing

* externals: Update vulkan-headers

* gl_rasterizer: Separable shaders for everyone

* vk_blit_helper: Corect depth to color convertion

* renderer_vulkan: Implement reinterpretation with copy

* Allows reinterpreteration with simply copy on AMD

* vk_graphics_pipeline: Only fast compile if no shaders are pending

* With this shaders weren't being compiled in parallel

* vk_swapchain: Ensure vsync doesn't lock framerate

* vk_present_window: Match guest swapchain size to vulkan image count

* Less latency and fixes crashes that were caused by images being deleted before free

* vk_instance: Blacklist VK_EXT_pipeline_creation_cache_control with nvidia gpus

* Resolves crashes when async shader compilation is enabled

* vk_rasterizer: Bump async threshold to 6

* Many games have fullscreen quads with 6 vertices. Fixes pokemon textures missing with async shaders

* android: More robust surface recreation

* renderer_vulkan: Fix dynamic state being lost

* vk_pipeline_cache: Skip cache save when no pipeline cache exists

* This is the cache when loading a save state

* sdl: Fix surface initialization on macOS. (#49)

* sdl: Fix surface initialization on macOS.

* sdl: Fix render window events not being handled under Vulkan.

* renderer/vulkan: Fix binding/unbinding of shadow rendering buffer.

* vk_stream_buffer: Respect non coherent access alignment

* Required by nvidia GPUs on MacOS

* renderer/vulkan: Support VK_EXT_fragment_shader_interlock for shadow rendering. (#51)

* renderer_vulkan: Port some recent shader fixes

* vk_pipeline_cache: Improve shadow detection

* vk_swapchain: Add missing check

* renderer_vulkan: Fix hybrid screen

* Revert "gl_rasterizer: Separable shaders for everyone"

Causes crashes on mali GPUs, will need separate PR

This reverts commit d22d556d30ff641b62dfece85738c96b7fbf7061.

* renderer_vulkan: Fix flipped screenshot

---------

Co-authored-by: Steveice10 <1269164+Steveice10@users.noreply.github.com>
2023-09-13 01:28:50 +03:00
Tobias
8f8c54201d
citra_qt/config: Fix Telemetry checkbox (#6965) 2023-09-11 23:07:06 +02:00
GPUCode
9be4fd8b91
gl_rasterizer: Bind null surface when unit is disabled (#6967) 2023-09-11 19:34:41 +03:00
Vitor K
bbb47cd753
gles: fix crashing on mali gpus (#6956)
* gles: reorder framebuffer fetch extension directives

* Address review comments
2023-09-11 00:30:30 +03:00
GPUCode
0b0d3a4ac3
gpu: Correct display transfer output with vertical flip+crop lines (#6952) 2023-09-11 00:30:06 +03:00
GPUCode
6aa31d6ec2
video_core: Use epsilons for clip planes (#6945)
* video_core: Use epsilons for clip planes

* video_core: Add comments
2023-09-11 00:29:55 +03:00
GPUCode
928f352c94
renderer_gl: Use explicit bindings (#6940)
* renderer_gl: Use explicit bindings

* gl_state: Match shadow order with vulkan
2023-09-07 21:42:22 +03:00
Steveice10
e2d8eef5fa
qt: Fix arguments to maintenancetool for update check. (#6946) 2023-09-04 17:25:41 -07:00
GPUCode
cab0ad50f0
gl_shader_decompiler: Fix min/max NaN edge case (#6935) 2023-08-31 13:37:53 -07:00
Steveice10
5ad58e0605
shader: Fix shadow_texture_orthographic not being set correctly. (#6937) 2023-08-31 13:37:39 -07:00
GPUCode
1159e4d928
video_core: Take factors into account with min/max blending functions (#6925)
* sw_framebuffer: Take factors into account for min/max blending

* renderer_gl: Take factors into account for min/max blending

* Address review comments

* gl_shader_gen: Fix frambuffer fetch on qcom and mali

* renderer_opengl: Add fallback path for mesa

* gl_shader_gen: Avoid emitting blend emulation if minmax_factor is present
2023-08-30 21:26:28 +03:00
Steveice10
93c7c6a995
service: Downgrade some spammy logs to trace level. (#6936) 2023-08-30 19:19:38 +02:00
Steveice10
81a5e2355a
shader: Fix address register offset behavior in GLSL. (#6920) 2023-08-28 13:23:59 -07:00
GPUCode
d1f600601d
renderer_software: Multi-thread processing (#6698)
* renderer_software: Multi-thread processing

* Doubles the performance in most cases

* renderer_software: Move memory access out of the raster loop

* Profiling shows this has a significant impact
2023-08-28 01:09:23 -07:00
GPUCode
8b218e1b7d
tev: Use primary color for previous source in first stage (#6921) 2023-08-27 23:59:32 -07:00
Steveice10
04aeecabcf
arm: Do not try to access null page table. (#6930) 2023-08-27 17:26:31 +02:00
Steveice10
df57012c50
video_core: Correct shader interpeter address register handling. (#6910) 2023-08-27 01:49:31 +03:00
GPUCode
61cf550d0c
video_core: Avoid setting alpha tev with Dot3_RGBA8 color op (#6907)
* Further reduces unnecessary shader regenerations
2023-08-27 01:48:45 +03:00
Steveice10
f2e0748a22
build: Enable link time optimization in release builds. (#6887) 2023-08-26 11:15:13 -07:00
Steveice10
edf157200d
qt: Support updating an installed app image. (#6915) 2023-08-24 03:57:11 -07:00
GPUCode
a94297922b
shader_interpreter: Fix control flow edge cases and implement break/breakc (#6844) 2023-08-21 18:12:46 -07:00
m4xw
e129f07047
[ShaderGen] Avoid setting lighting states if components aren't enabled (#6895)
* [ShaderGen] Avoid setting lighting states if components aren't enabled

* [Squash] clang-format
2023-08-20 21:12:38 -07:00
Steveice10
b2092de871
build: Fix web service functionality. (#6903) 2023-08-19 17:34:35 -07:00
Steveice10
6ddf4b241f
renderer/vulkan: Emulate custom border colors in shaders when unavailable. (#6878) 2023-08-17 22:22:25 +02:00
Vitor K
f3d92dd3b8
Fix post processing shaders crashing on Intel GPUs (#6890) 2023-08-17 22:17:24 +02:00
Vitor K
1a6860f35c
opengl: disable ClearTexture on Intel drivers (#6879) 2023-08-17 22:16:51 +02:00
GPUCode
bc0bf4d3d2
(gl/vk)_shader_gen: Use floor instead of int cast (#6885) 2023-08-17 22:16:28 +02:00
Steveice10
1d3bf64f13
qt: Make input configuration scrollable. (#6881) 2023-08-16 19:27:01 -07:00
Steveice10
66404a669f
build: Fixes for a few minor issues (#6886) 2023-08-14 09:47:17 -07:00
Steveice10
6a1fd38063
build: Use new glslang tool name. (#6889) 2023-08-13 15:45:22 -07:00
Steveice10
a27971e723
service/cecd: Fix buffer writes in ReadData. (#6880) 2023-08-11 10:31:24 -07:00
Vitor K
eb8d2941c9
savestates: save the build name to be displayed when there's a version mismatch (#6493)
* savestates: add a build_name field to the header

* savestates: display build name on save/load menu

* savestates: add zero member to header just in case of UB from an older save state

* savestates: add legacy hash lookup

* savestate_data: update hash database
2023-08-10 20:55:22 -07:00
Steveice10
baca2bfc6b
qt: Only register graphics debugger as observer if visible. (#6875) 2023-08-09 17:31:09 -07:00
Narr the Reg
33a2113b71
service: nfp: Fix size and increase timeout (#6868) 2023-08-08 14:00:53 -07:00
Daniel López Guimaraes
1f07ab8643
http/ac: Fix failing assert and stub GetConnectingProxyEnable (#6864) 2023-08-08 14:00:42 -07:00
Steveice10
b739bd2632
qt: Fix double dialog and crash when OpenGL is selected on unsupported platform. (#6867) 2023-08-07 18:21:42 -07:00
GPUCode
f76165d848
frame_dumper: Use jthread (#6855) 2023-08-07 18:21:28 -07:00
GPUCode
ac78b74c45
gl_texture_runtime: Implement ARB_clear_texture (#6850) 2023-08-08 01:10:28 +03:00
GPUCode
a478bedb12
rasterizer_cache: Bring back custom format parameter (#6873) 2023-08-08 01:10:11 +03:00
Steveice10
6d0cd5b00e
build: Expose ENABLE_SCRIPTING and ENABLE_WEB_SERVICE flags as public. (#6872) 2023-08-07 03:12:49 -07:00
GPUCode
5b52849f90
rasterizer_cache: Allow custom recycle (#6851)
* surface_params: Allow custom surface recycling

* rasterizer_cache: Cleanup
2023-08-06 22:59:54 +03:00
GPUCode
0048e61fc7
Fix compilation without ENABLE_WEB_SERVICE (#6856) 2023-08-06 12:23:53 -07:00
Vitor K
aaeba6759e
citra_qt: do not pass memory to widget (#6849) 2023-08-04 16:35:52 -07:00
GPUCode
ebac2e4978
custom_tex_manager: Allow old hash in more cases (#6843) 2023-08-03 00:51:10 +03:00
PabloMK7
5b9f4d4129
SOC: Fix setting TTL to default value when TTL = 0 (#6835) 2023-08-02 13:06:51 -07:00
Vitor K
b1b6f08926
citra_qt: fix two graphics configuration bugs (#6840) 2023-08-02 21:38:57 +02:00
GPUCode
6f7612f73d
Res cache fixes (#6838)
* rasterizer_cache: Dont consider res_scale during recycle

* rasterizer_cache: Switch to plain erase loop

* rasterizer_cache: Fix crash due to memory corruption
2023-08-02 21:38:45 +03:00
GPUCode
88ea66053e
Miscallenious fixes to gl backend and qt frontend (#6834)
* renderer_gl: Make rasterizer normal class member

* It doesn't need to be heap allocated anymore

* gl_rasterizer: Remove default_texture

* It's unused

* gl_rasterizer: General cleanup

* gl_rasterizer: Lower case lambdas

* Match style with review comments from vulkan backend

* rasterizer_cache: Prevent memory leak

* Since the switch from shared_ptr these surfaces were no longer being destroyed properly. Use our garbage collector for that purpose to destroy it safely for both backends

* rasterizer_cache: Make temp copy of old surface

* The custom surface would override the memory region of the old region resulting in garbage data, this ensures the custom surface is constructed correctly

* citra_qt: Manually create dialog tabs

* Allows for custom constructors which is very useful. While at it, global state is now eliminated from configuration

* citra_qt: Eliminate global system usage

* core: Remove global system usage in memory and HIO

* citra_qt: Use qOverload

* tests: Run clang format

* gl_texture_runtime: Fix surface scaling
2023-08-02 01:40:39 +03:00
Tobias
970f2284d8
http/soc: Various implementations and fixes (#6828) 2023-08-02 00:37:56 +02:00
GPUCode
baf3ea4beb
custom_tex_manager: Allow old hash in the dumper (#6832) 2023-08-01 20:38:51 +03:00
PabloMK7
35e208b447
Move MiiData to its own namespace and add ChecksummedMiiData (#6824)
* Move mii to own namespace and add checksummed mii data

* Fix compile issues

* Make mii classes trivial and add cast operator

* Fix Android side

* Add new line at the end of files.

* Make miidata a struct and crc16 a u32_be as per switch code.

* Apply suggestions

* Change back crc to u16 and set padding to 0.
2023-07-31 20:38:47 -07:00
GPUCode
f8b8b6e53c
core: De-globalize movie (#6659) 2023-08-01 02:57:38 +02:00
GPUCode
a955f02771
rasterizer_cache: Remove runtime allocation caching (#6705)
* rasterizer_cache: Sentence surfaces

* gl_texture_runtime: Remove runtime side allocation cache

* rasterizer_cache: Adjust surface scale during reinterpreration

* Fixes pixelated outlines. Also allows to remove the d24s8 specific hack and is more generic in general

* rasterizer_cache: Remove Expand flag

* Begone!

* rasterizer_cache: Cache framebuffers with surface id

* rasterizer_cache: Sentence texture cubes

* renderer_opengl: Move texture mailbox to separate file

* Makes renderer_opengl cleaner overall and allows to report removal threshold from runtime instead of hardcoding. Vulkan requires this

* rasterizer_cache: Dont flush cache on layout change

* rasterizer_cache: Overhaul framebuffer management

* video_core: Remove duplicate

* rasterizer_cache: Sentence custom surfaces

* Vulkan cannot destroy images immediately so this ensures we use our garbage collector for that purpose
2023-08-01 03:35:41 +03:00
Steveice10
3fedc68230
common: Only use libbacktrace if present. (#6827) 2023-07-31 14:24:27 -07:00
Steveice10
335fb78c5c
service/am: Clean up and optimize CIA installation. (#6718) 2023-07-30 21:40:35 +02:00
Tobias
22c4eb86d7
core/frd: Correct FunctionInfo and stub more functions (#6209) 2023-07-30 04:18:52 +02:00
Steveice10
964f9ee3cf
service/gsp: Implement saving of framebuffers in SaveVramSysArea. (#6821)
* service/gsp: Implement saving of framebuffers in SaveVramSysArea.

* Address review comments.

* service/apt: Separate capture info and capture buffer info.

The former is used with the RequestForSysApplet message and GetCaptureInfo.
The latter is used with SendCaptureBufferInfo and ReceiveCaptureBufferInfo.
2023-07-29 00:26:24 -07:00
Steveice10
bb364d9bc0
service/apt: Add and implement more service commands. (#6721)
* service/apt: Add and implement more service commands.

* service/apt: Implement power button.

* Address review comments and fix GetApplicationRunningMode bug.
2023-07-29 00:26:16 -07:00
SachinVin
51996c54f0
audio_core\hle\adts_reader.cpp: Use BitField to parse ADTS header (#6719) 2023-07-28 12:15:58 -07:00
Steveice10
539a1a0b6e
service/cfg: Separate out config block defaults and create when not found. (#6716) 2023-07-26 10:33:00 -07:00
Steveice10
8b21b902f2
hw/y2r: Templatize input/output formats. (#6717) 2023-07-25 05:51:57 -07:00
Vitor K
19107cec4b
citra-qt: update the separate window titles to use full_name and show Primary/Secondary identifier (#6712)
* citra-qt: update the separate window titles to use full_name and Primary/Secondary window identifier

* build_fullname: remove trailing space
2023-07-25 05:51:46 -07:00
Steveice10
a537f56766
services/cfg: Clean up definitions and access flag handling. (#6711) 2023-07-21 18:04:15 -07:00