Commit graph

1679 commits

Author SHA1 Message Date
TheTurtle cc4460164d shader_recompilers: Improvements to SSA phi generation and lane instruction elimination (#1667)
* shader_recompiler: Add use tracking for Insts

* ssa_rewrite: Recursively remove phis

* ssa_rewrite: Correct recursive trivial phi elimination

* ir: Improve read lane folding pass

* control_flow: Avoid adding unnecessary divergant blocks

* clang format

* externals: Update ext-boost

---------

Co-authored-by: Frodo Baggins <baggins31084@proton.me>
2024-12-05 23:14:16 +02:00
Alexandre Bouvier ced0b440e3 cmake: unbundle stb (#1601) 2024-12-05 23:10:27 +02:00
Marcin Mikołajczyk 649df86146 Handle INDIRECT_BUFFER_CONST in ProcessCeUpdate (#1613) 2024-12-05 23:09:59 +02:00
psucien 03816864dc video_core: fix for targets clears and copies (#1670) 2024-12-05 23:09:22 +02:00
Daniel R. 5ae4c9aae2 hotfix: fix inverted operator on GetDents 2024-12-05 18:45:55 +01:00
Daniel R. 9a4fc51aea The way to Unity, pt.1 (#1659) 2024-12-05 17:21:35 +01:00
Vinicius Rangel b7df24468f Virtual device abstraction (#1577)
* IOFile: removes seek limit checks when file is writable

* add virtual devices scaffold

* add stdin/out/err as virtual devices

* fixed some merging issues

* clang-fix

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2024-12-05 18:00:17 +02:00
squidbus af8d700c95 thread: Configure stack and guard on POSIX hosts. (#1664) 2024-12-04 20:21:03 +02:00
squidbus bc50afe170 renderer_vulkan: Parse fetch shader per-pipeline (#1656)
* shader_recompiler: Read image format info directly from sharps instead of storing in shader info.

* renderer_vulkan: Parse fetch shader per-pipeline

* Few minor fixes.

* shader_recompiler: Specialize on vertex attribute number types.

* shader_recompiler: Move GetDrawOffsets to fetch shader
2024-12-04 13:03:47 +02:00
squidbus f8041b8446 renderer_vulkan: Add support for indexed QuadList draw. (#1661) 2024-12-04 10:15:58 +01:00
TheTurtle be9c797003 hot-fix: Correct getpagesize
Tested on my PS4 pro, returns 16KB instead of 4KB
2024-12-03 14:15:08 +02:00
georgemoralis e5879c622e Misc Ime fixes continue (#1655)
* core/libraries: Misc. Ime fixes

* fixed issues

---------

Co-authored-by: Daniel R <47796739+polybiusproxy@users.noreply.github.com>
2024-12-03 10:05:51 +02:00
psucien e69f648979 video_core: few detiler formats added 2024-12-02 22:24:54 +01:00
TheTurtle eb11924b28 shader_recompiler: Implement manual barycentric interpolation path (#1644)
* shader_recompiler: Implement manual barycentric interpolation path

* clang format

* emit_spirv: Fix typo

* emit_spirv: Simplify variable definition

* spirv_emit: clang format
2024-12-02 23:20:54 +02:00
squidbus 9ee75aaa1a devtools: More warning fixes (#1652) 2024-12-02 20:46:51 +01:00
Vinicius Rangel 50d748c8aa More devtools stuff (#1637)
* devtools: memory map viewer

* devtools: batch highlight only for non-group viewer

* devtools: fix not showing entire user data

* devtools: shader debug viewer

* devtools: add more reg naming
2024-12-01 19:34:29 +01:00
psucien ed504ac743 Merge pull request #1630 from vladmikhalin/fix-missing-rts
Fixed incorrectly skipped RTs
2024-12-01 16:47:25 +01:00
psucien a8ebb1a8d2 hot-fix: debug build fixed 2024-12-01 15:46:08 +01:00
squidbus df570c8e59 playgo: Fix loading PlayGo file. (#1639) 2024-12-01 14:12:04 +02:00
squidbus edaedfd0dc libraries: Add stubs for libScePlayGoDialog (#1635) 2024-12-01 13:44:15 +02:00
Jamie Tong 2094cec5fe implement DS_AND_B32, DS_OR_B32, DS_XOR_B32 (#1593)
* implement DS_OR_B32

* implement DS_AND_B32, DS_XOR_B32
2024-11-30 22:39:11 +02:00
TheTurtle 012cb4a728 core: Library cleanup (#1631)
* core: Split error codes into separate files

* Reduces build times and is cleaner

* core: Bring structs and enums to codebase style

* core: More style changes
2024-11-30 22:37:36 +02:00
squidbus a835567845 libraries: Add initial HLE JPEG encoder skeleton (#1607)
* libraries: Add initial HLE JPEG encoder skeleton

* jpegenc: Finish adding parameter validation.

* updated enums , added logging

* jpegenc: Clean up parameter validations.

* jpegenc: Fix missing log.

* externals: Update ffmpeg-core

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2024-11-30 21:43:12 +02:00
Vinicius Rangel 6b8da69b15 Allow shader patching (#1633) 2024-11-30 20:15:55 +01:00
squidbus 1d14a9a3d0 semaphore: Use condvars with separate signaled flag to prevent races (#1615)
* Revert "semaphore: Use binary_semaphore instead of condvar"

This reverts commit 85dc57b868.

* semaphore: Use separate signaled flag to prevent races

* mutex: Few misc fixes

* condvar: Few misc fixes

* signals: Add thread name to unhandled signal message.
2024-11-30 19:19:07 +02:00
Vladislav Mikhalin 6e7f0e7851 Fixed incorrectly skipped RTs 2024-11-30 17:05:08 +03:00
squidbus 899a41823a config: Fix loading install directories. (#1626) 2024-11-30 11:08:34 +01:00
squidbus bb1f28b3bf libraries: Add libSceRazorCpu HLE skeleton. (#1624)
* Remove save migration code (#1621)

* Kernel Fixes (#1605)

* scePthreadSetprio Changes

FindThread uses posix error codes, so the function export should apply the ORBIS wrapper to convert these. Since it uses posix codes, I've also renamed the function to align with other posix functions. Lastly, this fixes a compile warning about ret sometimes not getting initialized.

* Implement posix_munmap

Used by Hatsune Miku Project Diva X during intros. May help with stability on Linux, probably won't change anything on Windows.

* Exports

Some missing function exports I've seen in my tests.
sceKernelAvailableFlexibleMemorySize export is used in Final Fantasy XV Episode Duscae
posix_pthread_setprio and posix_pthread_getschedparam are used by Spider-Man Miles Morales
scePthreadKeyDelete is used in UE4 games.

I've also added in a typo fix related to my previous PR.

* libScePosix export for posix_pthread_attr_setguardsize

Used in Hatsune Miku Project Diva X v1.02

* libraries: Add libSceRazorCpu HLE skeleton.

---------

Co-authored-by: ¥IGA <164882787+Xphalnos@users.noreply.github.com>
Co-authored-by: Stephen Miller <56742918+StevenMiller123@users.noreply.github.com>
2024-11-30 11:30:22 +02:00
georgemoralis 30430d5f44 Revert "Remove save migration code (#1621)"
This reverts commit b1a024efbd.
2024-11-30 11:28:46 +02:00
Stephen Miller f9d967cb1f Kernel Fixes (#1605)
* scePthreadSetprio Changes

FindThread uses posix error codes, so the function export should apply the ORBIS wrapper to convert these. Since it uses posix codes, I've also renamed the function to align with other posix functions. Lastly, this fixes a compile warning about ret sometimes not getting initialized.

* Implement posix_munmap

Used by Hatsune Miku Project Diva X during intros. May help with stability on Linux, probably won't change anything on Windows.

* Exports

Some missing function exports I've seen in my tests.
sceKernelAvailableFlexibleMemorySize export is used in Final Fantasy XV Episode Duscae
posix_pthread_setprio and posix_pthread_getschedparam are used by Spider-Man Miles Morales
scePthreadKeyDelete is used in UE4 games.

I've also added in a typo fix related to my previous PR.

* libScePosix export for posix_pthread_attr_setguardsize

Used in Hatsune Miku Project Diva X v1.02
2024-11-30 11:23:48 +02:00
¥IGA 7c470134d6 Remove save migration code (#1621) 2024-11-30 11:23:42 +02:00
squidbus 748f5da044 sysmodule: Remove need for libSceRazorCpu (#1622) 2024-11-30 10:08:46 +02:00
squidbus bd004e26ae Revert "core: fix patch paths applying when no folder exists" (#1620)
This reverts commit 9f6261524b.
2024-11-29 22:57:56 +02:00
Vladislav Mikhalin db0017b90e Fixed DS_SWIZZLE_32 (#1619) 2024-11-29 22:13:36 +02:00
Daniel R. 48ab77e937 core: fix patch paths applying when no folder exists 2024-11-29 20:02:45 +01:00
psucien 8f004bea5d hot-fix: apply vgt index offset to draw commands 2024-11-29 14:17:53 +01:00
squidbus abd4261962 semaphore: Fix returned iterator from AddWaiter (#1614) 2024-11-29 01:42:39 +02:00
Marcin Mikołajczyk fb0da5dca6 implement sceKernelPreadv (#1611) 2024-11-28 22:26:44 +02:00
Marcin Mikołajczyk c733dd3bdf Fix GetDents truncating the last character of filenames (#1610) 2024-11-28 22:25:37 +02:00
squidbus bbf257f861 libc_internal: Implement more functions. (#1606) 2024-11-27 11:50:57 +02:00
Vladislav Mikhalin 0e38a52c72 Fixed false-positive image reuploads (#1557)
* Fixed false-positive image reuploads

* Fixed userfaultfd path, removed dead code, simplified calculations

* oopsie

* track potentially dirty images and hash them

* untrack only first page of the image in case of head access

* rebase, initialize hash, fix bounds check

* include image tail in the calculations
2024-11-26 22:45:15 +02:00
¥IGA 6ed6905807 Adding Utils Icon (#1600) 2024-11-26 08:48:14 +02:00
psucien 88a2f4ba5d Revert "hot-fix: downgrade Nx1 2D render targets to 1D" due to regression
This reverts commit cea6d87472.
2024-11-25 22:14:53 +01:00
psucien 363fbe7a83 hot-fix: downgrade Nx1 2D render targets to 1D 2024-11-25 20:52:09 +01:00
DanielSvoboda f26df42b18 Fix Shortcut (#1586) 2024-11-25 14:26:56 +02:00
¥IGA 8deaf6b4c1 Fix Game List Mode (#1591) 2024-11-25 14:26:40 +02:00
F1219R 33d3113861 Update sq translation (#1595) 2024-11-25 14:26:12 +02:00
psucien 9333fb1dae hot-fix: skip indirect draw for quad lists
* needs to be fixed properly with indirect args re-packing
2024-11-24 18:33:38 +01:00
squidbus f2f18f5cf7 devtools: Fix a few compiler warnings. (#1575) 2024-11-24 18:47:19 +02:00
kalaposfos13 2cd5d5e63d Fix --help text in cli (#1588) 2024-11-24 18:45:17 +02:00
psucien efaa18ba22 Image binding and texture cache interface refactor (1/2) (#1481)
* video_core: texture_cache: interface refactor and better overlap handling

* resources binding moved into vk_rasterizer

* remove `virtual` flag leftover
2024-11-24 17:07:51 +01:00
psucien 3c35a76624 video_core: clean-up of indirect draws logic (#1589) 2024-11-24 15:43:28 +01:00
baggins183 9725373721 recompiler: fix how srt pass handles step rate sharps in special case (#1587) 2024-11-24 11:49:59 +01:00
psucien fa15e30172 video_core: restored presenter aspect calculations (#1583)
* video_core: restored presenter aspect calculations

* code simplification
2024-11-23 11:46:31 +01:00
psucien 35d988a5be hot-fix: proper offset calculation for single offset lds instructions 2024-11-23 10:14:19 +01:00
Daniel R. d61ddec5f7 Fix splashes using the wrong image
Supposedly, only pic1.png is used for the splash
2024-11-22 21:20:47 +01:00
squidbus 7e521c1b3a savedatadialog_ui: Use fmt::localtime instead of formatting std::chrono::local_time (#1574) 2024-11-22 18:29:41 +02:00
georgemoralis a3b4e733ba @Roamic's hot region fix (#1570) 2024-11-22 14:53:16 +02:00
georgemoralis b56fbbaa9c Port libpngdec to libpng (#1555)
* intial try to include libpng

* fixing libpng cmake

* cleanup structs and error codes

* building libpng , destroying pkg ;/

* fixed pkg with zlib_comp mode

* attemp to fix ci

* rewrote png encoder with libpng

* small corrections

* clang fix

* clang-fix?

* take alpha value from decode parameters

* more cleanup

* fix stride calculation

* libpng: avoid unnecessary allocation in decoding

* libpng: interlaced support

* libpng: lowered log level

* revert wrong merge

---------

Co-authored-by: Vinicius Rangel <me@viniciusrangel.dev>
2024-11-22 12:42:53 +02:00
kalaposfos13 d6ead2a65c Skip GUI if launching a game directly (#1507)
* Skip GUI if launching a game directly

* Rerun jobs 2

* Added --show-gui, --help, open game by ID and more

* Clang-format

* Added non-GUI related upgrades to SDL version

* clang-format

* Added --fullscreen <true|false> argument

* Update --help text
2024-11-22 07:55:55 +02:00
psucien c8fda45ea9 hot-fix: clang-format 2024-11-21 22:23:09 +01:00
TheTurtle 9efa57bbc7 kernel: Rewrite pthread emulation (#1440)
* libkernel: Cleanup some function places

* kernel: Refactor thread functions

* kernel: It builds

* kernel: Fix a bunch of bugs, kernel thread heap

* kernel: File cleanup pt1

* File cleanup pt2

* File cleanup pt3

* File cleanup pt4

* kernel: Add missing funcs

* kernel: Add basic exceptions for linux

* gnmdriver: Add workload functions

* kernel: Fix new pthreads code on macOS. (#1441)

* kernel: Downgrade edeadlk to log

* gnmdriver: Add sceGnmSubmitCommandBuffersForWorkload

* exception: Add context register population for macOS. (#1444)

* kernel: Pthread rewrite touchups for Windows

* kernel: Multiplatform thread implementation

* mutex: Remove spamming log

* pthread_spec: Make assert into a log

* pthread_spec: Zero initialize array

* Attempt to fix non-Windows builds

* hotfix: change incorrect NID for scePthreadAttrSetaffinity

* scePthreadAttrSetaffinity implementation

* Attempt to fix Linux

* windows: Address a bunch of address space problems

* address_space: Fix unmap of region surrounded by placeholders

* libs: Reduce logging

* pthread: Implement condvar with waitable atomics and sleepqueue

* sleepq: Separate and make faster

* time: Remove delay execution

* Causes high cpu usage in Tohou Luna Nights

* kernel: Cleanup files again

* pthread: Add missing include

* semaphore: Use binary_semaphore instead of condvar

* Seems more reliable

* libraries/sysmodule: log module on `sceSysmoduleIsLoaded`

* libraries/kernel: implement `scePthreadSetPrio`

---------

Co-authored-by: squidbus <175574877+squidbus@users.noreply.github.com>
Co-authored-by: Daniel R. <47796739+polybiusproxy@users.noreply.github.com>
2024-11-21 22:59:38 +02:00
Daniel R. 1671826240 shader_recompiler/frontend: implement V_MIN3_U32 2024-11-21 19:52:48 +01:00
Daniel R. 46043b83a9 video_core/amdgpu: heuristic for shader binary info
Games can strip the first shader instruction (meant for debugging) which we rely on for obtaining shader information (e.g. LittleBigPlanet 3). For this reason, we start a search through the code start until we arrive at the shader binary info.
2024-11-21 19:24:13 +01:00
Florian Piesche 872e41d670 Don't use github as a CDN for Discord RPC icon (#1496)
[jsdelivr](https://www.jsdelivr.com/?docs=gh) is a free CDN for opensource projects that offers mirroring and CDN services for files on GitHub with just a minor URL change, backed by a number of major organizations in the CDN industry.
2024-11-21 12:09:10 +02:00
psucien 0de2818d24 Proper MSAA surfaces support (#1560) 2024-11-21 12:08:52 +02:00
¥IGA c2cd0464b9 Bump to Clang 18 (#1549) 2024-11-21 12:08:22 +02:00
psucien 2e092e6a72 Respect game brightness settings (#1559)
* `RendererVulkan` -> `Presenter`

* support for Video Out gamma setting

* sRGB hack removed

* added post process pass to presenter

* splash functionality restored
2024-11-21 12:06:53 +02:00
psucien aabd6931b9 hot-fix: correct M-tiled surface size calculation when mip is less than a tile 2024-11-21 00:04:46 +01:00
squidbus 8e742fad84 image_view: Use array view for color/depth buffers with multiple layers. (#1556) 2024-11-20 20:24:30 +02:00
Vinicius Rangel 73ed9a17f8 savedata: fix dir name search with wildcard (#1552)
* savedata: fix dir name search with wildcard

* psf: replace filesystem clock by system clock (utc)

* savedatadialog_ui: macOS zoned_time formatting

Signed-off-by: Vinicius Rangel <me@viniciusrangel.dev>

---------

Signed-off-by: Vinicius Rangel <me@viniciusrangel.dev>
Co-authored-by: squidbus <175574877+squidbus@users.noreply.github.com>
2024-11-20 18:31:44 +02:00
Ruah Devlin 335e139099 Implement V_MED3_U32 vector ALU Opcode (#1553) 2024-11-20 17:23:59 +01:00
korenkonder f174aa4a21 Don't read uninitialized memory in sceSystemServiceReceiveEvent (#1554) 2024-11-20 17:22:30 +01:00
Alexander Y. a1fc2c2425 Fix build when -DENABLE_DISCORD_RPC=OFF (#1551)
* added ifdef for discordrpc

* replaced discordrpc include correctly
2024-11-20 08:41:35 +02:00
Daniel R. ce4d550666 shader_recompiler/frontend: Implement bitcmp instructions (#1550) 2024-11-19 21:38:32 +01:00
Vladislav Mikhalin 82dcb3e80c Fix border color (#1548) 2024-11-19 18:55:05 +02:00
psucien c3f38ac212 libraries: gnmdriver: few more functions implemented (#1544) 2024-11-18 11:23:21 +02:00
Vladislav Mikhalin 3ab8835d32 Fix depth bias (#1538) 2024-11-16 19:17:43 +02:00
Stephen Miller 7c96c6e689 Minor Kernel Fixes (#1529)
* Skip destruction of adaptive mutex initializers

Based around similar behaviors implemented in the more-kernel branch. Hatsune Miku Project Diva X needs this.

* Fix posix_lseek result overflow

Seen when testing Spider-Man Miles Morales on more-kernel.

* Add posix_fsync

Used by Spider-Man Miles Morales. I've added the normal posix error handling to this function, though I'm aware sceKernelFsync doesn't return any errors currently. This is for future proofing and accuracy, as the actual libkernel does the usual error handling too.

* Properly handle VirtualQuery calls on PoolReserved memory.

* Export posix_getpagesize under libkernel

Bloons TD 5 needs this.

* Clang
2024-11-14 18:00:57 +02:00
Osyotr 02e8330140 Save config in UTF-8 (#1524) 2024-11-14 12:01:33 +02:00
Vladislav Mikhalin b05701b07b ajm: handle single-frame decode jobs (+mp3 imrovements) (#1520)
* ajm: handle single-frame decode jobs (+mp3 imrovements)

* disable breaking the loop in multi-frame if storage is insufficient

* simplified gapless decoding
2024-11-14 12:01:20 +02:00
Martin 32ac0d9dd2 Update Norwegian Bokmål translations (#1525)
* specify nb_NO

* Update Norwegian Bokmål translation

* change patch wording nb_NO
2024-11-14 12:00:59 +02:00
squidbus bbef12e137 videodec: Lower sceVideodecDecode log to trace. (#1527) 2024-11-13 18:04:13 +01:00
Florian Piesche a64856ea70 Add scalable vector redraw of shadps4 icon (#1501)
* Add scalable vector redraw of shadps4 icon

* Update icon name in desktop file

* Fix svg
2024-11-12 09:32:56 +02:00
kalaposfos13 366daf2b06 Update Hungarian translation (#1518) 2024-11-12 09:31:56 +02:00
squidbus 64794155be imgui: Dispatch SDL text input requests to main thread on macOS. (#1519) 2024-11-12 09:27:30 +02:00
Lander Gallastegi 58e10f7537 Assert fix (#1521) 2024-11-12 09:26:48 +02:00
georgemoralis b3891c0332 Videocodec implementation (#1484)
* dummy videocodec

* filled videodec parameters

* vdec1 implementation

* clang format fix

* fixed codecType

* added crop offset info

* align output

* align all h/w

* some touchups

* small touch (last one)
2024-11-10 11:33:08 +02:00
DanielSvoboda c522045b9e Open Folder - improvement (Save/Log) (#1513)
* Open Folder - improvement

* TR
2024-11-10 10:14:48 +02:00
Vladislav Mikhalin 2de81faed4 ajm mp3: fix resampling (#1500) 2024-11-08 07:45:03 +02:00
squidbus 97d8c8a620 vk_pipeline_cache: Skip pipelines with geometry shaders when unsupported. (#1486) 2024-11-07 14:57:31 +02:00
Quang Ngô fa1d736406 Allow disable the auto updater (#1490) 2024-11-07 14:56:02 +02:00
Quang Ngô 585c8a7943 Fix patches not save changes properly (#1493)
Don't use ```QCheckBox::text()``` because it may return strings that contain "&" cause patch name comparison to fail.
2024-11-06 22:44:22 +02:00
Vladislav Mikhalin 382ff5d449 AJM: Added some missing features (#1489)
* AJM: Added support for different PCM formats

* updated libatrac9 ref

* remove log

* Add support for non-interleaved flag

* Added support for output sideband format query
2024-11-06 22:39:43 +02:00
georgemoralis f964b976de hot-fix : removed libSceRudp.srpx from lle modules since it appears it create more issues than solves 2024-11-06 07:20:58 +02:00
psucien 2962456e81 hot-fix: pr merge conflict resolved 2024-11-05 22:59:45 +01:00
Lander Gallastegi 69aee2d496 shader_recompiler: patch fmask access instructions (#1439)
* Fix multisample texture fetch

* Patch some fmask reads

* clang-format

* Assert insteed of ignore, coordinate fixes

* Patch ImageQueryDimensions
2024-11-05 22:39:57 +01:00
SAN4EZDREAMS 4c650bb9c2 Added uk_UA language support (#1483)
* Add Ukrainian localization

* Fixed langIndexes

* Fixed langIndexes_2

* Added uk_UA language support

* Added uk_UA language support
2024-11-05 10:46:12 +02:00
georgemoralis b322a308a6 Ajm (#1456)
* ajm: Initial ajm implementation

* AJM code improvements (#1453)

* Fix sideband buffer order (#1454)

* ajm: Attempt to add gapless support

* ajm_at9: Return superframes decoded in a single job

* WIP (#1460)

* Fix gapless decode and combine split buffers

* Fixed linux build

* fix number of samples reported with gapless decoding

* fixed number of remaining samples calculation

should fix the small crackling sounds that play every now and again

* refactor half ajm

* refactored most of ajm

* refactored ajm

* clang-format, in-repo libatrac9, removed debug stuff

---------

Co-authored-by: auser1337 <aaravsandhu10@outlook.com>
Co-authored-by: Vladislav Mikhalin <mikhalinvlad@gmail.com>
Co-authored-by: IndecisiveTurtle <geoster3d@gmail.com>
2024-11-05 09:16:57 +02:00
squidbus 6251f78232 qt: Error if installing DLC without game. (#1476) 2024-11-03 01:06:55 +02:00