25087 Commits

Author SHA1 Message Date
collecting 660becc759 video_core: Implement thread-safe Vulkan renderer teardown 2026-05-07 03:53:11 -04:00
cheezwiz7899 ab583abedf perf(experimental): skip ReadBlockUnsafe when TIC generation matches
When FindBindlessEntry already returns a valid entry matching (addr,
count, image_table_generation), the TIC descriptor table has not been
invalidated since the last population. In that case we can skip the
ReadBlockUnsafe + memcmp entirely and replay the cached views/samplers
directly.

WARNING: This assumes that games do not write new texture handles to the
cbuf without also triggering a TIC table invalidation (generation bump).
If that assumption is wrong for a specific game, stale textures may
appear. Revert this commit independently to isolate any regressions.

Applies to both graphics and compute pipelines.
2026-05-07 03:25:44 -04:00
cheezwiz7899 d87f1241c9 video_core: bindless texture correctness and performance
Fix texture corruption caused by the shader compiler treating unknown
constant buffer sizes as 0 instead of the bindless array length:
- Set BINDLESS_FALLBACK_LENGTH = BINDLESS_ARRAY_LENGTH (1024) in
  texture_pass.cpp so shaders always allocate the full descriptor range
- Pre-capture cbuf sizes in GraphicsEnvironment/ComputeEnvironment
  constructors and serialize them through FileEnvironment to prevent
  intermittent 0-size reads from async worker threads
- Bump CACHE_VERSION to 14 to force one-time recompile of existing
  shader caches with the corrected metadata
- Reduce MAX_IMAGE_ELEMENTS from 16384 to 1024 to eliminate TLS
  pressure caused by the oversized per-thread descriptor array

Add BindlessCache (64 entries, round-robin eviction) keyed on
(cbuf_addr, count, image_table_generation) to skip redundant GPU memory
reads across draws:
- Track image_table_generation in each cache entry; a generation mismatch
  forces a full re-read and re-resolve, a match replays cached views
- Mark resolved ImageViewInOuts with id_cached so FillImageViews can
  skip VisitImageView for already-resolved entries
- Add GraphicsImageTableGeneration() / ComputeImageTableGeneration()
  accessors to DescriptorTable and expose them from TextureCache

Deduplicate PrepareImageView calls for cached bindless entries:
- On a cache hit, FillImageViews was calling PrepareImageView once per
  descriptor slot (up to 1024 calls/draw). Replace with a batch pass
  that collects unique ImageIds from id_cached views, deduplicates via
  sort+unique, then calls PrepareImage once per unique image (~10-50x
  fewer calls in practice)
2026-05-07 03:25:44 -04:00
Mythrax-ZS 3ce9ba4ec5 Perf/bindless cbuf cache (#184)
* video_core/vulkan: cache bindless cbuf snapshots to skip per-draw rewalk

Signed-off-by: Mythrax <mythrax@mytrax-rs.org>

* video_core/vulkan: split descriptors so uniforms keep push descriptor path

Signed-off-by: Mythrax <mythrax@mytrax-rs.org>

* Increase from 6 to 32 for proper Async rendering

* Update sdl_driver.cpp

Not sure why stuff was inverted for PlayStation & Xbox controllers, didn't read the commit thoroughly enough. This is a Nintendo Switch emulator, the buttons were perfectly fine already.

* fix: Crash issue related to Linked

* fix: remove unused vendor check

* mmm fuck you SDL

* fix: wrap unused functions for macOS CI

* fix: mk8d applet
This will completely fix the problem with the Mario Kart 8 Deluxe controller applet and other games that use it.
The current solution is missing just one small detail to be perfect.

Signed-off-by: lizzie <lizzie@eden-emu.dev>

* fix: Add Dummy Thread so spinning/deadlock doesn't occur

* video_core/vulkan: cache committed descriptor sets per command buffer

Signed-off-by: Mythrax <mythrax@mytrax-rs.org>

* video_core/vulkan: swap descriptor scratch arrays to small_vector

Mirrors lizbeth's eden change: the std::array<T, 16384> form sized the
spans passed to FillImageViews and CheckFeedbackLoop to the full 16K
capacity instead of the actual write count, inflating per-draw CPU cost
on bindless-heavy shaders.

Reference: https://github.com/citron-neo/emulator/commit/f91f15abd6ffbc5e678617429002f7c56ac8bda9

Co-authored-by: lizzie <lizzie@eden-emu.dev>
Signed-off-by: Mythrax <mythrax@mythrax-rs.org>
Signed-off-by: Mythrax <mythrax@mytrax-rs.org>

---------

Signed-off-by: Mythrax <mythrax@mytrax-rs.org>
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Signed-off-by: Mythrax <mythrax@mythrax-rs.org>
Co-authored-by: Mythrax <mythrax@mytrax-rs.org>
Co-authored-by: CollectingW <217662237+CollectingW@users.noreply.github.com>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
2026-05-07 03:25:18 -04:00
collecting 2126c7c8a9 Revert "Merge pull request #176 from theromis/main" 2026-05-06 22:26:23 -04:00
collecting a65fdc6aab Revert "Merge pull request #176 from theromis/main" 2026-05-06 21:56:43 -04:00
lizzie 5211aa0668 fix: lovely c++ grammar with the if statment 2026-05-06 14:09:55 +00:00
lizzie a62786c2b8 logging: do not use a separate thread for logging 2026-05-06 14:09:55 +00:00
CollectingW 30d0a44c55 Merge pull request #196 from peppergrayxyz/malloc_trim
add malloc_trim guard __GLIBC__
2026-05-06 08:13:23 -04:00
CollectingW 96f500e50b Merge pull request #199 from zesakain/fix/androidKeyboard
android: fix virtual keyboard issues in Software Keyboard
2026-05-06 08:12:44 -04:00
collecting 495c2697be fix: Updater Commit Link to GitHub 2026-05-06 06:55:24 -04:00
collecting a8a924174f feat: New options / Visual tweaks from Dark/Light Themeing Awareness w/ specific accent color text values 2026-05-06 06:37:41 -04:00
zesakain 4550380fec android: add text editor support to InputOverlay 2026-05-05 04:31:46 +07:00
zesakain d161627b8b android: prevent crash on empty backspace in inline keyboard
Add guard before pop_back() in SubmitInlineKeyboardInput.
2026-05-05 04:03:17 +07:00
zesakain 33bfc617da android: improve inline software keyboard visibility
Ensure overlay focus and restart IME before showing keyboard.
2026-05-05 04:01:48 +07:00
Pepper Gray 4c21d2ad2e add malloc_trim guard __GLIBC__
building with musl fails with:

```
citron-neo/src/core/core.cpp:504:13: error: use of undeclared identifier 'malloc_trim'
  504 |             malloc_trim(0);
      |             ^~~~~~~~~~~
1 error generated.
```

change guard from 'not on Android' to 'only with glibc'.

fix: #195
Signed-off-by: Pepper Gray <hello@peppergray.xyz>
2026-05-04 16:18:13 +02:00
collecting ec5dd85ab8 fix: Spontaneous GPU & CPU Core Crashes 2026-05-04 01:04:21 -04:00
collecting b1ba68ef6d Further Adjustments w/ new UI Overhaul, should be the last needed 2026-05-03 19:42:44 -04:00
collecting c227863fc8 fix: Cramping issue of title text when switching resolutions 2026-05-03 17:43:35 -04:00
collecting 8538ff1fd4 fix: More Windows Complaining & minor text tweak for Title in Details 2026-05-03 11:47:09 -04:00
collecting 913c01088a please be last fix thanks 2026-05-03 11:21:55 -04:00
collecting de374f814b fix: Windows Complaining & minor tweaks 2026-05-03 11:04:28 -04:00
collecting 41360d9c07 feat: SteamGridDB & Various UI adjustments (Details Tab, Icon Size Memory etc.) 2026-05-03 10:23:13 -04:00
Mythrax 24b255bf3d shader_tool: add standalone CLI for translating Maxwell shaders to SPIR-V
Signed-off-by: Mythrax <mythrax@mythrax-rs.org>
2026-05-03 14:28:24 +10:00
CollectingW cf61299593 Merge pull request #186 from zesakain/feat/androidManifest
android: improve manifest performance flags
2026-05-01 07:40:42 -04:00