Commit Graph
4347 Commits
Author SHA1 Message Date
Marcin Mitura 5ea46a6741 core: Prevent uninitialized start_time and race in UpdatePlayTime (#5142) 2026-09-28 00:07:14 +03:00
kalaposfos13 cc3d367ec7 Rewrite LIB_FUNCTION and LIB_OBJ macros to call a common function to optimize binary size (#5144)
* Rewrite LIB_FUNCTION and LIB_OBJ macros to call a common function to optimize binary size

* fix tests
2026-09-27 23:44:06 +03:00
kalaposfos13 2c3c12a078 We've improved system software performance and stability. (#5154) 2026-09-27 23:43:40 +03:00
Vladislav Mikhalin 883a887545 vdecsw: fix issues introduced by touching the AI code (#5153)
* Revert "touchups"

This reverts commit 9f78047db8.

* just the renames
2026-09-27 22:59:16 +03:00
squidbus 916dea4302 externals: Update mesa-kosmickrisp (#5152) 2026-09-27 21:58:59 +03:00
Marcin Mikołajczyk bcf083f044 Clamp end address for tracked pages to 40bit (#5151) 2026-09-27 21:23:50 +03:00
xop e518a65157 shader_recompiler: Fix S_SUBB_U32 SCC wrap (#5031) 2026-09-27 08:05:52 -07:00
Marcin Mikołajczyk caeb240de1 Fix VUID-StandaloneSpirv-Flat-06202 (#5145) 2026-09-27 12:47:05 +01:00
Vladislav Mikhalin 8151ee25a8 hle: vdecsw (#5128)
* vdecsw

* separate decoding thread

* bruh

* touchups
2026-09-27 10:52:40 +03:00
squidbus 05b51d2211 externals: Update mesa-kosmickrisp (#5138) 2026-09-26 20:49:56 -07:00
nikmparis217-uxandnikmparis217-ux d96278e1e2 video_core: Fix compute shader floating-point mode (#5126)
* video_core: Take the float mode of compute shaders from COMPUTE_PGM_RSRC1

BuildRuntimeInfo copies FLOAT_MODE from SPI_SHADER_PGM_RSRC1 for every
graphics stage but not for compute. RuntimeInfo::Initialize zeroes the
struct, so every compute shader was translated with mode 0 (round to
nearest even, fp32 and fp16/fp64 denormals flushed) whatever the guest
asked for.

Name the four FLOAT_MODE fields of COMPUTE_PGM_RSRC1 (bits 12-19, the
same layout as the graphics program registers) and copy them the way
BuildCommon does for the other stages. The fields are u64 like the rest
of the bit-field: with the MSVC ABI a field of a different type size
starts a new allocation unit, which would move num_user_regs and every
field after it.

* video_core: Use the float mode enum types in ComputeProgram

---------

Co-authored-by: nikmparis217-ux <295578344+nikmparis217-ux@users.noreply.github.com>
2026-09-26 16:27:21 -07:00
Gih-pt 282f64454b shader_recompiler: Implement V_MIN_F64 (#5125) 2026-09-26 14:18:26 -07:00
Gih-pt 53af37af41 shader_recompiler: Implement V_TRUNC_F64 (#5127) 2026-09-26 13:53:55 -07:00
Stephen MillerandTheTurtle 41c0fca5e7 Fix ConstructSharpFetch (#5129)
Co-authored-by: TheTurtle <47210458+raphaelthegreat@users.noreply.github.com>
2026-09-26 21:30:55 +03:00
kalaposfos13 a099dce8c1 Fix IsExecuteError bit checks (#5123) 2026-09-26 07:59:30 -07:00
TheTurtle c6b24ec1c7 video_core: Renderer optimizations pt1 (#5112)
* vk_runtime: Revert to interval sets for barrier tracking

Perf capture shows they are faster in almost all cases due to not needing rebalancing after every insert

* buffer_cache: Dont use copysparsememory for streaming copies

* fetch_shader: Optimize fetch shader parsing

* shader_recompiler: Optimize common case of sharp fetch

Almost always the sharp will be contigious in flatbuf so just use a single load op to load it

* remove zlib

* vk_rasterizer: Check dst region not in sync batch before doing cpu fast path

* address_space: Maintain sparse page table of backing pointers

Can be used to implement CopySparseMemory lock free and cheaply

* vk_rasterizer: Proper gds barriers

* texture_cache: Bring back lock

* fetch_shader: Handle v_mov_b32

* address_space: Avoid out of bounds access with higher than 40bit addresses

so stephen doesnt kill me

* core: Add setting to control inlining of fetch shader
2026-09-26 15:47:11 +03:00
georgemoralis fc5d2cc219 fixed vstudio compile (#5122) 2026-09-26 13:32:42 +03:00
kalaposfos13 caad4163d1 Very basic HLE Keyboard library (#4740)
* quick and dirty keyboard impl

* config option

* libkernel-libkernel export for oo

* clang

* the C language formatter
2026-09-26 12:39:49 +03:00
Connor Garey db73ae0b0e Remove unused code from emulator-settings set of files. (#4963)
* Remove unused code.

* Remove related tests.
2026-09-26 12:17:15 +03:00
Leo Camus 4e44354708 ngs2: propagate SystemSetup validation errors (#5016)
SystemSetup stored the result of SystemSetupCore in a u32, so the
`result < 0` guards could never be taken and an invalid system option
was reported back to the guest as ORBIS_OK.
2026-09-26 11:55:25 +03:00
kaaburgh 2aa3644fb6 docs: update Linux compiler instructions (#5000) 2026-09-26 11:41:13 +03:00
kalaposfos13 722e6d61be Config and input fixes (#5035)
* Fix config corruption on close and replace error with unreachable for failing to load configs

* Clean up config init code a bit

* Fix some hotkeys accidentally triggering twice

* Add unreachable for user_settings as well

* sir clang offnir, the all-formatting

* oops lmao

* oh come on why does clang-format have to find some new random edge case every few months

* update tests that failed

* fuck if i know what this was supposed to be

* :we:
2026-09-26 11:11:50 +03:00
kalaposfos13 6a2edb00ef Change stub generation to create stubs dynamically at runtime with xbyak (#5109)
* Change stub generation to create stubs dynamically at runtime with xbyak

* Log execute access violations

* arm macos is now unsupported architecture

* a global constexpr array means a pointer compare is enough here

* With duplicate checking, 2000 is overkill for a default capacity

* Remove one level of unnecessary indirection

* Swap trampoline protection from r-x to rwx
2026-09-26 10:48:53 +03:00
kalaposfos13 89cd399003 Do not check library version and symbol type when searching for exports in the linker (#5044)
* Do not check library version and symbol type when searching for exports in the linker

* i swear my next PR will be the update CI clang version one

* Remove a line I left in for debugging

* Update comment

* random typo I spotted

* Handle NoType exports
2026-09-26 10:29:13 +03:00
junminlee2004 b77d194eac imgui: Grow the font atlas on demand instead of baking every glyph at boot (#5119) 2026-09-26 10:11:21 +03:00
squidbus 2f1e70925b core: Support loading DLC as ZAR (#5105) 2026-09-25 22:17:50 -07:00
georgemoralis da9fc3a3aa Added pTo and pFrom to OrbisNpPeerAddressA support (#5108)
* Added pTo and pFrom to OrbisNpPeerAddressA support

* all mighty clang

* improved OrbisNpSessionInvitationEventParam

* changed diagnostic to debug

* all mighty clang again
2026-09-26 07:56:55 +03:00
Stephen Miller 7e0c81118a Fix log class names (#5117) 2026-09-25 17:07:07 -07:00
Valdis Bogdāns 2f40f87b5b shader_recompiler: Lower ballot and MBCNT as a pair (#5116)
Trace MaskedBitCount32 inputs back to their ballot source and apply wave64 lowering only when that ballot is in uniform control flow. Keep divergent ballot/MBCNT pairs on native wave32 semantics.
2026-09-26 01:33:04 +03:00
squidbus 41f2a42816 vk_scheduler: Move on_submit callback before EndSession (#5113) 2026-09-25 22:50:06 +03:00
Stephen Miller 776b5fdb65 Core: Fix mac compile (#5111)
* More missing includes

* Update breadth_first_search.h
2026-09-25 12:31:03 -07:00
squidbus c6fa48c754 texture_cache: Fix some image validation issues (#5110)
* image: Do not set storage usage on unsupported multisample image

* image_view: Fall back to base image type when incompatible
2026-09-25 12:30:24 -07:00
TheTurtle 2b5666b310 common: Optimize logger by replacing hash map with table lookup and hide implementation details in cpp file (#5106)
* common: Optimize logger by replacing hash map with table lookup and hide implementation details in cpp file

Also bring back assertion noinline functions, this makes call sites of ASSERT/UNREACHABLE much cleaner

* clang format

* review comments

* fix tests

* fix build pt1

* fix build pt2

* fix build pt3
2026-09-25 20:01:03 +03:00
Valdis Bogdāns 2335629296 shader_recompiler: Support P10/P20 V_INTERP_MOV_F32 selectors (#5087)
* shader_recompiler: Support P10/P20 V_INTERP_MOV_F32 selectors

* shader_recompiler: Correct V_INTERP_MOV P10/P20 handling

Reconstruct P10 and P20 unless both flat_shade and OFFSET5 enable passthrough mode.

Suggested-by: raphaelthegreat

* shader_recompiler: Add PsInput passthrough helper

Move the flat_shade and OFFSET5 check into PsInput::IsPassthrough().

Suggested-by: raphaelthegreat
2026-09-25 19:23:22 +03:00
Hog e4ca349677 add Sys shutdown to posix sockets (#5104)
* Add Shutdown method to Socket interface

* Add Shutdown method to PosixSocket class

* Add Shutdown method to UnixSocket class

* Add Shutdown method to P2PSocket class

* Add error handling and logging to sys_shutdown

* Add sys_shutdown function to kernel library
2026-09-25 08:15:33 -05:00
squidbus 127aec66d0 core: Support loading entitlements from RIF licenses (#5094) 2026-09-25 09:02:19 +03:00
IfkumRfnl 612713d5ff shader_recompiler: Fix geometry invocation count comparison (#5078) 2026-09-25 03:26:46 +03:00
DanielSvoboda c5654d552f Kernel.Pthread: Remove RunThread stack logging (#5097) 2026-09-25 03:25:49 +03:00
TheTurtle 1eab1796a7 buffer_cache: Rework memory tracker and implement batched uploads (#5100)
* buffer_cache: Begin memory tracker rework

* buffer_cache: Implement upload batching

* buffer_cache: Dont use copysparsememory for stream copies

Will need a faster way to check if page is mapped, but also using it has heavy perf overhead

* buffer_cache: Adjust region manager so bitset updates are vectorized

Also remove readable/writeable bitsets since they arent actually needed, should allow more data to fit in cpu caches

* memory: Fix build

* buffer_cache: Bring back copy sparse memory

* staging_pool: Allow requesting unsychronized buffers

Prevents large memory spikes from tiler

* page_manager: Add null check

* video_core: Cleanup implementation

* fix build

* buffer_cache: Remove dead function

* liverpool: Fix nullgpu
2026-09-25 03:07:12 +03:00
Connor Garey b4e7ae7760 Added python3 (#5102)
Added to parameter list.
2026-09-24 14:45:03 -07:00
Marcin Mikołajczyk 19700ebac3 Fix locking behaviour for signals delivered to GPUComm thread (#5096) 2026-09-24 17:58:08 +03:00
313fb953da shader_recompiler: Write VCC on V_SUBB_U32 / V_SUBBREV_U32 (#5032)
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: TheTurtle <47210458+raphaelthegreat@users.noreply.github.com>
2026-09-24 16:22:27 +03:00
ba15ec90cb shader_recompiler: Set SCC overflow on S_ADDK_I32 (#5033)
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: TheTurtle <47210458+raphaelthegreat@users.noreply.github.com>
2026-09-24 16:17:49 +03:00
xopandCursor 98bc32052c shader_recompiler: Test S_BITCMP_B64 against the full 64-bit src (#5034)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 16:13:39 +03:00
Lander Gallastegi a68c324f63 host_shaders: embed shaders as spv (#5062)
* host_shaders: embed shaders as spv

* always clang-format and reuse...

* fix commented out #pragma once in generated code

* use glslang to build shaders

* add cstdint to generated headers
2026-09-24 16:12:54 +03:00
Marcin Mikołajczyk 4c564cf269 Uffd fix iii (#5069)
* Log errors returned from UFFDIO_* operations

* Maintain userfaultfd registration on all reserved memory at all times

* Set userfaultfd handler thread name

* Do not lock GPU resources while handling writeprotection faults originating from GpuCommandProcessor thread

* Style fixes

* Use gettid to retrieve the GPUComm thread id
2026-09-24 16:09:57 +03:00
Valdis Bogdāns c8fcf4d753 video_core: invalidate cached images after raw buffer writes (#5092) 2026-09-24 16:04:52 +03:00
Valdis BogdānsandTheTurtle a48d16dcc2 shader_recompiler: Add pull-model barycentric support (#5084)
* shader_recompiler: Add pull-model barycentric support

* shader_recompiler: fix pull-model barycentric component indexing

---------

Co-authored-by: TheTurtle <47210458+raphaelthegreat@users.noreply.github.com>
2026-09-24 14:23:02 +03:00
Valdis Bogdāns db858d29e6 shader_recompiler: implement fragment sample coverage input (#5090)
* shader_recompiler: implement fragment sample coverage input

* shader_recompiler: move sample coverage handling to IR

Keep the SPIR-V backend limited to raw built-in loads and construct the
guest sample coverage value in the fragment prologue.

Suggested-by: @raphaelthegreat
2026-09-24 13:45:42 +03:00
TheTurtle d2f597adfa shader_recompiler: Address recent regressions (#5093)
* shader_recompiler: Emit GetPcLo as constant

Fixes the assertion triggered by this instruction

* shader_recompiler: Convert mbcnt into pseudo-instruction for better pattern matching and improve reliability of detection

* phi_simplification_pass: Copy users before iterating

Running local CSE can mutate instructions in the list

* vk_instance: Enable maintenance5 if available
2026-09-24 13:43:15 +03:00