Commit Graph

241 Commits

Author SHA1 Message Date
psucien 3e2d4d6b79
Gnmdriver: More functions (#410)
* libraries: gnmdriver: added `sceGnmGetGpuCoreClockFrequency`

* libraries: gnmdriver: `sceGnmSetVgtControl` added

* amdgpu: gpuclock64 in write eop packet
2024-08-12 13:29:57 +02:00
IndecisiveTurtle 3fd2abdd5b vk_graphics_pipeline: Fix regression 2024-08-08 17:01:03 +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
TheTurtle 159be2c7f4
video_core: Minor fixes (#366)
* data_share: Fix DS instruction

* vk_graphics_pipeline: Fix unnecessary invalidate

* spirv: Remove subgroup id

* vector_alu: Simplify mbcnt pattern

* shader_recompiler: More instructions

* clang format

* kernel: Fix cond memory leak and reduce spam

* liverpool: Print error on exception

* build fix
2024-08-05 13:45:28 +03:00
DanielSvoboda cdff4af38d
add-SurfaceFormat (#365)
[Debug] <Critical> liverpool_to_vk.cpp:SurfaceFormat:395: Unreachable code!

CUSA24620
Unknown data_format=7 and num_format=7

CUSA03082
Unknown data_format=2 and num_format=4

CUSA19345
Unknown data_format=34 and num_format=7

CUSA02411
Unknown data_format=1 and num_format=9

A duplicate was also removed.
2024-08-04 22:17:34 +02:00
DanielSvoboda 7308864537
SampleCountFlagBits::e16 - GetGpuClock64 (#360)
* SampleCountFlagBits::e16

* GpuClock64

* GpuClock64

* Update pm4_cmds.h

* Update pm4_cmds.h
2024-08-04 15:49:43 +02:00
raziel1000 413402600b missing eR8Srgb 2024-07-31 02:07:02 -06:00
raziel1000 ec1335911b added data_format=1 and num_format=9 2024-07-31 01:24:44 -06:00
raziel1000 51c89a9958 added data_format=10 and num_format=5 2024-07-31 00:32:50 -06:00
TheTurtle a7c9bfa5c5
shader_recompiler: Small instruction parsing refactor/bugfixes (#340)
* translator: Implemtn f32 to f16 convert

* shader_recompiler: Add bit instructions

* shader_recompiler: More data share instructions

* shader_recompiler: Remove exec contexts, fix S_MOV_B64

* shader_recompiler: Split instruction parsing into categories

* shader_recompiler: Better BFS search

* shader_recompiler: Constant propagation pass for cmp_class_f32

* shader_recompiler: Partial readfirstlane implementation

* shader_recompiler: Stub readlane/writelane only for non-compute

* hack: Fix swizzle on RDR

* Will properly fix this when merging this

* clang format

* address_space: Bump user area size to full

* shader_recompiler: V_INTERP_MOV_F32

* Should work the same as spirv will emit flat decoration on demand

* kernel: Add MAP_OP_MAP_FLEXIBLE

* image_view: Attempt to apply storage swizzle on format

* vk_scheduler: Barrier attachments on renderpass end

* clang format

* liverpool: cs state backup

* shader_recompiler: More instructions and formats

* vector_alu: Proper V_MBCNT_U32_B32

* shader_recompiler: Port some dark souls things

* file_system: Implement sceKernelRename

* more formats

* clang format

* resource_tracking_pass: Back to assert

* translate: Tracedata

* kernel: Remove tracy lock

* Solves random crashes in Dark Souls

* code: Review comments
2024-07-30 23:32:40 +02:00
Vasyl Baran 3e6af54ea3 Fixup for detiler artifacts on macOS 2024-07-28 22:21:18 +03:00
psucien 30198d5ffc
Surface management rework (2/3) (#329)
* texture_cache: interface refactoring

* a bit of fixes and improvements

* texture_cache: macro tile extents for bpp 128

* texture_cache: detiler: prefer host memory for large buffers upload
2024-07-28 17:20:42 +02: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
squidbus 225ca3ac5b Update format list for rebase and sort and remove duplicates. 2024-07-21 22:36:12 +03:00
squidbus fadf03909c Add a few missing used formats from detiling. 2024-07-21 22:36:12 +03:00
squidbus 4fd3af995e Change format list from vector to array/span. 2024-07-21 22:36:12 +03:00
squidbus 68e1a6a596 Tidy up Vulkan extension list. 2024-07-21 22:36:12 +03:00
squidbus 175ffe8ce3 Add fallback system for unsupported pixel formats. 2024-07-21 22:36:12 +03:00
squidbus 35d629a730 Downgrade Vulkan requirement to 1.2 with extensions. 2024-07-21 22:36:12 +03:00
squidbus 66fa29059c Add initial macOS support. 2024-07-21 22:36:12 +03:00
TheTurtle 36d528743a
vk_scheduler: Fix pending op check 2024-07-21 17:41:46 +03:00
TheTurtle 403a5a57b1
vk_scheduler: Add api for defering operations (#311) 2024-07-21 15:42:32 +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
georgemoralis 250bfbb494
Update liverpool_to_vk.cpp 2024-07-18 18:19:46 +03:00
georgemoralis 25e95c959a
Merge branch 'main' into miscFixes6 2024-07-18 18:18:10 +03:00
georgemoralis 439c0be9a6 clang format fix 2024-07-17 17:57:54 +03:00
IndecisiveTurtle 1208661d64 Remove bc6 2024-07-17 17:06:09 +03:00
IndecisiveTurtle cd009cfec6 shader_recompiler: Normal gathers 2024-07-17 16:49:45 +03:00
IndecisiveTurtle 53fb73e95f rasterizer: Bump staging to 1GB
* Less chances of crashing
2024-07-17 16:22:04 +03:00
IndecisiveTurtle fcbaec51df liverpool_to_vk: Add more surface formats 2024-07-17 16:19:08 +03:00
Vladislav Mikhalin f9e96793cc
Implemented load_buffer_format_* conversions (#295)
* Implemented load_buffer_format_* conversions

* clang-format insists on ugly things
2024-07-16 15:03:07 +03:00
georgemoralis 0de914995f
Merge pull request #293 from shadps4-emu/misc-fixes3
Various linux fixes
2024-07-15 15:25:20 +03:00
georgemoralis c49afb4c17
Merge pull request #287 from polybiusproxy/dev
gnmdriver: Implement shader functions
2024-07-15 07:47:33 +03:00
IndecisiveTurtle 73d4aafc09 liverpool: Num submits should be atomic 2024-07-15 01:28:36 +03:00
psucien ed37fb32a7 review comments applied 2024-07-14 23:25:41 +02:00
georgemoralis 4de9d9cf0d dataformat used by DMC4 2024-07-14 23:23:10 +03:00
psucien dc50cc55fb
missing line fix 2024-07-14 17:11:54 +02:00
psucien b8916787b2 renderer: debug markers for ability to match cmdlists with rdoc captures 2024-07-14 11:37:52 +02:00
psucien 8144f835a9 amdgpu: additional heuristic for CB extents detection
Found in CUSA00144
2024-07-14 10:59:22 +02:00
psucien 1b94f07a6a recompiler: proper VS inputs initialization 2024-07-13 01:00:24 +02:00
psucien a75851f7e2 hot fix: reduce geometry staging 3Gb -> 512Mb 2024-07-11 20:29:53 +02:00
Vladislav Mikhalin 989f88837d
Filesystem errors and Base Array Layers (#280)
* Filesystem errors and Base Array Layers

* Fixed build for POSIX

* forgot 1 file
2024-07-11 14:37:21 +03:00
psucien ab6a1fb5f0
Merge pull request #247 from viniciuslrangel/device-selector
Improve physical device selection in Vulkan renderer
2024-07-08 22:04:51 +02:00
offtkp 0619af24a7 Eliminate compiler warning 2024-07-08 01:17:42 +03:00
Vinicius Rangel 6cc8381d62
Improve physical device selection in Vulkan renderer
Fix when two discrete gpu are present & memory heap size is now considered while sorting physical devices
2024-07-07 17:02:35 -03:00
psucien 6dbb842bec renderer: a bit more formats to support 2024-07-07 14:34:36 +02:00
psucien 1d608427ed renderer: don't let unbound color attachment affect pass's rendering area 2024-07-06 20:13:12 +02:00
psucien cfbe8b9e6d renderer: added support for instance step rates 2024-07-06 18:03:43 +02:00
psucien 986ed0662c gnmdriver, amdgpu: added gpu idle IRQ; submission lock logic improved 2024-07-06 18:03:34 +02:00
TheTurtle 38080b60af
shader_recompiler: Check usage before enabling capabilities (#245)
* vk_instance: Better feature check

* shader_recompiler: Make most features optional

* vk_instance: Bump extension vector size

* resource_tracking_pass: Perform BFS for sharp tracking

* The Witness triggered this
2024-07-06 02:42:16 +03:00
DanielSvoboda 1d58a0403e
Fix ShowSplash size (#235)
* Fix ShowSplash size

* enable isShowSplash
2024-07-05 00:16:06 +03:00
psucien dd97b517f7
Recompiler: sampler patching (#236)
* recompiler: restored bfs in image instruction producers search

* recompiler: added pattern check for s# anisotropy modification

* added check if s# comes from constant load (e.g. EUD)
2024-07-05 00:15:57 +03:00
TheTurtle 6ceab6dfac
shader_recompiler: Implement most integer image atomics, workgroup barriers and shared memory load/store (#231)
* shader_recompiler: Add LDEXP

* shader_recompiler: Add most image integer atomic ops

* shader_recompiler: Implement shared memory load/store

* shader_recompiler: More image atomics

* externals: Update sirit

* clang format

* cmake: Add missing files

* shader_recompiler: Fix some atomic bugs

* shader_recompiler: Vs outputs

* shader_recompiler: Shared mem has side-effects, fix format component order

* shader_recompiler: Inline constant buffer impl

* video_core: Fix regressions

* Work

* Fixup a few things
2024-07-05 00:15:44 +03:00
IndecisiveTurtle fe5bfa9d61 texture_cache: Always validate for now 2024-07-01 22:53:01 +03:00
IndecisiveTurtle 2fe897eeda host_shaders: Fix R8G8 detiler 2024-07-01 20:25:43 +03:00
IndecisiveTurtle 7d4f0da40e video_core: Fix some regressions 2024-07-01 18:26:22 +03:00
IndecisiveTurtle 20e83b4d53 clang format 2024-07-01 13:56:14 +03:00
IndecisiveTurtle 410ba37ec2 code: Add additional logging during init 2024-07-01 13:56:14 +03:00
IndecisiveTurtle 6774216038 shader_recompiler: Apply buffer swizzle on vertex attribs 2024-07-01 13:56:14 +03:00
IndecisiveTurtle b4d24d8737 renderer_vulkan: Prefer depth stencil read-only layout when possible
* Persona reads a depth attachment while it is being attached with writes disabled. Now this works without spamming vk validation errors
2024-07-01 13:56:14 +03:00
IndecisiveTurtle 22b930ba5e video_core: Track renderpass scopes properly 2024-07-01 13:56:14 +03:00
IndecisiveTurtle ad10020836 video_core: Fix a few problems 2024-07-01 13:56:14 +03:00
IndecisiveTurtle 10ef357f1f image: Fix image type of 1D Array 2024-07-01 13:56:14 +03:00
psucien f03262421e texture_cache: force storage usage bit to all images 2024-07-01 09:58:52 +02:00
psucien 1f55eff9d8 libraries: gnmdriver: added initialization preamble to every first submit in a frame 2024-06-30 18:22:39 +02:00
psucien 14377b39b5 texture_cache: detiler: added missing micro8x2 2024-06-30 15:54:59 +02:00
psucien 9121ecf123 renderer_vulkan: more formats conversion 2024-06-30 01:21:39 +03:00
psucien c4061c3b95 amdgpu: fix for wrong constant ram offset in `WriteConstRam` decoding 2024-06-30 01:21:39 +03:00
psucien 2cbbcbd371
Metadata support (#223)
* texture_cache: more image usage flags

* texture_cache: metadata registration

* renderer_vulkan: initial CMask support

* renderer_vulkan: skip redundant FCE and FMask decompression passes

* renderer_vulkan: redundant VO surface registration removed

* renderer_vulkan: initial HTile support

* renderer_vulkan: added support for MSAA attachments

* renderer_vulkan: skip unnecessary metadata updates
2024-06-29 16:49:59 +03:00
georgemoralis 059f54838a
Merge pull request #219 from shadps4-emu/gnmdriver/hw_init
Complete HW state init functions
2024-06-27 17:33:58 +03:00
georgemoralis 0ada442cbc
Stabilization8 (#218)
* disable configured flexible memory size (caused issues in some games)

* fixed case S_OR_B64 for blazing chrome

* submodules updates and fixes for latest SDL

* stubbed _sigprocmask (not handled and spams too much)

* added ReplaceOp case in Stencilop

* dummy ajm module added
2024-06-27 16:37:17 +03:00
psucien 91940781b8 libraries: gnmdriver: complete HW stat init functions 2024-06-27 13:36:55 +02:00
georgemoralis 521ff4d14b clang format fixes 2024-06-26 20:32:08 +03:00
IndecisiveTurtle 550bfa1c88 liverpool: Fix assert for compute queues 2024-06-26 20:00:09 +03:00
IndecisiveTurtle 4846704832 shader_recompiler: More instructions and fix for swords of ditto 2024-06-26 18:03:09 +03:00
Alexandre Bouvier a2224a9b6b fix system include paths 2024-06-25 18:17:16 +02:00
psucien 8475a62a46 common: `Common` namespace for the slot vector container 2024-06-25 09:31:32 +02:00
psucien c04fbb75d8 libraries: gnm_driver: added `sceGnmDrawIndexIndirect` and `sceGnmDrawIndirect` 2024-06-24 22:53:59 +02:00
psucien cb6b21de1f
Initial instancing and asynchronous compute queues (#207)
* gnm_driver: added `sceGnmRegisterOwner` and `sceGnmRegisterResource`

* video_out: `sceVideoOutGetDeviceCapabilityInfo` for sdk runtime

* gnm_driver: correct vqid index range

* amdgpu: indirect buffer, release mem and some additional irq modes

* amdgpu: added ASC commands processor

* shader_recompiler: added support for fetch instance id

* amdgpu: classic bitfields for T# representation (debugging experience)

* renderer_vulkan: skip zero sized VBs from binding

* texture_cache: image upload logic moved into `Image` object

* gnm_driver: `sceGnmDingDong` implementation

* texture_cache: `Image` usage flags moved; correct VO buffer pitch
2024-06-22 19:50:20 +03:00
IndecisiveTurtle 73d60b7e8d linker: Set rela bits for all symbol types 2024-06-22 18:09:04 +03:00
IndecisiveTurtle 741427040f shader_recompiler: Even more instructions 2024-06-22 18:09:04 +03:00
IndecisiveTurtle 30199fe701 kernel: Add scePthreadExit 2024-06-22 18:09:04 +03:00
psucien ab4cc8b218 texture_cache: return back image view usage override 2024-06-16 22:30:18 +02:00
psucien 6e7fd21338 renderer_vulkan: simplified sRGB hack 2024-06-16 22:29:23 +02:00
psucien 3f92a68129 renderer_vulkan: BC3 formats conversion 2024-06-16 22:29:04 +02:00
psucien 37ceea2314 renderer_vulkan: added log entry for CS compiling 2024-06-16 20:51:35 +02:00
psucien b02ec385b2 video_out: proper sRGB output workflow 2024-06-15 23:24:34 +02:00
psucien b2b45bf480 video_core: added support for alternate CB channels order 2024-06-15 23:24:33 +02:00
psucien b9602afc82 renderer_vulkan: sRGB swapchain 2024-06-15 23:24:33 +02:00
psucien e6f773f950 videoout: register buffers in texture cache at VO creation time 2024-06-15 23:24:33 +02:00
psucien bdb235716a texture_cache: don't set color attachment usage flag for packed images 2024-06-15 23:24:33 +02:00
psucien fd8ceacef7 video_core: shaders hash switched to one from binary header 2024-06-15 23:24:32 +02:00
psucien 37cbdad57b renderer_vulkan: static vector for vertex buffers ranges 2024-06-15 23:20:14 +02:00
psucien be6f523b6e renderer_vulkan: fixed buffers alignments 2024-06-15 23:20:13 +02:00
TheTurtle c5d1d579b1
core: Many things (#194)
* video_core: Add a few missed things

* libkernel: More proper memory mapped files

* memory: Fix tessellation buffer mapping

* Cuphead work

* sceKernelPollSema fix

* clang format

* fixed ngs2 lle loading and rtc lib

* draft pthreads keys implementation

* fixed return codes

* return error code if sceKernelLoadStartModule module is invalid

* re-enabled system modules and disable debug in libs.h

* Improve linux support

* fix windows build

* kernel: Rework keys

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2024-06-15 14:36:07 +03:00
TheTurtle 31bd502764
core: Fixup linux support (#195)
* tls: Implement for linux

* core: Implement memory manager for linux
2024-06-14 00:58:57 +03:00
psucien 64569ff737 tracy: guards for missing vk profiler context 2024-06-11 22:57:37 +02:00
psucien d7565dec57 tracy: added Vulkan GPU profiling 2024-06-11 21:52:48 +02:00
psucien 04b1226e9c tracy: basic markup and project palette 2024-06-11 12:14:33 +02:00
psucien c2dc7c3fd4 renderer_vulkan: another fix for vertex buffer offsets 2024-06-10 23:20:32 +02:00