* video_core: Rework detiling
* video_core: Support tiling and macrotile detiling
* clang format
* image_info: Cleanups
* resource: Revert some changes
* texture_cache: Fix small error
* image_info: Set depth flag on depth promote
* buffer_cache: Remove level check
* tile_manager: Handle case of staging buffer causing flush
* image_info: Add 2D thick array mode
* image_info: Add slices to mip size
* tile_manager: Set bank swizzle
* buffer_cache: Support image copies from DmaData
* vk_rasterizer: Accelerate trivial render target copies with compute
Before tiling PR compute image copies were done with the following sequence
vkCmdCopyImageToBuffer (in SynchronizeBufferFromImage) -> vkCmdDispatch (copy) -> vkCmdCopyBufferToImage (in RefreshImage)
With the tiling PR it added extra tiling/detiling steps
vkCmdCopyImageToBuffer -> vkCmdDispatch (tiling) -> vkCmdDispatch (copy) -> vkCmdDispatch (detiling) -> vkCmdCopyBufferToImage
This is quite a bit of overhead for a simple image copy. This commit tries to detect trivial image copies i.e cs shaders that copy the full source image to all of the destination.
So now all this sequence is just a vkCmdCopyImage. How much it triggers depends on the guest
* texture_cache: Fix build
* image: Copy all subresources with buffer too
* select
* select for windows
* fixed windows only function
* windows error converts
* fixed up
* fixed compile
* another implementation for windows
* draft rewrite for windows
* implementation for windows
* added some debugging info
* more debugging
* extensive log
* Windows: Add device files to output fd_sets
Cyberpunk 2077 breaks without this.
Also added some formatting changes, to bring the implementation closer to our typical coding standards.
* Clang
* Formatting + cleanup
Removed some excessive logging used for debugging, and did some cleanup on the non-Windows implementation.
---------
Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
Co-authored-by: Stephen Miller <millerste004@gmail.com>
* Changes
-Added support for OrbisImeParamExtended (extended IME parameters) in ImeHandler, ImeState, and ImeUi
-Updated all relevant constructors and logic to propagate and store the extended parameter
- Now fully supports passing extended options from sceImeOpen to the IME UI and backend
* Potential CUSA00434 [Debug] <Critical> assert.cpp:30 assert_fail_debug_msg: Assertion Failed!
buf_len + 1 <= buf_size && "Is your input buffer properly zero-terminated?" at C:/VS/shadPS4-ime-fixes/externals/dear_imgui/imgui_widgets.cpp:4601 fix
* Attempting to resolve an assertion failure in Diablo III:
- Adjusted buffer sizes
- Updated the calculation of text‑length values
* ime-lib another hotfix
Fixed incorrect param->title validation, which caused the IME dialog to fail to appear in Stardew Valley. Need to be checked.
* Clang fix
* FF9 ImeDialog Hotfix
* Removed the validation that disallowed null text and null placeholder, since using null values is valid in `ImeDialog`.
* Added additional debug logs to aid troubleshooting.
* IME Fixes
- Add missing flags to `OrbisImeExtOption`
- Improve debug logging
- Resolve nonstop `sceImeKeyboardOpen` calls in Stardew Valley (MonoGame engine) for `userId = 254`
---------
Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
* Add stubbed libkernel time functions
* Implement remaining stubbed Rtc functions
* Move Rtc from the optionally HLE loading part to the always loaded part
* Remove Rtc from the README list of LLE modules
* Mfw last second hotfix I noticed while double checking that everything's good before opening the PR
* Changes
-Added support for OrbisImeParamExtended (extended IME parameters) in ImeHandler, ImeState, and ImeUi
-Updated all relevant constructors and logic to propagate and store the extended parameter
- Now fully supports passing extended options from sceImeOpen to the IME UI and backend
* Potential CUSA00434 [Debug] <Critical> assert.cpp:30 assert_fail_debug_msg: Assertion Failed!
buf_len + 1 <= buf_size && "Is your input buffer properly zero-terminated?" at C:/VS/shadPS4-ime-fixes/externals/dear_imgui/imgui_widgets.cpp:4601 fix
* Attempting to resolve an assertion failure in Diablo III:
- Adjusted buffer sizes
- Updated the calculation of text‑length values
* ime-lib another hotfix
Fixed incorrect param->title validation, which caused the IME dialog to fail to appear in Stardew Valley. Need to be checked.
* Clang fix
* FF9 ImeDialog Hotfix
* Removed the validation that disallowed null text and null placeholder, since using null values is valid in `ImeDialog`.
* Added additional debug logs to aid troubleshooting.
---------
Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
* Use last 16 characters of DLC folder name to determine entitlement label
Code comments and commit name say it all.
* Clang
* Adjust comment
ftpdump appends -ac at the end of the entitlement label, so my comment was partially incorrect.
* Changes
-Added support for OrbisImeParamExtended (extended IME parameters) in ImeHandler, ImeState, and ImeUi
-Updated all relevant constructors and logic to propagate and store the extended parameter
- Now fully supports passing extended options from sceImeOpen to the IME UI and backend
* Potential CUSA00434 [Debug] <Critical> assert.cpp:30 assert_fail_debug_msg: Assertion Failed!
buf_len + 1 <= buf_size && "Is your input buffer properly zero-terminated?" at C:/VS/shadPS4-ime-fixes/externals/dear_imgui/imgui_widgets.cpp:4601 fix
* Attempting to resolve an assertion failure in Diablo III:
- Adjusted buffer sizes
- Updated the calculation of text‑length values
* ime-lib another hotfix
Fixed incorrect param->title validation, which caused the IME dialog to fail to appear in Stardew Valley. Need to be checked.
* Clang fix
---------
Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
* Changes
-Added support for OrbisImeParamExtended (extended IME parameters) in ImeHandler, ImeState, and ImeUi
-Updated all relevant constructors and logic to propagate and store the extended parameter
- Now fully supports passing extended options from sceImeOpen to the IME UI and backend
* Potential CUSA00434 [Debug] <Critical> assert.cpp:30 assert_fail_debug_msg: Assertion Failed!
buf_len + 1 <= buf_size && "Is your input buffer properly zero-terminated?" at C:/VS/shadPS4-ime-fixes/externals/dear_imgui/imgui_widgets.cpp:4601 fix
* Attempting to resolve an assertion failure in Diablo III:
- Adjusted buffer sizes
- Updated the calculation of text‑length values
---------
Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
* Store platform-specific level in a separate variable
So the level logged in the getsockopt/setsockopt unreachable is actually useful in cases where the level is unknown.
* Define ORBIS_NET_IPPROTO_IPV6
Not implemented yet, but since it's known we might as well add it.
* Fix error codes
Our libSceNet code expects accurate ORBIS_NET_E* errors, while the sys_net code returns ORBIS_NET_ERROR_* errors.
* Remove duplicate getsockname implementation
* Use separate mutex for ReceivePacket calls
Calls to ReceivePacket shouldn't block other socket functions, and allowing them to block these functions frequently causes deadlocks in games that use multiple threads for socket behaviors.
That said, concurrent receives are still a potential issue, so the function should still have a mutex.
* Add missing error codes
* Clang
* Minor nit
Not sure why these were left separate from the rest of the net errnos
* Set __Error() in ConvertReturnErrorCode
Because the new error values are positive, the logic of "negative return is an error" doesn't work anymore. The easiest fix, while retaining corrected error values, is to just set __Error() in ConvertReturnErrorCode, and have that return -1 instead.
I also added some formatting fixes here too.
* Set errno on stubbed P2P socket error returns.
Otherwise the errno is just whatever was set by a previous failing function, which may cause issues in some games.
I used EAGAIN here since it appears to be valid for all three of these functions, but this can be changed if requested.
* Fix missed error returns
* Fix socket methods in file_system
Missed these
* Implement simple DNS name resolution
* Remove conversion of getaddrinfo errors to string
---------
Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
* Retrieve correct netmask in netctl
* Retrieve correct default route in netctl (Linux)
* Retrieve default gateway on mac
* added default gateway for windows
---------
Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
* ime-fixes-hotfix
- Fixed incorrect validation of internal errors causing the keyboard GUI to not close on call to sceImeClose.
- Removed nonstop spam when ImeDialog is opened.
- Fixed text and data decoding for logs.
- Fixed incorrect validation of internal errors in sceImeKeyboardClose.
- Added partial implementation of sceImeKeyboardGetResourceId (always returns that the USB keyboard is disconnected); used in CUSA33782.
* fix clang in ime.cpp
* Update ime_dialog.cpp
Remove unnecessary Log spam
* Update ime.cpp
- use brackets for loops
- removed duplicated Log
* Update ime_dialog_ui.cpp
- fixed comment style code removal
* Update ime.cpp
- more brackets
---------
Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
* Config entry isConnectedToNetwork
* Respect Config::isConnectedToNetwork when returning connection state
* Return connection status in NetCtlGetInfo
* Print connection data in log
* - typo fix
- added validations for sceImeKeyboardOpen/Close
- fixed mistakes in logs
- additional log spam for debuging
* Disable user id validation
Disable user id validation until user manager is ready.
---------
Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
* 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>
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)
* 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.