Commit Graph

9542 Commits

Author SHA1 Message Date
Steveice10
055a58f01e
audio_core: Implement OpenAL backend (#6450) 2023-05-01 21:17:45 +02:00
SachinVin
ce553ab995
renderer_opengl: DrawSingleScreen*: remove duplicate code (#6426)
Co-authored-by: Tobias <thm.frey@gmail.com>
2023-05-01 16:27:42 +02:00
coop152
9dc71e3347
Fix broken label in touch mapping dialog (#6489) 2023-04-30 17:28:49 +02:00
luc-git
7327c334ca
Add cheats in per game configuration (#6379) 2023-04-30 16:36:02 +02:00
Steveice10
ea649263b7
build: Improvements to bundled libraries support. (#6435) 2023-04-28 13:02:53 -07:00
TGP17
30bf654d2f
Add Citra AppImage builds (#6404)
* Create install_dependencies.sh

* Create build.sh

* Update ci.yml

Add AppImage Builds

* Delete unneeded line

* Remove unneeded command

Removed unneeded chmod a+x for a deleted file

* Change cp command to mv

Reduces AppImage file size by about 20mb

* Update Install dependencies for Ninja builds

* Change to Ninja build system

Additionally adds the correct Build flags to make all Languages appear again and should make compatibility ratings appear again. Also removes unneeded empty folder.

* add missing platformthemes

This restores all previously missing Icons and Citra uses now the systems default filepicker.

* Git make Executable

* Remove unnecessary make scripts executable command

* Change build to Debian 11 and use Docker

* Change workflow for AppImage Docker builds

* Change description of Command to the correct one

* Fix themeing after switch to Debian 11

* Only upload .AppImage

* Include AppImage in releases

* Update upload.sh

* Move to rev name

---------

Co-authored-by: MT19048 <86961834+MT19048@users.noreply.github.com>
2023-04-28 10:50:13 -07:00
PabloMK7
63bc0b59bb
Use IPC:MakeHeader instead of hardcoded raw values for IPC command tables. (#6453)
* Use IPC:MakeHeader instead of hardcoded values for IPC command tables.

* Use u32 instead of unsigned int in MakeHeader function

Co-authored-by: SachinVin <26602104+SachinVin@users.noreply.github.com>

* Fix clang format

---------

Co-authored-by: SachinVin <26602104+SachinVin@users.noreply.github.com>
2023-04-27 22:31:03 -07:00
Steveice10
9bd8c9290b
externals: Update SoundTouch (#6473) 2023-04-27 17:48:57 +05:30
GPUCode
06f3c90cfb
Custom textures rewrite (#6452)
* common: Add thread pool from yuzu

* Is really useful for asynchronous operations like shader compilation and custom textures, will be used in following PRs

* core: Improve ImageInterface

* Provide a default implementation so frontends don't have to duplicate code registering the lodepng version

* Add a dds version too which we will use in the next commit

* rasterizer_cache: Rewrite custom textures

* There's just too much to talk about here, look at the PR description for more details

* rasterizer_cache: Implement basic pack configuration file

* custom_tex_manager: Flip dumped textures

* custom_tex_manager: Optimize custom texture hashing

* If no convertions are needed then we can hash the decoded data directly removing the needed for duplicate decode

* custom_tex_manager: Implement asynchronous texture loading

* The file loading and decoding is offloaded into worker threads, while the upload itself still occurs in the main thread to avoid having to manage shared contexts

* Address review comments

* custom_tex_manager: Introduce custom material support

* video_core: Move custom textures to separate directory

* Also split the files to make the code cleaner

* gl_texture_runtime: Generate mipmaps for material

* custom_tex_manager: Prevent memory overflow when preloading

* externals: Add dds-ktx as submodule

* string_util: Return vector from SplitString

* No code benefits from passing it as an argument

* custom_textures: Use json config file

* gl_rasterizer: Only bind material for unit 0

* Address review comments
2023-04-27 07:38:28 +03:00
Steveice10
d16dce6d99
externals: Update SoundTouch to upstream. (#6451) 2023-04-26 00:25:02 +02:00
GPUCode
227926c1fa
Remove remnants of separable shader setting (#6403) 2023-04-26 00:19:02 +02:00
SachinVin
000a616bd9
core\loader\ncch.cpp: skip parsing Region info, if user has already... (#6463) 2023-04-26 00:13:21 +02:00
GPUCode
2c74ed1a6d
Rasterizer refactor hotfixes (#6465)
* texture_codec: Clamp buffer end to tiled buffer size

* Fixes crash on Pokemon Super Mystery Dungeon

* rasterizer_cache: Use rect for duplicate surface

* Fixes broken bloom in fire emblem

* surface_params: Check levels for exact match

* It was removed previously to prevent copies when games used the base level of a multi level surface. FE on the other hand will first use the base level and then use it as a face of a cubemap with many levels. So instead check if the surface equal or more levels and consider it an exact match in that case

* gl_texture_runtime: Bind old tex to 2D target

* Fixes a small error opengl would print when creating texture cubes

* gl_blit_helper: Fix nearest filter

* Use texture unit 2 which has the nearest sampler bound
2023-04-23 22:46:08 +03:00
GPUCode
9ba6a90193
gl_format_reinterpreter: Don't release unconditionally (#6459) 2023-04-23 00:35:25 +03:00
Vitor K
1b944f3255
gl_rasterizer: Fix texel buffer size overflow (#6458)
Co-authored-by: GPUCode <geoster3d@gmail.com>
2023-04-22 20:43:29 +02:00
Steveice10
81d24dd7fb
input_common: Allow disabling GCAdapter on platforms without libusb. (#6448) 2023-04-22 17:10:12 +02:00
SachinVin
7197367040
assert.h: add [[unlikely]] (#6454)
clang format assert
2023-04-22 14:36:27 +05:30
Vitor K
c9b2bd9077
msvc: copy openssl dlls (#6428) 2023-04-21 19:09:40 +02:00
rinsuki
3dd6557332
sdl: Exit if SDL fails to create software renderer (#6430) 2023-04-21 14:38:12 +05:30
GPUCode
26d6f9d1c6
Rasterizer cache refactor (#6375)
* rasterizer_cache: Remove custom texture code

* It's a hacky buggy mess, will be reimplemented later when the cache is in a better state

* rasterizer_cache: Refactor surface upload/download

* Switch to the texture_codec header which was written as part of the vulkan backend by steveice and me

* Move most of the upload logic to the rasterizer cache and out of the surface object

* Scaled uploads/downloads have been disabled for now since they require more runtime infrastructure

* rasterizer_cache: Refactor runtime interface

* Remove aspect enum which is the same as SurfaceType

* Replace Subresource with specific structures for each operation (blit/copy/clear). This mimics moderns APIs vulkan much better

* Pass the surface to the runtime instead of the texture

* Implement CopyTextures with glCopyImageSubData which is available on 4.3 and gles.
  This function also has an overload for cubes which will be removed later.

* rasterizer_cache: Move texture allocation to the runtime

* renderer_opengl: Remove TextureDownloaderES

* It's overly compilcated and unused at the moment. Will be replaced with a simple compute shader in a later commit

* rasterizer_cache: Split CachedSurface

* This commit splits CachedSurface into two classes, SurfaceBase which contains the backend agnostic functions and Surface which is the opengl specific part

* For now the cache uses the opengl surface directly and there are a few ugly casts with watchers, those will be taken care of when the template convertion and watcher removal are added respectively

* rasterizer_cache: Move reinterpreters to the runtime

* rasterizer_cache: Move some pixel format function to the cpp file

* rasterizer_cache: Common texture acceleration functions

* They don't contain any backend specific code so they shouldn't be duplicated

* rasterizer_cache: Remove BlitSurfaces

* It's better to prefer copy/blit in the caller anyway

* rasterizer_cache: Only allocate needed levels

* rasterizer_cache: Move texture runtime out of common dir

* Also shorten the util header filename

* surface_params: Cleanup code

* Add more comments, organize it a bit etc

* rasterizer_cache: Move texture filtering to the runtime

* rasterizer_cache: Move to VideoCore

* renderer_opengl: Reimplement scaled uploads/downloads

* Instead of looking up for temporary textures, each allocation now contains both a scaled and unscaled handle
  This allows the scale operations to be done inside the surface object itself and improves performance in general

* In particular the scaled download code has been expanded to use ARB_get_texture_sub_image when possible
  which is faster and more convenient than glReadPixels. The latter is still relevant for OpenGLES though.

* Finally allocations are now given a handy debug name that can be viewed from renderdoc.

* rasterizer_cache: Remove global state

* gl_rasterizer: Abstract common draw operations to Framebuffer

* This also allows to cache framebuffer objects instead of always swapping the textures, something that particularly benefits mali gpus

* rasterizer_cache: Implement multi-level surfaces

* With this commit the cache can now directly upload and use mipmaps
  without needing to sync them with watchers. By using native mimaps
  directly this also adds support for mipmap for cube

* Texture cubes have also been updated to drop the watcher requirement

* host_shaders: Add CMake integration for string shaders

* Improves build time shader generation making it much less prone to errors.
  Also moves the presentation shaders here to avoid embedding them to the cpp file.

* Texture filter shaders now make explicit use of uniform bindings for better vulkan compatibility

* renderer_opengl: Emulate lod bias in the shader

* This way opengles can emulate it correctly

* gl_rasterizer: Respect GL_MAX_TEXTURE_BUFFER_SIZE

* Older Bifrost Mali GPUs only support up to 64kb texture buffers. Citra would try to allocate a much larger buffer the first 64kb of which would work fine but after that the driver starts misbehaving and showing various graphical glitches

* rasterizer_cache: Cleanup CopySurface

* renderer_opengl: Keep frames synchronized when using a GPU debugger

* rasterizer_cache: Rename Surface to SurfaceRef

* Makes it clear that surface is a shared_ptr and not an object

* rasterizer_cache: Cleanup

* Move constructor to the top of the file

* Move FindMatch to the top as well and remove the Invalid flag which was redudant;
  all FindMatch calls used it expect from MatchFlags::Copy which ignores it anyway

* gl_texture_runtime: Make driver const

* gl_texture_runtime: Fix RGB8 format handling

* The texture_codec header, being written with vulkan in mind converts RGB8 to RGBA8. The backend wasn't adjusted to account for this though and treated the data as RGB8.

* Also remove D16 convertions, both opengl and vulkan are required to support this format so these are not needed

* gl_texture_runtime: Reduce state switches during FBO blits

* glBlitFramebuffer is only affected by the scissor rectangle so just disable scissor testing instead of resetting our entire state

* surface_params: Prevent texcopy that spans multiple levels

* It would have failed before as well, with multi-level surfaces it triggers the assert though

* renderer_opengl: Centralize texture filters

* A lot of code is shared between the filters thus is makes it sense to centralize them

* Also fix an issue with partial texture uploads

* Address review comments

* rasterizer_cache: Use leading return types

* rasterizer_cache: Cleanup null checks

* renderer_opengl: Add additional logging

* externals: Actually downgrade glad

* For some reason I missed adding the files to git

* surface_params: Do not check for levels in exact match

* Some games will try to use the base level of a multi level surface. Checking for levels forces another surface to be created and a copy to be made which is both unncessary and breaks custom textures

---------

Co-authored-by: bunnei <bunneidev@gmail.com>
2023-04-21 10:14:55 +03:00
bunnei
9414db4f65
Merge pull request #6439 from t895/theme-adjustments
citra_android: Theme adjustments
2023-04-20 17:02:46 -07:00
SachinVin
89db2e323a
.ci\android\upload.sh: follow naming convention of other artifacts (#6440) 2023-04-16 19:53:17 +02:00
SachinVin
0da25736d9
renderer_opengl.cpp: Draw{Top, Bottom}Screen Clean up (#6422) 2023-04-16 19:51:21 +02:00
SachinVin
5f81940e63
Merge pull request #6419 from vitor-k/states
Update zstd and improve savestates logging
2023-04-15 10:11:40 +05:30
Charles Lombardo
2e23a75fac citra_android: Fix top app bar color in cheats activity 2023-04-14 21:12:34 -04:00
Charles Lombardo
9aed0a14c7 citra_android: Reduce the primary color's influence on the surface color in dark mode 2023-04-14 21:08:15 -04:00
Charles Lombardo
8a3afaf9e6 citra_android: Fix background color on first launch
The incorrect background color could appear when the games fragment is not initialized as it is during first boot. Now it appears correctly as colorSurface.
2023-04-14 20:49:47 -04:00
Charles Lombardo
1adf631725 citra_android: Use primary color for FAB 2023-04-14 20:46:48 -04:00
SachinVin
2a2ee8bc96
Merge pull request #6395 from ian-h-chamberlain/feature/gdbstub-hio
Initial port of luma3ds' gdb_hio to Citra
2023-04-11 20:32:48 +05:30
Ian Chamberlain
025913a734
Fix string_view constructor for macOS clang
Some versions of clang 14 (macOS+android) don't implement
`string_view(It first, It last)`, so let's use
`string_view(const CharT*, size_type)` instead.

Also remove unused header leftover from old code that uses std::string.
2023-04-11 10:06:08 -04:00
Vitor Kiguchi
dccd89b796 savestates: various changes
The header doesn't need to be serialized.
GetSaveStatePath may be static.
Remove unused includes.
Name the CryptoPP stringsource.
2023-04-10 00:51:02 -03:00
Vitor Kiguchi
c79acdd88d savestates: validate states before load 2023-04-10 00:51:02 -03:00
Vitor Kiguchi
8e8c8fa37a savestates: log slot on load and save 2023-04-10 00:51:02 -03:00
Vitor Kiguchi
7b8832cebb externals: update zstd to v1.5.5 2023-04-10 00:51:01 -03:00
Charles Lombardo
cdb157f58a
citra_android: Night mode fixes (#6416) 2023-04-09 21:18:28 +02:00
SachinVin
e283de9b6d
gl_shader_disk_cache.cpp: Invalidate Tranferable cache on error (#6392) 2023-04-09 21:16:44 +02:00
Steveice10
b6e73f0d49
Add consolidated GodMode9 key dumping script. (#6396) 2023-04-09 21:16:31 +02:00
SachinVin
8d19483b7e
externals: bump dynarmic to 6.4.6 (#6423) 2023-04-09 21:03:48 +02:00
SachinVin
a94acde519
core\frontend\framebuffer_layout: GetCardboardSettings: clean up floa… (#6399)
* core\frontend\framebuffer_layout: GetCardboardSettings: clean up float to u32 conversion warnings + style fixes

* clang format

* fix signedness
2023-04-09 10:59:25 +05:30
Narr the Reg
90bcf49db0
android: Clean up overlay controls and avoid triggering touch screen when a button is pressed (#6391) 2023-04-09 10:58:42 +05:30
Jake Downs
bc5b065abe
android: replace jcenter with mavenCentral (#6417)
* replace jcenter with mavenCentral https://github.com/citra-emu/citra/issues/6232

* add back jcenter as fallback for billing
2023-04-09 10:55:37 +05:30
SachinVin
563c77154e
citra_qt/bootmanager.cpp: Fix scaling on QT with SW rasteriser (#6424) 2023-04-08 21:28:03 +05:30
SachinVin
e4e9fb4aed
Merge pull request #6412 from GPUCode/wayland-oops
Port yuzu-emu/yuzu#7410: "Wayland fixes"
2023-04-08 16:51:56 +05:30
SachinVin
6a0baef239
Merge pull request #6410 from vitor-k/qt-vsync
citra_qt: fix vsync issues
2023-04-08 16:51:29 +05:30
Vitor K
8b93db0841
Updates to github actions (#6358) 2023-04-06 14:34:35 +02:00
SachinVin
9c81dc0dd8
externals\CMakeLists.txt: dynarmic, fmt, xbyak: add EXCLUDE_FROM_ALL property (#6398) 2023-04-06 14:31:28 +02:00
Steveice10
287ce1e56f
kernel: Skip address range checks for privileged memory (un)map. (#6407) 2023-04-06 14:30:13 +02:00
hank121314
495e5dadd7
citra_android: fix config is getting overwritten by default (#6408) 2023-04-05 18:51:05 +02:00
hank121314
7d64c654cc
citra_android: fix select root as citra directory cause crash (#6400) 2023-04-05 18:50:53 +02:00
Ian Chamberlain
4cc181e5b8
Address review comments
Use more modern C++ style casts + std::array, clean up some log
messages, and rename some functions.
2023-04-05 12:41:17 -04:00