Commit graph

221 commits

Author SHA1 Message Date
psucien 28feb77982
Surface management rework (3/3) (#370)
* texture_cache: images overlap support

* renderer_vk: log messages on surfaces which require degamma

* missing barriers

* forced sync2 + better barriers

* Handling of depth target aliasing; added formats compatibility check

* Don't bind empty texel buffers

* Promote r32f textures to depth target if shader expects so

* Promote textures to depth if they use depth tiling

* fix for image leaking; detiler stream buffer removed
2024-09-04 23:47:57 +03:00
georgemoralis a1377029cc
Merge pull request #738 from DanielSvoboda/Fix-download-Cheats/Patches-on-Linux
Some checks are pending
Reuse / reuse (push) Waiting to run
Clang Format / clang-format (push) Waiting to run
Linux-Qt / build (push) Waiting to run
Linux / build (push) Waiting to run
macOS-Qt / build (push) Waiting to run
macOS / build (push) Waiting to run
Windows-Qt / build (push) Waiting to run
Windows / build (push) Waiting to run
Fix download Cheats/Patches on Linux
2024-09-03 16:16:37 +03:00
TheTurtle f087f43736
shader_recompiler: Implement render target swizzles when no format is available (#739)
* shader_recompiler: Use null image when shader is compiled with unbound sharp

* video_core: Refactor and render target swizzles

* liverpool_to_vk: Add missing swap format from RDR

* video_core: Refactor shader recompiler interface

* Makes it much easier to pass runtime information to the recompiler and have it treated as part of the shader key. Also pulls out most runtime state from Info struct

* shader_recompiler: Avoid some asserts
2024-09-03 14:04:30 +03:00
squidbus af107d4ef9 vulkan: Better support for directly linking a Vulkan support library. 2024-09-03 01:40:51 -07:00
DanielSvoboda f2c7fac20b
Update CMakeLists.txt 2024-09-02 20:18:36 -03:00
DanielSvoboda 9ccd60459d
Update CMakeLists.txt 2024-09-02 15:30:50 -03:00
Random 0276ed92a6
Force PIE usage on linux (#625)
* force PIE usage on linux

* get rid of explicit -pie linker flag

* change UNIX with UNIX AND NOT APPLE in CMakeLists.txt

* cmake: add proper check for PIE support at link time

---------

Co-authored-by: Mikhail Paulyshka <me@mixaill.net>
2024-09-01 21:48:34 +03:00
squidbus 9e5047947b macos: Remove need for TLS patch by storing TCB pointer in FS. 2024-09-01 02:22:42 -07:00
squidbus 61db246c5e core: Fix CPU patch stack issues 2024-08-30 20:47:07 -07:00
georgemoralis cdd193d5b1
Merge pull request #638 from squidbus/f16c
Add patches for F16C instructions under Rosetta 2.
2024-08-30 11:16:21 +03:00
squidbus a17150960f Add patches for F16C instructions under Rosetta 2. 2024-08-29 17:31:25 -07:00
TheTurtle 66e96dd944
video_core: Account of runtime state changes when compiling shaders (#575)
* video_core: Compile shader permutations

* spirv: Only specific storage image format for atomics

* ir: Avoid cube coord patching for storage image

* spirv: Fix default attributes

* data_share: Add more instructions

* video_core: Query storage flag with runtime state

* kernel: Use std::list for semaphore

* video_core: Use texture buffers for untyped format load/store

* buffer_cache: Limit view usage

* vk_pipeline_cache: Fix invalid iterator

* image_view: Reduce log spam when alpha=1 in storage swizzle

* video_core: More features and proper spirv feature detection

* video_core: Attempt no2 for specialization

* spirv: Remove conflict

* vk_shader_cache: Small cleanup
2024-08-29 19:29:54 +03:00
DanielSvoboda 614a23b369
Cheats/Patches (#493)
Some checks are pending
Reuse / reuse (push) Waiting to run
Clang Format / clang-format (push) Waiting to run
Linux-Qt / build (push) Waiting to run
Linux / build (push) Waiting to run
macOS-Qt / build (push) Waiting to run
macOS / build (push) Waiting to run
Windows-Qt / build (push) Waiting to run
Windows / build (push) Waiting to run
* Cheats/Patches

Adds the possibility of applying cheats/patches according to the specific game serial+version

The logic for adding modifications has not yet been implemented!

Interface based on issues/372 https://github.com/shadps4-emu/shadPS4/issues/372

[X]Front-end
[]Back-end

Create a synchronized fork of the cheats/patches repository

* Clang Format

* separate files

The code has been separated into separate files as suggested by georgemoralis.
Added the Patch tab, which has not been implemented yet.
Added the 'applyCheat' area to apply the modification, not implemented yet...
And added LOG_INFO.

* reuse

* initial implementation of cheat functionality

* Update cheats_patches.cpp

sets all added buttons to the size of the largest button.
and fixes some aesthetic issues.

* move eboot_address to module.h

fixes the non-qt builds and makes more sense to be there anyway

* Patchs menu and fixes

adds the possibility to download Patches, it does not modify the memory yet.
and some other fixes

* MemoryPatcher namespace, activate cheats on start

* format

* initial patch implementation

* format

* format again...

* convertValueToHex

* Fixes

Choosing which cheat file to use.
And some other fixes

* fix bytes16, bytes32, bytes64 type patches

If a patch is any of these types we convert it from little endian to big endian

* format

* format again :(

* Implement pattern scanning for mask type patches

* add check to stop patches applying to wrong game

previously if you added a patch to a game, but closed the window and opened a different game it would still try to apply the patch, this is now fixed

* format

* Fix 'Hint' 0x400000 |  and Author

* Management |save checkbox | shadps4 repository

MENU - Cheats/Patches Management (implementing Patches)
save patches checkbox
add shadps4 repository

* Load saved patches, miscellaneous fixes

* Fix an issue with mask patches not being saved

* format + remove debug log

* multiple patches | TR translation for cheats/patches

* clang

* ENABLE_QT_GUI

* OK

* move memory_patcher to qt_gui

* clang

* add cheats hu_HU

* fix log

* Remove the item from the patchesListView if no patches were added (the game has patches, but not for the current version)

---------

Co-authored-by: CrazyBloo <CrazyBloo@users.noreply.github.com>
2024-08-29 07:18:50 +03:00
squidbus da966bedfd
kernel: Reimplement POSIX semaphores using std::counting_semaphore. (#600) 2024-08-28 13:13:33 +03:00
Lizardy 59b651be07
[Libs] Error Codes (#612)
* ngs2: all errors w/ official names

* ajm errors

* gnm errors

* random errors

* clang

* random error

* linux

---------

Co-authored-by: microsoftv <6063922+microsoftv@users.noreply.github.com>
2024-08-27 15:53:38 +03:00
Plínio Larrubia ad8373095a
fix typo in LOG_INFO (#559)
Some checks are pending
Reuse / reuse (push) Waiting to run
Clang Format / clang-format (push) Waiting to run
Linux-Qt / build (push) Waiting to run
Linux / build (push) Waiting to run
macOS-Qt / build (push) Waiting to run
macOS / build (push) Waiting to run
Windows-Qt / build (push) Waiting to run
Windows / build (push) Waiting to run
fix: file name typo constant_propogation_pass.cpp

fix typo from 'symbol_vitrual_addr' variable

fix typo in emit_spirv_context_get_set.cpp

fix typo from constant_propagation_pass.cpp in CMakeLists

fix typo in these some config.cpp functions
- setSliderPosition
- setSliderPositionGrid
- getSliderPosition
- getSliderPositionGrid

fix typo inside src\core\aerolib\stubs.cpp

fix typo in a comment from src\core\file_format\pkg.cpp

fix typo inside src\core\file_sys\fs.cpp + fs.h
- NeedsCaseInsensiveSearch -> NeedsCaseInsensitiveSearch

fix 2 function typos: sceAppContentAddcontEnqueueDownloadByEntitlemetId and sceAppContentAddcontMountByEntitlemetId

fix typo on comment inside src\core\libraries\kernel\file_system.cpp

fix typo on src\core\libraries\videoout\driver.cpp

fix typo in src\core\memory.cpp

fix typo from comment in src\qt_gui\game_list_utils.h

fix typo in src\video_core\amdgpu\liverpool.h
- window_offset_disble to window_offset_disable

fix typo from comments in src\video_core\host_shaders\detile_m32x1.comp + detile_m32x2.comp
- subotimal -> suboptimal

fix typo from comment in src\video_core\renderer_vulkan\renderer_vulkan.cpp
- dimentions -> dimensions

fix typo from enum in src\common\debug.h and other files
- MarkersPallete -> MarkersPalette

fix last typo in src\video_core\amdgpu\pm4_opcodes.h
- PremableCntl -> PreambleCntl
2024-08-26 15:22:11 +03:00
psucien b687ae5e34
GnmDriver: Clear context support (#567)
* gnmdriver: added support for gpu context reset

* shader_recompiler: minor validation fixes

* shader_recompiler: added `V_CMPX_GT_I32`

* shader_recompiler: fix for crash on inline sampler access

* compilation warnings and dead code elimination

* amdgpu: fix for registers addressing

* libraries: videoout: reduce logging pressure

* shader_recompiler: fix for devergence scope detection
2024-08-25 23:01:05 +03:00
Dzmitry Dubrova 3f445eca40 gui: Implement gui translations 2024-08-25 12:17:54 +03:00
Alexandre Bouvier a71d0d8dbb cmake: fix version constraints 2024-08-23 19:40:11 +02:00
Xphalnos d4be3dbb31 Lot of small fixes 2024-08-22 18:01:30 +02:00
georgemoralis 12a65e3fb8 LLE libc removal 2024-08-22 11:24:31 +03:00
georgemoralis 958db559c6
Merge pull request #495 from jdpatdiscord/main
Allow builds on MSYS2 & improve Windows build steps documentation
2024-08-21 02:08:40 +03:00
Lizardy 32cb3649d3
rtc errors (#485)
* rtc errors

* add system libs to cmakelists

* this.[func]

* fix errors

* declaration

* log handle addr

* missed

---------

Co-authored-by: microsoftv <6063922+microsoftv@users.noreply.github.com>
2024-08-21 00:47:17 +03:00
jdp_ 34a1339a2b Allow builds on MSYS2 & improve Windows build steps documentation 2024-08-20 14:27:26 -04:00
Lizardy 138c9ce787
[WIP] libSceNgs2 (#439)
* init ngs2

* clang

* ngs2 HLE for missing LLE

* clang

* clang

* orbis ngs2 error codes

* resolve, error codes, ngs2_impl

* clang

* clang

* mac atomic

* clang

* mac

* clang

---------

Co-authored-by: microsoftv <6063922+microsoftv@users.noreply.github.com>
2024-08-19 10:03:05 +03:00
Xphalnos 70576035b0 Misc changes 2024-08-18 17:56:29 +02:00
¥IGA 3be2e4b2b8
About Window (#458) 2024-08-17 19:13:37 +03:00
Alexandre Bouvier 154771cca5
cmake: prefer system renderdoc library (#452) 2024-08-16 19:49:32 +03:00
Alexandre Bouvier ad60ae1d40
cmake: prefer system ffmpeg library (#451) 2024-08-16 18:56:47 +03:00
georgemoralis 3197ad336e
Merge pull request #400 from vladmikhalin/basic-av-player
Basic AvPlayer implementation
2024-08-16 11:17:56 +03:00
squidbus 62741434db Enable -fexperimental-library when using clang libc++ 2024-08-15 23:22:38 -07:00
Vladislav Mikhalin b5c69189e5 avplayer WIP 2024-08-15 22:00:51 +03:00
¥IGA 8c77d4dde6
Ability to change username (#432) 2024-08-15 12:33:10 +03:00
TheTurtle d332a5e611
spirv: Simplify shared memory handling (#427)
* spirv: Simplify shared memory handling

* spirv: Ignore clip plane

* spirv: Fix image offsets

* ir_pass: Implement shared memory lowering pass

* NVIDIA doesn't like using shared mem in fragment shader and softlocks driver

* spirv: Add log for ignoring pos1
2024-08-14 19:01:17 +03:00
Dzmitry Dubrova 96fb00d411 gui: Implement settings dialog 2024-08-09 17:28:16 +03:00
TheTurtle 381ba8c7a5
video_core: Implement guest buffer manager (#373)
* video_core: Introduce buffer cache

* video_core: Use multi level page table for caches

* renderer_vulkan: Remove unused stream buffer

* fix build

* oops forgot optimize off
2024-08-08 15:02:10 +03:00
squidbus 56b362bb24 Add macOS icon. 2024-07-31 19:37:55 -07:00
georgemoralis 62e501f31f print git info in windows title 2024-08-01 00:56:10 +03:00
Dzmitry Dubrova 0fe766db6c
core: Implement sceRandomGetRandomNumber (#350) 2024-07-31 14:01:22 +03:00
Xphalnos b3525d7f79
Don't download unnecessary DLLs (#341) 2024-07-30 22:41:31 +03:00
squidbus 43d60a8ac9 Add sem_timedwait polyfill for macOS. 2024-07-28 16:42:33 -07:00
TheTurtle 0d6edaa0a0
Move presentation to separate thread/improve sync (#303)
* video_out: Move presentation to separate thread

* liverpool: Better sync for CPU flips

* driver: Make flip blocking

* videoout: Proper flip rate and vblank management

* config: Add vblank divider option

* clang format

* videoout: added `sceVideoOutWaitVblank`

* clang format

* vk_scheduler: Silly merge conflict

* externals: Add renderdoc API

* clang format

* reuse

* rdoc: manual capture trigger

* clang fmt

---------

Co-authored-by: psucien <168137814+psucien@users.noreply.github.com>
2024-07-28 15:54:09 +02:00
georgemoralis b4916ef2ca some fixup to playgo , makes Worms go further 2024-07-26 07:53:45 +03:00
squidbus 426d82d07b Only use date library on macOS. 2024-07-21 22:36:12 +03:00
squidbus e2adbd75c3 Reduce system reserved space to 0x700000000 and map fixed on macOS. 2024-07-21 22:36:12 +03:00
squidbus b3d97dcd89 Make sure system managed memory is in correct location on macOS. 2024-07-21 22:36:12 +03:00
squidbus e06039d727 Set minimum macOS target to 11 and fix compile errors. 2024-07-21 22:36:12 +03:00
squidbus d9231b239c Migrate TLS patches to new patching system. 2024-07-21 22:36:12 +03:00
squidbus 66fa29059c Add initial macOS support. 2024-07-21 22:36:12 +03:00
psucien 64459f1a76
Surface management rework (1/3) (#307)
* amdgpu: proper CB and DB sizes calculation; minor refactoring

* texture_cache: separate file for image_info

* texture_cache: image guest address moved into image info

* texture_cache: surface size calculation

* shader_recompiler: fixed sin/cos

Thanks to red_pring and gandalfthewhite0173

* initial preparations for subresources upload

* review comments
2024-07-20 12:51:21 +03:00