Commit graph

306 commits

Author SHA1 Message Date
squidbus
bf3e43b016
vulkan: Use dynamic vertex buffer strides when dynamic bindings unavailable. (#1164) 2024-10-01 09:54:06 +03:00
Daniel R.
80bf46da4c
core/memory: Pooled memory implementation (#1085) 2024-09-29 10:28:41 +03:00
squidbus
5e98a3e1d8
vulkan: Fix crash when resizing window. (#1142) 2024-09-29 08:25:44 +03:00
IndecisiveTurtle
ebebafed64 hotfix2: Actually fix errors
Ahhhh
2024-09-27 03:21:08 +03:00
IndecisiveTurtle
cf342e7a4b hotfix: descriptor set lifetime fix 2024-09-27 02:56:50 +03:00
squidbus
50fc5e339d
liverpool_to_vk: Add MRT feature flags to supported number formats. (#1087) 2024-09-27 01:57:22 +03:00
Paris Oplopoios
eef0e6fc63
Fix build on GCC (#1080)
* Fix build on GCC

* Yes thank you clang-format

* Just remove static
2024-09-26 20:39:55 +03:00
Paris Oplopoios
6295d6c416
Use fs::path::native whenever possible, avoid unnecessary fs->string conversions in GUI code (#1064)
* Use filesystem::path whenever possible, remove fs::path::string

* My hatred for Windows grows with every passing day

* More Qt stuff

* custom u8string formatter for fmt library

* Use u8string for imgui

* Fix toml errors hopefully

* Fix not printing issue

* Oh and on SDL

* I hate Windows even more today

* fix toml reading utf-8 paths

also small fix for fmt::UTF

* Formatting

* Fix QT path to run games

* Fix path logging in save data

* Fix trophy path handling

* Update game_list_frame.cpp

fixed snd0path

* Update main_window.cpp

fix snd0path

* Update main_window.cpp

* paths finally fixed

* git info in WIP versions title

---------

Co-authored-by: Vinicius Rangel <me@viniciusrangel.dev>
Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2024-09-26 11:41:59 +03:00
psucien
6a70d08043 hot-fix: missing clear-to-blit (WAW) image barrier 2024-09-25 23:07:38 +02:00
oltolm
5a4d5b9f31
use ComPtr in gui_context_menus.h (#719)
* use ComPtr in gui_context_menus.h

* fix pragma diagnostic

* fix compiler warnings
2024-09-25 18:39:04 +03:00
squidbus
11c155d0f1
amdgpu: Fix buffer comparison by naming padding fields for initialization. (#1050) 2024-09-25 14:08:10 +03:00
squidbus
f657ab3cc6
vulkan: Only reduce viewport minDepth if using depth clip control. (#969) 2024-09-25 12:43:54 +03:00
Lander Gallastegi
a984d44fd3
Swapchain recreation and window resizing (#933)
* Always present acquired swapchain images

Always present acquired swapchain images in order to be able to acquire them again.

fix #865

* Recreate swapchain if window is resized

* Respect aspect ratio when blitting to frame

* Make SDL window resizable

* clang-format

* designator order (building with gcc)

Fix /shadPS4/src/video_core/renderer_vulkan/vk_instance.cpp:314:9: error: designator order for field ‘vk::PhysicalDeviceVulkan12Features::samplerMirrorClampToEdge’ does not match declaration order in ‘vk::PhysicalDeviceVulkan12Features’

* Clear frame before blitting

* clang-format

* Revert "designator order (building with gcc)"

There already is a PR opened for this.

This reverts commit 7f8ccf4b1e.
2024-09-25 12:43:08 +03:00
squidbus
b2de662d67
vulkan: Enable VULKAN_HPP_NO_EXCEPTIONS broadly. (#995)
* vulkan: Enable VULKAN_HPP_NO_EXCEPTIONS broadly.

* vulkan: Use structured bindings for result where possible.
2024-09-25 12:19:38 +03:00
squidbus
36ef61908d
renderer_vulkan: Refactor surface and depth format mapping. (#1067)
* renderer_vulkan: Refactor surface and depth format mapping.

* image: Convert usage to feature flags for format support checks.
2024-09-25 12:10:44 +03:00
Paris Oplopoios
6da67645e9
Fixup designator order (#1039) 2024-09-24 17:18:35 +03:00
Paris Oplopoios
5799091044
Patch extrq (#943)
* Use a singleton for instruction decoding

* Use singleton class

* Patch `EXTRQ`

* Fixup signal context functions

* Update CMakeLists.txt

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2024-09-23 19:19:52 +03:00
TheTurtle
cd7268a70e
video_core: Separate dirty flags and better gpu invalidation (#1034) 2024-09-23 18:03:42 +03:00
TheTurtle
ee38eec7fe
shader_recompiler: Additional scope handling and user data as push constants (#1013)
* shader_recompiler: Use push constants for user data regs

* shader: Add some GR2 instructions

* shader: Add some instructions

* shader: Add instructions for knack

* touchups

* spirv: Better names

* buffer_cache: Ignore non gpu modified images

* clang format

* Add log

* more fixes
2024-09-23 08:55:43 +02:00
squidbus
bfe2e1e57c
vulkan: Use closest available equivalent to missing clamp modes. (#1007) 2024-09-22 15:07:05 +03:00
psucien
5f4ddc14fc
Image subresources barriers (#904)
* video_core: texture: image subresources state tracking

* shader_recompiler: use one binding if the same image is read and written

* video_core: added rebinding of changed textures after overlap resolve

* don't use pointers; slight `FindTexture` refactoring

* video_core: buffer_cache: don't copy over the image size

* redundant barriers removed; fixes

* regression fixes

* texture_cache: 3d texture layers count fixup

* shader_recompiler: support for partially bound cubemaps

* added support for cubemap arrays

* don't bind unused color buffers

* fixed depth promotion to do not use stencil

* doors

* bonfire lit

* cubemap array index calculation

* final touches
2024-09-21 21:45:56 +02:00
squidbus
4fe81231f6
vulkan: Add alternatives when nullDescriptor is not supported. (#1001)
* vulkan: Add alternatives when nullDescriptor is not supported.

* vulkan: Set identifying name on null image/image view/buffer
2024-09-21 03:50:57 +03:00
squidbus
eaa92b5a65
vulkan: Upgrade format queries to use format feature flags 2. (#941) 2024-09-21 00:05:16 +03:00
Vinicius Rangel
0f4bcd8c83
Rewrite Save Data & Impl Save Data Dialog (#824)
* core: Rewrite PSF parser & add encoder

add .sfo hex pattern to /scripts

* core/fs: allow to mount path as read-only

* common: Add CString wrapper to handle native null-terminated strings

* SaveData: rewrite to implement full functionality

* mock value for SYSTEM_VER

* SavaData: backup features

* SavaData: SaveDataMemory features

* imgui Ref-counted textures

- has a background thread to decode textures

* imgui: rework gamepad navigation

* PSF: fixed psf not using enum class for PSFEntryFmt (was a standard old ugly enum)

- Add null check to CString when itself is used in a nullable field

* SaveDataDialog implementation

- Fix Mounting/Unmounting check of SaveInstance
2024-09-20 12:34:19 +03:00
korenkonder
60f315a54d
video_core: stride fix (#986)
I don't know why it was forced to be 1 while in reality it should be as is
2024-09-19 21:43:03 +02:00
Daniel R.
dcf245b814
shader_recompiler: Implement basic 64-bit floating point support (#915)
* shader_recompiler: Implement basic 64-bit floating point support

* Fix formatting
2024-09-15 22:53:08 +02:00
squidbus
75a4df53a5
cpu_patches: Patch just-in-time using signal handlers. (#852)
* cpu_patches: Patch just-in-time using illegal instruction handler.

* core: Add common signal dispatch system and use for on-demand TCB patches.

* page_manager: Re-add userfaultfd implementation.
2024-09-15 23:48:34 +03:00
TheTurtle
b09b28c7f3
graphics_pipeline: Move some depth configuration to dynamic state (#931)
* graphics_pipeline: More proper masking

* pipeline_cache: Skip setting depth/stencil fields when test is disabled

* pipeline_cache: More fixes to depth stencil state

* vk_rasterizer: Use dynamic state for depth bounds and bias

* pipeline_cache: Missed depth bias enable

* vk_rasterizer: Add stencil dynamic states

* thread: Reduce spammy log

* Remove some leftover state

* pipeline_cache: Allocate pipelines from pools

* vk_graphics_pipeline: Remove bindings member

Saves about 1KB from each pipeline
2024-09-15 22:42:14 +02:00
Raven
1879c9d12f
Add PM4 opcodes 2024-09-15 01:46:39 +08:00
squidbus
e30255e0d2
vulkan: Disable exceptions for getImageFormatProperties and account for errors. (#906) 2024-09-14 17:12:08 +03:00
squidbus
fc90f279e2
vulkan: Limit multisampling to supported sample counts. (#828) 2024-09-12 22:59:23 +03:00
baggins183
bc66fe8fb5
Fix copyGpuBuffers when resize invalidates commands in flight (#876)
* Fix copyGpuBuffers when resize invalidates commands in flight

* Use _MB macro for size constant
2024-09-12 21:54:54 +02:00
psucien
8a76cd888f hot-fix: mark null image as tracked by default to avoid its updates 2024-09-11 22:39:21 +02:00
Pipi86
1c0dfc60a1
Typo fix (#820)
* Update pm4_cmds.h

* Update pm4_cmds.h
2024-09-11 13:40:19 +03:00
squidbus
c27d79c2e7
vulkan: Skip draw when primitive type is None. (#867) 2024-09-11 08:58:20 +03:00
TheTurtle
b0bbb16aae
video_core: Add fallback path for pipelines with more than 32 bindings (#837)
* video_core: Small fixes

* renderer_vulkan: Add fallback path for pipelines with more than 32 bindings

* vk_resource_pool: Rewrite desc heap

* work
2024-09-10 20:54:39 +03:00
georgemoralis
3a65052b8e
Merge pull request #851 from shadps4-emu/stabilization/barriers
Various barrier fixes
2024-09-10 06:45:15 +03:00
squidbus
411449cd51
Initial support for compiling on ARM64. (#788) 2024-09-09 13:23:16 +03:00
psucien
adfb3af95f hot-fix: nullGpu functionality restored 2024-09-09 08:59:47 +02:00
psucien
1da1946ef5 presentation barriers fixed 2024-09-09 00:10:33 +02:00
psucien
56cc70dc97 fix for image view storage flag handling 2024-09-09 00:09:38 +02:00
Vinicius Rangel
035cb3eeaa
Dear ImGui Implementation (#598)
* added imgui as dependency

* imgui renderer/basic input implementation

* imgui: add layers system

Add video info layer to show fps. Press F10 to toggle it.

* imgui: add custom imgui config

* imgui: gamepad capture, stopping propagation

* imgui: changed config & log file path to use portable dir

* videoout: render blank frame when video output is closed

required to render imgui even when game has no video output

- fixed merge compile-error
2024-09-08 22:50:32 +03:00
psucien
f1becb2507 hot-fix: linear cubemaps check assert removed (verified) 2024-09-08 14:18:48 +02:00
psucien
047a115b3e hot-fix: exclude tiling condition from promotion of textures to depth 2024-09-08 11:12:25 +02:00
Blargle
749fe92882
Small fix for EmitQuadToTriangleListIndices (#831) 2024-09-07 15:52:48 +03:00
TheTurtle
13743b27fc
shader_recompiler: Implement data share append and consume operations (#814)
* shader_recompiler: Add more format swap modes

* texture_cache: Handle stencil texture reads

* emulator: Support loading font library

* readme: Add thanks section

* shader_recompiler: Constant buffers as integers

* shader_recompiler: Typed buffers as integers

* shader_recompiler: Separate thread bit scalars

* We can assume guest shader never mixes them with normal sgprs. This helps avoid errors where ssa could view an sgpr write dominating a thread bit read, due to how control flow is structurized, even though its not possible in actual control flow

* shader_recompiler: Implement data append/consume operations

* clang format

* buffer_cache: Simplify invalidation scheme

* video_core: Remove some invalidation remnants

* adjust
2024-09-07 00:14:51 +03:00
baggins183
bb29224daf
Implement V_MOVREL variants (#745)
* shader_recompiler: Implement V_MOVRELS_B32, V_MOVRELD_B32,
V_MOVRELSD_B32

Generates a ton of OpSelects to hardcode reading or writing from each
possible vgpr depending on the value of m0

Future work is to do range analysis to put an upper bound on m0 and
check fewer registers.

* fix runtime info after rebase
2024-09-06 23:47:47 +03:00
Daniel R.
416e23fe76
Fix incompatible format images being passed on overlap resolve (#794) 2024-09-06 20:09:28 +03:00
squidbus
8d1641e4d3
vulkan: Add VK_KHR_format_feature_flags_2 to extensions. (#803) 2024-09-06 14:12:29 +03:00
TheTurtle
b08baaeb13
video_core: Improve handling of image buffer aliases (#757)
* texture_cache: Use invalidate threshhold

* It's possible for shaders to bind huge buffers and only write to lower portion of it. This is a problem if upper parts of the buffer overlap with render targets. If the image is very far away from buffer base it's unlikely the shader will want to write it, so skip invalidation for it

* video_core: Allow using texture cache to validate texture buffers

* texture_cache: Use buffer cache in all cases for data source

* Allows to correctly handle compute written micro tiled textures

* texture_cache: Fix depth pitch

* kernel: Remove missed code

* clang format

* video_core: Adjust depth format

* buffer_cache: Do not cache buffer views

* thread_management: Do not call createMutex on unlock

* temp: Revert this when pr is done

* buffer_cache: Dont skip cpu uploads with image sync

* Sometimes image does not fully overlap with a region

* fix build

* video_core: Improve invalidate heuristic

* small fixes

* video_core: Hopefully fix some vertex explosions
2024-09-05 17:25:45 +03:00