481 Commits

Author SHA1 Message Date
Pedro Montes Alcalde 4b891b8394 config: Only allow native buffer mapping on android (#3997) 2026-06-11 21:09:41 -03:00
Pedro Montes Alcalde 16cfb52ba8 Rename pref_path to vita_fs_path (#4012) 2026-06-11 20:04:57 -03:00
nishinji 97039b55b6 util: Use contains instead of find for strings (#3961)
* Update BUILDING.md

* util: Use contains instead of find for strings

also removed custom 'bit_cast'

Co-authored-by: 双子叶植物 <149964080+Dicot0721@users.noreply.github.com>

---------

Co-authored-by: nishinji <nishinji@users.noreply.github.com>
Co-authored-by: 双子叶植物 <149964080+Dicot0721@users.noreply.github.com>
2026-05-27 10:30:25 -03:00
Pedro Montes Alcalde a929a2bded fonts: Remove bundled fonts (#3974) 2026-05-26 16:10:17 -03:00
KorewaWatchful 905ac6a5a6 renderer: refactor frame host and fix macos vulkan issues 2026-05-24 19:07:06 -04:00
Gamid 16afc7b89d gxm/app: fix shutdown deadlocks caused by scegxm/clean up session controller (#3950)
* gxm: track sync objects and invalidate on shutdown

* app/gxm: shutdown cleanup
2026-05-20 19:20:51 -04:00
KorewaWatchful b52c735f39 overlay: fix input related bugs 2026-05-20 19:05:54 -04:00
Dicot0721 d9b605854b android: Add x86_64 ABI
- Disable adrenotools in Android x86_64 build to compile.
- Fix incorrect type for parameter of JNI function.
2026-05-18 11:38:20 -03:00
Macdu f52b3af7b4 renderer: Improve depth buffer accuracy
Co-authored-by: SaturnSky <ikadro@gmail.com>
2026-05-18 10:12:02 -04:00
bookmist 4e03f06a06 gui-qt: fix string/path/QString conversion for non ASCII strings for old Windows 2026-05-17 01:22:14 +03:00
KorewaWatchful 91f533f86f emu: complete gui overhaul 2026-05-13 17:58:56 -04:00
Zangetsu38 703828d56d gui/settings dialog: Fix custom config of the custom driver on Android.
- Add custom gpu idx request for this too.
app/app init: Using current_config instead of cfg for set current_custom_driver.
2026-04-25 23:57:15 +02:00
KorewaWatchful 0244eae5a1 mem: split host/guest page sizes to support 16kib page devices 2026-04-25 13:33:53 -04:00
ikhoeyZX 0f92954300 renderer/vulkan: fix deep stencil for powerVR. 2026-03-30 19:05:51 +02:00
Macdu 99694acd96 renderer: Fix renderer finish on vulkan without memory mapping (#3849) 2026-03-14 16:26:17 +01:00
Dicot0721 09d532ac13 renderer/vulkan: Change GPU priority
- Old: discrete > other.
- New: discrete > integrated > other.
2026-03-08 00:57:21 +01:00
olistarri 96b0b22b40 renderer/vulkan: Drain VK wait thread queue in sceGxmFinish (#3840)
* renderer/vulkan: Drain VK wait thread queue in sceGxmFinish

renderer::finish() only waited for the renderer command thread (via Nop),
but the VK wait thread that writes notification values after GPU fences
complete runs asynchronously. This caused a race where sceGxmFinish
returned before all notifications were written, allowing late writes to
overwrite values the game expected to be final (e.g. display callback
resets to 0), resulting in deadlocks during scene transitions.

* renderer/vulkan: Address review comments for VK wait thread drain

- Push a dummy CallbackRequest before wait_empty to ensure the last
  request on the queue has been fully processed, not just dequeued
- Use static_cast instead of reinterpret_cast
2026-03-07 17:15:52 +01:00
bookmist 276bfaffd4 renderer: fix immediate OpenGL crash on unusual/virtualized GPUs 2026-02-25 18:23:56 +03:00
双子叶植物 7cacb002e3 Revert "renderer/vulkan: Change the automatic detection order of GPUs"
This reverts commit 32ac86a3a9.
2026-02-23 17:30:28 +01:00
Dicot0721 32ac86a3a9 renderer/vulkan: Change the automatic detection order of GPUs
- The first GPU is usually the best one, so searching backward ensures the first one is used when there is no discrete GPU.
2026-02-22 07:10:00 +01:00
Aku Kotkavuo 1286ff85cf renderer/vulkan: Add dirty flag to ColorSurfaceCacheInfo
While investigating #2733, I noticed that Vita3K would render an
_ancient_ frame from a previous scene transition (with a red hue)
whenever a new scene transition occurred.

This happens because `surface_cache` includes a stale texture from the
previous transition. By adding a `dirty` flag to the cache entries by
trapping writes to texture memory we can skip the `surface_cache` for
stale textures and pass through to `texture_cache` instead.

Also, set `can_mprotect_mapped_memory` if using double buffering.

Fixes #2733.
2026-02-13 05:01:46 +01:00
nishinji 1167cb63ac vita3k: add some SDL_Error log 2026-02-04 17:03:52 +01:00
bookmist 345d807488 Tick Tick Tick, thats the sound of 2025 flying by 2026-01-18 01:58:45 +03:00
Aku Kotkavuo effbca0ad7 vita3k: Fix deadlock on SDL_EVENT_QUIT
When closing Vita3k via a window manager while a game is running, there
was a shutdown deadlock instead of clean exit.

Two fixed issues:

- CPU: `sceGxmNotificationWait` could block indefinitely; make it aware
  of abort and notify on quit
- GPU (Vulkan): `gpu_request_wait_thread` could block indefinitely;
  abort `request_queue` and join the thread in `preclose_action`.
2026-01-10 15:50:24 +01:00
ekisu 271e9959d1 renderer/vulkan: rebuild swapchain when surface size differs from window 2026-01-08 03:16:31 +01:00
Macdu b4c1335422 build: Add Android version.
- PS button support added to the overlay controller, with improved default button positioning.

Co-authored-by: Zangetsu38 <dante38@free.fr>
2025-12-30 18:09:43 +01:00
Seungyun Lee 5f3c81f1bb renderer/vulkan: Fix macOS crash by handling VK_KHR_portability_enumeration correctly 2025-09-25 22:48:30 +02:00
bookmist cf3d627327 vita3k: Migration from SDL2 to SDL3 2025-07-14 19:04:22 +03:00
oltolm ae8af74b33 fix build with GCC on Windows (#3610) 2025-05-31 11:46:59 -03:00
Dicot0721 55bdb26375 lang/app/renderer: Update Simplified Chinese translation
- Fix error in id.xml.
- Replace bitwise "&" used for Boolean with logical "&&".
2025-05-23 01:14:04 +03:00
bookmist 6085e98e7a config: reduce memory consumption and refactoring
Remove implementation from .h file and disable permanent storage of yaml node.
Also simplify .h file and remove as much includes as possible for faster compilation
2025-05-17 11:40:51 +03:00
Dicot0721 244204b8ba renderer/vulkan: Ensure that the std::thread object is destroyed properly.
- Ensure that VKContext::gpu_request_wait_thread is not joinable when the VKContext object is destroyed.
2025-04-28 11:32:25 +02:00
Dicot0721 d4b692bb01 vita3k: Improve use of string/stringstream
- Replace `std::stringstream::operator<<` with faster `fmt::format_to` and `std::string::operator+=`.
- Replace `std::stringstream::operator>>` with faster `std::strtoul`.
- Use `std::move` when return `std::stringstream::str`.
- Distinguish between output-only and input-only streams.
2025-04-28 11:42:31 +03:00
Dicot0721 2fa64c915f util/log.h: Make log_hex available to uint8_t 2025-04-22 22:17:48 +03:00
nishinji 2e5bb91574 use fmt instead of log_hex 2025-04-20 11:59:07 +02:00
RyleFury 8d3f28fee1 app/renderer/gui: add fullscreen hd res pixel perfect checkbox
Add the "Fullscreen HD res pixel perfect" checkbox in the GUI section to set 1080p and 4K resolutions to a perfect integer pixel ratio by cropping 2 pixels in the top and the bottom in fullscreen mode.
2025-04-18 02:06:41 +03:00
bookmist 5aa398be89 vita3k: code cleanup and minor bugfixes
Fix bugs
* gui/disassembly_dialog: fix bug. Can't enter addresses >= 0x80000000
* utils/vc_runtime_checker: fix almost impossible AV in vc_runtime_checker
* util/net_utils: fix warning and error in parseHeaders function
* patch: fix almost impossible bug, also drop unused var
* modules/SceAvPlayer: fix error (wrong mutex)
* kernel: more correct value of export variable __sce_libcparam (NID:0xDF084DFA)
* interface.cpp/get_contents_path (Looks like mistype in duplicate search)

Needs recheck of refactoring. I found something strange, but I'm not sure if it's intended or not.
* renderer::vulkan/VKContext::VKContext (Looks like mistype in variable name)
* spirv_recompiler/create_fragment_inputs (Variable anonimous is always false here. It's not static and reinit every loop iteration)
* renderer/transfer: fix strange (and maybe never run) code if pixel format is unknown
* renderer/vulkan/replacement: fix some type to type converson

Refactoring and enhancements
* codec/atrac9: better error logs
* util/fs_utils: Function read_data which read file to vector. Also use it if possible
* util/log: custom formatter for Ptr<> type (it simplifies logging)
* util/tracy: set tracy_module_id variable static
* util/warning.h : header to cross-platform disable warnings
* renderer/transfer: fix strange (and maybe never run) code if pixel format is unknown
* nids: typo fix
* modules/module_parent: remove link to nids.inc from header
* modules/module_parent: move macro to other such macros in bridge.h
* kernel: refactoring use get_thread instead of lock_and_find
* mem/ptr: set type Ptr<T> trivial (trivially copiable, movable and so on)

Fix warnings:
* some retype in BitmapAllocator (mem-tests are OK)
* typecasts
* remove unused variables and fields
* push_back->emplace_back
* rename duplicate variables (usually in nested loops)
* drop excessive brackets
* remove some unused includes
* set 'static' for functions if possible
* gui:home_screen/draw_home_screen: same values around ? operator.
* convert declare SCE_*_ERROR_* to enums
* bracket initialisation instead of memset
* other compiler warnings
2025-04-16 23:03:10 +03:00
Dicot0721 7c21102909 gui/renderer: Replace sscanf when not parsing a complex string
- The use of `sscanf` should be reduced, to improve efficiency and get rid of the cumbersome format specifiers.
2025-04-02 18:30:19 +03:00
Dicot0721 200004743f audio/gui/ngs/renderer/util: Optimize some code
- Use `default``delete` to define.
- Use `empty` method to check for emptiness.
- Use bool literal to avoid converting integer literal to bool.
2025-04-02 18:29:36 +03:00
scribam f95cfc4600 external: Update submodules (#3511)
* external: Update VulkanMemoryAllocator-Hpp to version v3.2.1

* external: Update capstone to version 5.0.6

* external: Update cubeb

* external: Update fmt to version 11.1.4

* external: Update googletest to version v1.16.0

* external: Update imgui to version v1.91.3

* external: Update imgui_club

* external: Update libfat16

* external: Update nativefiledialog-extended to version v1.2.1

* external: Update pugixml to version v1.15

* external: Update sdl to version 2.30.11

* external: Update spdlog to version v1.15.2

* external: Update stb

* external: Update vita-toolchain

* external: Update xxHash to version v0.8.3
2025-04-01 18:34:02 +02:00
Herman Semenov 8de2d49c12 renderer: fixed dxgi_to_gxm() for format B5G5R5A1_UNORM 2025-03-03 20:00:04 +03:00
Herman Semenov f2968fab11 renderer: fixed dxgi apply for BC2_UNORM format 2025-03-02 00:41:03 +03:00
Saturnsky f0c22ea2e9 gui/highdpi: auto adjust font size based on DPI and window scale 2025-01-21 10:30:25 +03:00
Pedro Montes Alcalde 4a14d546ba Tick Tick Tick, thats the sound of 2024 flying by (#3503) 2025-01-19 18:51:43 -03:00
SaturnSky afd2e218f7 renderer: Fix incorrect timestamp offset in wait_cmd function 2024-11-02 00:21:56 +01:00
oltolm c61895e6f4 vita3k: Add support for mingw-w64 (#3406)
* make the code compile on mingw-w64

* make compile with Clang 19

* make compile with GCC
2024-10-26 23:41:51 +02:00
Saturnsky 3fb83f8814 renderer/gl: Implement F32 base color format (#3384) 2024-09-24 21:58:13 +02:00
scribam 77abeaa167 vita3k: More cleanup (#3379)
* vita3k: Use C++17 nested namespace definition

* vita3k: Remove redundant call to c_str()

* vita3k: Prefer C++ header

* vita3k: Use structured bindings

* shader: Add explicit fallthrough

* vita3k: Cleanup headers and dependencies

* util: Add WIN32_LEAN_AND_MEAN before <Windows.h>

* modules: Remove redundant 'const' specifier on a constexpr variable

* modules: Remove redundant return statement at the end of a function with a void return type

* clang-format: Use C++20 standard

* vita3k: Insert new line at EOF

* host: rename filesystem.hpp to filesystem.h
2024-09-18 21:48:08 +02:00
Seungyun Lee c94189dd9b external/ci: set macOS minimum version to 11.0 (#3361)
* external: download MoltenVK when configuring build system

* external: add option to build OpenSSL on macOS

* external: build custom boost with specific arch on macOS

* cmake: unify mixed and wrong indentations with tabs

* vita3K/ci: set macOS minimun version with 11.0
2024-09-11 19:09:26 +02:00
Saturnsky 3224de0694 renderer/gl: Remove unnecessary translate_type() call for compressed textures (#3372) 2024-09-08 12:25:06 +02:00