Commit graph

737 commits

Author SHA1 Message Date
baggins183 3c0c921ef5
Tessellation (#1528)
* shader_recompiler: Tessellation WIP

* fix compiler errors after merge

DONT MERGE set log file to /dev/null

DONT MERGE linux pthread bb fix

save work

DONT MERGE dump ir

save more work

fix mistake with ES shader

skip list

add input patch control points dynamic state

random stuff

* WIP Tessellation partial implementation. Squash commits

* test: make local/tcs use attr arrays

* attr arrays in TCS/TES

* dont define empty attr arrays

* switch to special opcodes for tess tcs/tes reads and tcs writes

* impl tcs/tes read attr insts

* rebase fix

* save some work

* save work probably broken and slow

* put Vertex LogicalStage after TCS and TES to fix bindings

* more refactors

* refactor pattern matching and optimize modulos (disabled)

* enable modulo opt

* copyright

* rebase fixes

* remove some prints

* remove some stuff

* Add TCS/TES support for shader patching and use LogicalStage

* refactor and handle wider DS instructions

* get rid of GetAttributes for special tess constants reads. Immediately replace some upon seeing readconstbuffer. Gets rid of some extra passes over IR

* stop relying on GNMX HsConstants struct. Change runtime_info.hs_info and some regs

* delete some more stuff

* update comments for current implementation

* some cleanup

* uint error

* more cleanup

* remove patch control points dynamic state (because runtime_info already depends on it)

* fix potential problem with determining passthrough

---------

Co-authored-by: IndecisiveTurtle <47210458+raphaelthegreat@users.noreply.github.com>
2024-12-14 12:56:17 +02:00
rainmakerv2 8bb1e8fcdb
Resize trophy pop up windows based on window size (#1769) 2024-12-14 10:17:00 +02:00
TheTurtle cfbd869126
texture_cache: Improve support for stencil reads (#1758)
* texture_cache: Improve support for stencil reads

* libraries: Supress some spammy logs

* core: Support loading font libraries

* texture_cache: Remove assert
2024-12-13 18:28:19 +02:00
TheTurtle 8acefd25e7
hot-fix the hot-fix 2024-12-13 18:26:16 +02:00
TheTurtle bab00dbca8
kernel: Fix module finding
Patch by Elbread
2024-12-13 18:23:01 +02:00
georgemoralis 2a19d915e8
fix for detecting more that 2 players and play both with player 1 keys (#1750) 2024-12-12 22:46:20 +02:00
squidbus 5789d1a5fb
playgo: Lower scePlayGoGetLocus log to debug. (#1748) 2024-12-12 09:47:07 +02:00
TheTurtle 7f4265834a
hot-fix: Fix race in rwlock
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
Resetting the owner should be before the lock is unlocked, otherwise a waiter might lock and set a new owner before its reset.
2024-12-12 03:33:49 +02:00
TheTurtle 0a9c437ec8
hot-fix: Enforce minimum stack size of 64KB
Fixes some crashes in BB from unity pt 1
2024-12-11 21:17:55 +02:00
Daniel R. b82993c568
core/kernel: implement condvar signalto 2024-12-11 20:12:35 +01:00
squidbus 14f7dc3527
cache: Invalidate pages for file reads. (#1726)
* cache: Invalidate pages for file reads.

* texture_cache: Simplify invalidate intersection check.

* vk_rasterizer: Make aware of mapped memory ranges.

* buffer_cache: Remove redundant page calculations.

Called functions will convert to page numbers/addresses themselves.

* file_system: Simplify memory invalidation and add a few missed cases.
2024-12-11 21:11:24 +02:00
¥IGA 8db1beaec6
Displays FPS before frame latency (#1736) 2024-12-11 19:44:18 +01:00
Martin b8a443c728
Fix compiling due to typedefs varying across platforms (#1729)
* Fix compiling on modern C++ compilers

cd9fc5d0e9 broke it

* Fix order

* Test

* Test putting flags in old order

* Remove designated initializer
2024-12-10 22:15:43 +02:00
squidbus 41fd1c84cf
semaphore: Use handles to properly handle semaphore double-delete. (#1728) 2024-12-10 14:43:32 +02:00
squidbus bf41ab6c40
memory: Handle 0 alignment in MemoryManager::Allocate (#1692) 2024-12-10 13:13:34 +02:00
squidbus cd9fc5d0e9
thread: Apply alternate signal stack to created threads. (#1724) 2024-12-10 13:08:53 +02:00
Vinicius Rangel f1b23c616e
Devtools - Shader editing (#1705)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
* devtools: shader editing and compiling

* devtools: patch shader at runtime

* devtools: shader editing load patch even with config disabled
2024-12-09 21:11:11 +01:00
Stephen Miller f938829f12
Implement sceGnmDingDongForWorkload (#1707)
Seen in Final Fantasy XV.
2024-12-08 22:04:33 +02:00
Daniel R. fea2593ab4
The way to Unity, pt.3 (#1681)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
2024-12-08 18:30:33 +02:00
auser1337 1940ac0fec
ajm: support for multiple contexts (#1690)
* ajm: support for multiple contexts

* fix sceAjmInitialize
2024-12-08 10:18:12 +02:00
Ada Ahmed dad5953e8c
fix: fix #1457 again by moving av_err2str to a common header (#1688)
Some checks are pending
Build and Release / clang-format (push) Waiting to run
Build and Release / reuse (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
2024-12-08 00:52:03 +02:00
psucien 119e03cb58 hot-fix: fix for incorrect asc qid 2024-12-07 22:28:31 +01:00
¥IGA 2266622dcf
Support for Vulkan 1.4 (#1665)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
2024-12-07 19:41:41 +02:00
squidbus e1ecfb8dd1
semaphore: Add GCD semaphore implementation. (#1677) 2024-12-06 23:46:44 +02:00
Daniel R. 7ffa581d4b
The way to Unity, pt.2 (#1671) 2024-12-06 22:04:36 +01:00
IndecisiveTurtle 77da8bac00 core: Return proper address of eh frame/add more opcodes 2024-12-06 00:47:11 +02:00
Alexandre Bouvier 874508f8c2
cmake: unbundle stb (#1601) 2024-12-05 23:10:27 +02:00
Daniel R. 15ae7a094d
hotfix: fix inverted operator on GetDents
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
2024-12-05 18:45:55 +01:00
Daniel R. 98f0cb65d7
The way to Unity, pt.1 (#1659) 2024-12-05 17:21:35 +01:00
Vinicius Rangel 2380f2f9c9
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 c019b54fec
thread: Configure stack and guard on POSIX hosts. (#1664)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
2024-12-04 20:21:03 +02:00
TheTurtle 6bf93071cf
hot-fix: Correct getpagesize
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
Tested on my PS4 pro, returns 16KB instead of 4KB
2024-12-03 14:15:08 +02:00
georgemoralis c66db95378
Misc Ime fixes continue (#1655)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
* 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
squidbus fda4f06518
devtools: More warning fixes (#1652) 2024-12-02 20:46:51 +01:00
Vinicius Rangel 0835dc71b3
More devtools stuff (#1637)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
* 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 4a5850628e hot-fix: debug build fixed
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
2024-12-01 15:46:08 +01:00
squidbus b00a321b5e
playgo: Fix loading PlayGo file. (#1639) 2024-12-01 14:12:04 +02:00
squidbus 394a14626b
libraries: Add stubs for libScePlayGoDialog (#1635) 2024-12-01 13:44:15 +02:00
TheTurtle 5b6e0ab238
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 7153838c4e
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
squidbus 07f4a0305b
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
squidbus 99ac10a417
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
Stephen Miller 7e525a59e4 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
squidbus 7b68004a40
sysmodule: Remove need for libSceRazorCpu (#1622) 2024-11-30 10:08:46 +02:00
squidbus 6c215e672d
Revert "core: fix patch paths applying when no folder exists" (#1620)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
This reverts commit 9f6261524b.
2024-11-29 22:57:56 +02:00
Daniel R. 9f6261524b
core: fix patch paths applying when no folder exists 2024-11-29 20:02:45 +01:00
squidbus 57a3c0132d
semaphore: Fix returned iterator from AddWaiter (#1614)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
2024-11-29 01:42:39 +02:00
Marcin Mikołajczyk bd3371bdfb
implement sceKernelPreadv (#1611)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
2024-11-28 22:26:44 +02:00
Marcin Mikołajczyk 286a288bfd
Fix GetDents truncating the last character of filenames (#1610) 2024-11-28 22:25:37 +02:00
squidbus 471ebdb4f0
libc_internal: Implement more functions. (#1606)
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / windows-qt (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / macos-qt (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-qt (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
2024-11-27 11:50:57 +02:00