Commit Graph

3189 Commits

Author SHA1 Message Date
georgemoralis
a4c5fa4b5c
Using custom usb lib (#3284)
* added ext-libusb to overcome sysv_abi changes

* Fully remove libusb submodule
2025-07-21 12:24:11 +03:00
kalaposfos13
95a386308a
Implement sceKernelError (#3282)
* Implement sceKernelError

* Oh come on
2025-07-20 22:52:44 +03:00
Randomuser8219
0706223aaf
Small typo fix for avplayer assert (#3283)
Found that this assert message was typoed when running Knack 2 through a debugger.
2025-07-20 22:52:31 +03:00
Marcin Mikołajczyk
fd03fe2b5a
Register posix_rename (#3281) 2025-07-20 22:07:37 +03:00
kalaposfos13
f0cd981548
Implement sceAudioOutGetLastOutputTime (#3279)
* Implement sceAudioOutGetLastOutputTime

* Error returns

* Logging
2025-07-20 21:15:16 +03:00
Marcin Mikołajczyk
bd0102c8d0
Misc fixes (#3171) 2025-07-20 20:52:05 +03:00
TheTurtle
0b72a795eb
vk_rasterizer: Improve stencil clears (#3268) 2025-07-19 02:39:54 +03:00
TheTurtle
2ae7037c08
texture_cache: Clamp buffer image height to microtile height (#3261)
Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2025-07-18 13:14:41 +03:00
Valdis Bogdāns
af67473de3
Ime lib fixes (#3244)
* IME fixes

- Moved enums, flags, and structs to ime_common.h to simplify usage with Ime and ImeDialog
- Updated Ime to use an enum as the return type, consistent with ImeDialog
- Removed duplicate definition of OrbisImeKeycode
- Added OrbisImeLanguage as a flags enum
- Added missing options to OrbisImeOption
- Removed OrbisImeDialogOption; OrbisImeOption should be used instead
- Added OrbisImeTextAreaMode
- Updated OrbisImeTextAreaMode
- Fixed OrbisImeEventParam by adding the missing member OrbisImePanelType panel_type
- Updated the sceImeOpen declaration to use extended parameters (not yet implemented)
-Fixed Diablo III (CUSA00434) assertion failure on ImeDialog initialization

* Ime lib fixes
- Updated functions to consistently use the Error enum type for return values.
- Added detailed logging to aid future IME/OSK development and debugging.
- Now use OrbisUserServiceUserId (s32) and OrbisImeKeycodeState in relevant functions and structs.
- Introduced a generic template method to generate full bitmasks for all Orbis flag-style enums, simplifying validation and mask creation.
- Implemented additional parameter validations in sceImeOpen.
- Added missing enums: OrbisDisableDevice, OrbisImeInputMethodState, OrbisImeInitExtKeyboardMode, OrbisImeKeycodeState, and other USB keyboard-related enums.
- Fixed incorrect usage of format specifiers in calls to logging macros (LOG_*).

* Data Type Fixes

- Replaced the use of the type alias OrbisUserServiceUserId = s32 with Libraries::UserService::OrbisUserServiceUserId directly.

* Fixed IDE warnings
- generate_full_mask now returns const instead of constexpr.
- Added argument list to std::unique_lock<std::mutex> construction for clarity.

* Clang fixes

* Removed unneccessary comment

---------

Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
2025-07-18 12:40:05 +03:00
TheTurtle
b56039b15a
vk_pipeline_cache: Add fallbacks for R8Srgb and B5G6R5 (#3264)
* vk_pipeline_cache: Add fallbacks for R8Srgb and B5G6R5

* blit_helper: Fix validation error

* renderer_vulkan: Emulate B5G6R5 with swizzle
2025-07-18 12:25:07 +03:00
baggins183
3019bfb978
Implement MUBUF instructions for shorts/bytes (#2856)
* implement loads/store instructions for types smaller than dwords

* initialize s16/s8 types

* set profile for int8/16/64

* also need to zero extend u8/u16 to u32 result

* document unrelated bugs with atomic fmin/max

* remove profile checks and simple emit for added opcodes

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2025-07-18 12:04:50 +03:00
kalaposfos13
76f003d388
Disable autoupdate on branches that aren't the official main (#3262)
* Disable autoupdate on branches that aren't the official main

* Change to status messages because Fire Cube was complaining about this
2025-07-18 11:37:29 +03:00
UltraDaCat
fafd3fb564
Volume slider that adjusts how loud games are on a global level (#3240)
* Update config.cpp

* Update config.h

* Update sdl_audio.cpp

* Update settings_dialog.cpp

* Update settings_dialog.h

* Update settings_dialog.ui

* Update gui_settings.h

* Update audioout.cpp

* Update audioout.h

* Update settings_dialog.cpp

* remove leftover settings_dialog.ui

* Update settings_dialog.ui

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2025-07-18 11:20:05 +03:00
DanielSvoboda
e914099ae2
new compatibility repository (#3265) 2025-07-18 10:50:32 +03:00
georgemoralis
1689cdb1a2
Update Readme with new compatibility list link 2025-07-17 20:30:14 +03:00
kalaposfos13
fddded8d20
Add an unreachable on hitting ud2 instead of getting stuck in an infinite loop (#3257)
* Add an unreachable on hitting ud2 instead of getting stuck in an infinite loop

* Add [[unlikely]] to get ahead of the inevitable PR review comment
2025-07-16 18:06:58 +03:00
georgemoralis
161aa49f37
New Crowdin updates (#3219)
* New translations en_us.ts (Ukrainian)

* New translations en_us.ts (Ukrainian)

* New translations en_us.ts (Spanish)

* New translations en_us.ts (Albanian)

* New translations en_us.ts (Polish)

* New translations en_us.ts (Polish)

* New translations en_us.ts (Turkish)

* New translations en_us.ts (German)
2025-07-16 18:04:27 +03:00
kalaposfos13
68b147488e
If CONTENT_ID is empty in param.sfo, try using TITLE_ID as fallback (#3258)
* If CONTENT_ID is empty in param.sfo, try using TITLE_ID as fallback

* Remove assert that is now not needed and fix me switching up variable names
2025-07-16 18:03:39 +03:00
Stephen Miller
aeab525a7f
Fix create flag handling in open (#3255)
If the create flag is specified, but the file already exists, then the file should open successfully, regardless of permissions.
This fixes a crash seen in Phantasy Star Online 2 New Genesis (CUSA29813)
2025-07-16 12:30:20 +03:00
kalaposfos13
499451bb80
Standardize RegisterLib names for HLE libraries (#3234) 2025-07-16 12:23:03 +03:00
TheTurtle
cf8a6efd37
liverpool_to_vk: Don't use remapped format for clear value (#3254) 2025-07-16 01:54:56 +03:00
TheTurtle
6e350a5085
Avoid clearing HTILE when shader contains address calculation (#3252)
* resource_tracking: Mark image as written when its used with atomics

* texture_cache: Remove meta registered flag

Mostly useless and it is possible for images to switch metas

* vk_rasterizer: Use xor as heuristic for HTILE clear
2025-07-16 01:28:03 +03:00
DanielSvoboda
a82698d601
qt: fix gui emulatorLanguage (#3250) 2025-07-16 00:15:59 +03:00
TheTurtle
83475ac828
attribute: Correct bary coord function (#3253) 2025-07-15 22:55:57 +03:00
Marcin Mikołajczyk
6d6068e0e2
Fix ff1_i32_b64 not accepting vcc as its argument (#3251) 2025-07-15 11:39:37 -07:00
TheTurtle
4407ebdd9b
shader_recompiler: Implement guest barycentrics (#3245)
* shader_recompiler: Implement guest barycentrics

* Review comments and some cleanup
2025-07-15 18:49:12 +03:00
TheTurtle
87f6cce7b1
vk_instance: Remove usage of depth clamp control (#3248) 2025-07-15 18:36:13 +03:00
Stephen Miller
bf623d4f85
Libraries: Implement sceAudio3dTerminate (#3247)
* sceAudio3dTerminate

My First Gran Turismo® (CUSA49696) uses this while initializing it's audio system. Without it, the game spams errored sceAudio3dInitialize calls.

* Properly close AudioOut handle

Based on library decompilation.
2025-07-15 15:48:05 +03:00
Stephen Miller
97daee836a
Core: Fix read-only file unmaps on Windows (#3246)
* Fix read-only file unmaps

Fixes Genshin Impact (CUSA23681)

* Slight cleanup

Don't need `post_merge_it` anymore.
2025-07-15 14:11:56 +03:00
kalaposfos13
b68ca43166
Implement sceKernelGetSystemSwVersion (#3243)
* Implement sceKernelGetSystemSwVersion

* Set the reported firmware version to that of the game executable
2025-07-14 23:44:13 +03:00
TheTurtle
00f4eeddaf
renderer_vulkan: Handle more miscellaneous GPU settings (#3241)
* renderer_vulkan: Respect provoking vertex setting

* renderer_vulkan: Handle rasterization discard

* renderer_vulkan: Implement logic ops

* renderer_vulkan: Properly implement depth clamp and clip

* renderer_vulkan: Handle line width

* Fix build

* vk_pipeline_cache: Don't check depth clamp without a depth buffer

* liverpool: Fix line control offset

* vk_pipeline_cache: Don't run search if depth clamp is disabled

* vk_pipeline_cache: Allow using viewport range when it's more restrictive then depth clamp

* liverpool: Disable depth clip when near and far planes have different setting

* vk_graphics_pipeline: Move warning to pipeline

* vk_pipeline_cache: Revert viewport check and remove log

* vk_graphics_pipeline: Enable depth clamp when depth clip is disabled and extension is not supported

Without the depth clip extension depth clipping is controlled by depth clamping
2025-07-14 21:23:18 +03:00
TheTurtle
399a725343
shader_recompiler: Replace buffer pulling with attribute divisor for instance step rates (#3238)
* shader_recompiler: Replace buffer pulling with attribute divisor for instance step rates

* flatten_extended_userdata: Remove special step rate buffer handling

* Review comments

* spirv_emit_context: Name all instance rate attribs properly

* spirv: Merge ReadConstBuffer again

template function only has 1 user now

* attribute: Add missing attributes

* translate: Reimplement step rate instance id

* Resolve validation warnings

* shader_recompiler: Separate vertex inputs from LS stage, cleanup tess
2025-07-14 00:32:02 +03:00
TheTurtle
b403e1be33
vk_rasterizer: Set render area to max when no framebuffers are bound (#3227) 2025-07-10 22:14:02 +03:00
TheTurtle
8bc30270c8
shader_recompiler: Implement ff1 with subgroup ops (#3225) 2025-07-10 21:52:56 +03:00
TheTurtle
88abb93669
ir_passes: Fold readlane with ff1 pattern (#3224) 2025-07-10 14:19:44 +03:00
kalaposfos13
ee97c5c110
Define S_TRAP as InstCategory::FlowControl (#3223) 2025-07-10 13:53:38 +03:00
TheTurtle
27cbd6647f
shader_recompiler: Reorganize data share operations and implement GDS bit (#3222)
* shader_recompiler: Reorganize data share operations and implement GDS bit

* Review comments
2025-07-10 13:38:50 +03:00
IndecisiveTurtle
dc6ef99dc7 vector_memory: Handle immediate but non zero offset too
Signed-off-by: georgemoralis <giorgosmrls@gmail.com>
2025-07-09 18:40:05 +03:00
TheTurtle
7d4b875ee3
Random fixes (#3216)
* buffer_cache: Handle inline data to flexible memory

* control_flow: Fix single instruction scopes edge case

Fixes the following pattern

v_cmpx_gt_u32 cond
buffer_store_dword value
.LABEL:

Before
buffer[index] = value;

After
if (cond)
{
    buffer[index] = value;
}

* vector_memory: Handle soffset when offen is false

When offen is not used we can substitute the offset argument with soffset and have it handled correctly

* scalar_alu: Handle sharp moves with S_MOV_B64

This fixes unable to track sharp errors when this pattern is used in a shader

* emulator: Add log

* video_core: Bump binary info search range and buffer num
2025-07-09 17:00:06 +03:00
Paris Oplopoios
f5336358ea
Zero top bits in INSERTQ/EXTRQ (#3217)
* Zero top bits in INSERTQ/EXTRQ

* Clang-format

* Don't assert
2025-07-09 13:55:21 +03:00
Fire Cube
df4314f831
Extend Qt detection to support multiple drives (#3209) 2025-07-08 18:39:51 -07:00
kalaposfos13
e5f899aae3
Fix brace elision for designated initializer warning (#3215) 2025-07-08 18:38:28 -07:00
TheTurtle
2d1a2982df
buffer_cache: Bring back upload batching and temporary buffer (#3211)
* buffer_cache: Bring back upload batching and temporary buffer

Because that PR fused the write and read protections under a single function call, it was a requirement to move the actual memory copy part inside the lambda to perform it before the read protection kicks in. However on certain large data transfers it had potential for data corruption. If, for example, an upload had two copies, a 400MB and a 300MB one, the first one would fit in the staging buffer, very likely with an induced stall. However the second one wouldn't have space to fit alongside the other data, but it's also small enough for the buffer to fit it, so the staging buffer would cause a flush and wait to copy it, overwriting the previous transfer.

To address this the upload function has been reworked to allow for batching like previously but with the new locking behavior. Also the condition to use temporary buffers has been expanded to also include cases when staging buffer will stall, which should increase performance a little in some cases.

* buffer_cache: Move buffer barriers and copy outside of lock range
2025-07-08 10:32:39 +03:00
Valdis Bogdāns
ddede4a52d
IME fixes (#3207)
- Moved enums, flags, and structs to ime_common.h to simplify usage with Ime and ImeDialog
- Updated Ime to use an enum as the return type, consistent with ImeDialog
- Removed duplicate definition of OrbisImeKeycode
- Added OrbisImeLanguage as a flags enum
- Added missing options to OrbisImeOption
- Removed OrbisImeDialogOption; OrbisImeOption should be used instead
- Added OrbisImeTextAreaMode
- Updated OrbisImeTextAreaMode
- Fixed OrbisImeEventParam by adding the missing member OrbisImePanelType panel_type
- Updated the sceImeOpen declaration to use extended parameters (not yet implemented)
-Fixed Diablo III (CUSA00434) assertion failure on ImeDialog initialization

Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
2025-07-08 01:04:16 +03:00
Fire Cube
80f7ec2681
video_out: Internal Resolution Support (#3194)
* impl

* clang

* clang+

* update total_entries too
2025-07-07 19:17:56 +03:00
TheTurtle
7fedbd52e0
texture_cache: Async download of GPU modified linear images (#3204)
* texture_cache: Async download of GPU modified linear images

* liverpool: Back to less submits

* texture_cache: Don't download depth images

* config: Add option for linear image readback
2025-07-07 16:23:20 +03:00
georgemoralis
d6163a6edb uber fix 2025-07-07 13:37:08 +03:00
Paris Oplopoios
4eaa992aff
Rename 'AddCary' to 'AddCarry' (#3206) 2025-07-07 13:29:11 +03:00
squidbus
70eef0de90
texture_cache: Change depth resolve new image back to max of resources. (#3205) 2025-07-07 13:03:19 +03:00
Paris Oplopoios
146e81a56a
Fix V_ADDC_U32 carry-out edge cases (#3200)
* Fix V_ADDC_U32 carry-out edge cases

* Use IAddCarry instead
2025-07-07 12:44:06 +03:00