Commit graph

120 commits

Author SHA1 Message Date
psucien 718200faad video_core: CPU flip relay (#415)
* video_core: cpu flip is propagated via gpu thread now

* tentative fix for cpu flips racing

* libraries: videoout: better flip status handling
2024-08-14 11:36:11 +02:00
TheTurtle 705d1e29cf video_core: Various fixes (#423)
* video_core: Various fixes

* clang format
2024-08-13 20:05:10 +03:00
squidbus 8610994989 Fix some Vulkan validation errors on macOS. (#420) 2024-08-13 10:30:47 +03:00
TheTurtle c243ef0c58 video_core: Crucial buffer cache fixes + proper GPU clears (#414)
* translator: Use templates for stronger type guarantees

* spirv: Define buffer offsets upfront

* Saves a lot of shader instructions

* buffer_cache: Use dynamic vertex input when available

* Fixes issues when games like dark souls rebind vertex buffers with different stride

* externals: Update boost

* spirv: Use runtime array for ssbos

* ssbos can be large and typically their size will vary, especially in generic copy/clear cs shaders

* fs: Lock when doing case insensitive search

* Dark Souls does fs lookups from different threads

* texture_cache: More precise invalidation from compute

* Fixes unrelated render targets being cleared

* texture_cache: Use hashes for protect gpu modified images from reupload

* translator: Treat V_CNDMASK as float

* Sometimes it can have input modifiers. Worst this will cause is some extra calls to uintBitsToFloat and opposite. But most often this is used as float anyway

* translator: Small optimization for V_SAD_U32

* Fix review

* clang format
2024-08-13 09:21:48 +03:00
squidbus e8dd5962fd Enable VK_EXT_robustness2 nullDescriptor only if supported. 2024-08-12 14:52:46 -07:00
psucien 8312421aeb unlink sync2 if not present (tentative fix for #418) 2024-08-12 22:52:21 +02:00
psucien 29b76d8a2b Build stabilization (#413)
* shader_recompiler: fix for float convert and debug asserts

* libraries: kernel: correct return code on invalid semaphore

* amdgpu: additional case for cb extents retrieval heuristic

* removed redundant check in assert

* amdgpu: fix for linear tiling mode detection fin color buffers

* texture_cache: fix for unexpected scheduler flushes by detiler

* renderer_vulkan: missing depth barrier

* texture_cache: missed slices in rt view; + detiler format
2024-08-12 17:23:01 +03:00
psucien 9b4d3b4db1 Video Core: debug tools (#412)
* video_core: better use of rdoc markers

* renderer_vulkan: added gpu assisted validation

* renderer_vulkan: make nv_checkpoints operational

* video_core: unified Vulkan objects names
2024-08-12 13:46:45 +02:00
IndecisiveTurtle a32d8e1c55 vk_graphics_pipeline: Fix regression 2024-08-08 17:01:03 +03:00
TheTurtle 8809e1c226 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 e91da052c3 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 7c9fe2c831 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 25b9abec77 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 908f0f3e74 missing eR8Srgb 2024-07-31 02:07:02 -06:00
raziel1000 86e783f667 added data_format=1 and num_format=9 2024-07-31 01:24:44 -06:00
raziel1000 3aebe7eeb9 added data_format=10 and num_format=5 2024-07-31 00:32:50 -06:00
TheTurtle bfc845324c 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
psucien 8dbfac7b64 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 5363a226e1 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 8d12c06de4 Update format list for rebase and sort and remove duplicates. 2024-07-21 22:36:12 +03:00
squidbus 40a99f177b Add a few missing used formats from detiling. 2024-07-21 22:36:12 +03:00
squidbus c15f6b4461 Change format list from vector to array/span. 2024-07-21 22:36:12 +03:00
squidbus 2c37254fd0 Tidy up Vulkan extension list. 2024-07-21 22:36:12 +03:00
squidbus aef76187e9 Add fallback system for unsupported pixel formats. 2024-07-21 22:36:12 +03:00
squidbus 063da896ba Downgrade Vulkan requirement to 1.2 with extensions. 2024-07-21 22:36:12 +03:00
squidbus d42a32bbd8 Add initial macOS support. 2024-07-21 22:36:12 +03:00
TheTurtle 7c08ca9544 vk_scheduler: Fix pending op check 2024-07-21 17:41:46 +03:00
TheTurtle 986b3af62b vk_scheduler: Add api for defering operations (#311) 2024-07-21 15:42:32 +03:00
psucien 2b31ab1e71 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 e8bd2a3334 Update liverpool_to_vk.cpp 2024-07-18 18:19:46 +03:00
georgemoralis 879b8dcfe8 Merge branch 'main' into miscFixes6 2024-07-18 18:18:10 +03:00
georgemoralis 9f1251b643 clang format fix 2024-07-17 17:57:54 +03:00
IndecisiveTurtle 0e1d5263d2 Remove bc6 2024-07-17 17:06:09 +03:00
IndecisiveTurtle 70e74160d7 shader_recompiler: Normal gathers 2024-07-17 16:49:45 +03:00
IndecisiveTurtle c745e429e7 rasterizer: Bump staging to 1GB
* Less chances of crashing
2024-07-17 16:22:04 +03:00
IndecisiveTurtle 40924d1325 liverpool_to_vk: Add more surface formats 2024-07-17 16:19:08 +03:00
georgemoralis 9a7a508b80 Merge pull request #287 from polybiusproxy/dev
gnmdriver: Implement shader functions
2024-07-15 07:47:33 +03:00
psucien 77d0535f9f review comments applied 2024-07-14 23:25:41 +02:00
georgemoralis 9184e24307 dataformat used by DMC4 2024-07-14 23:23:10 +03:00
psucien 535a8f30e9 renderer: debug markers for ability to match cmdlists with rdoc captures 2024-07-14 11:37:52 +02:00
psucien c068adda48 recompiler: proper VS inputs initialization 2024-07-13 01:00:24 +02:00
psucien 04933d6576 hot fix: reduce geometry staging 3Gb -> 512Mb 2024-07-11 20:29:53 +02:00
psucien a7434352e6 Merge pull request #247 from viniciuslrangel/device-selector
Improve physical device selection in Vulkan renderer
2024-07-08 22:04:51 +02:00
offtkp 7e55a04889 Eliminate compiler warning 2024-07-08 01:17:42 +03:00
Vinicius Rangel 117265d1a7 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 a25872031c renderer: a bit more formats to support 2024-07-07 14:34:36 +02:00
psucien d2cf81cee0 renderer: don't let unbound color attachment affect pass's rendering area 2024-07-06 20:13:12 +02:00
psucien 317838122d renderer: added support for instance step rates 2024-07-06 18:03:43 +02:00
TheTurtle 60c63da3fd 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 0a64cedf1c Fix ShowSplash size (#235)
* Fix ShowSplash size

* enable isShowSplash
2024-07-05 00:16:06 +03:00