Commit graph

564 commits

Author SHA1 Message Date
squidbus
aeee7706ee
renderer_vulkan: Restore Vulkan version to 1.3 (#2827)
Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2025-04-23 13:28:31 +03:00
squidbus
53ca64f6ff
renderer_vulkan: Support loading Vulkan layers on macOS SDL build. (#2832) 2025-04-23 01:10:03 -07:00
squidbus
ee7fe305c9 fix: Make sure right MoltenVK is loaded for macOS SDL. 2025-04-22 23:18:39 -07:00
squidbus
0297aee3f4
texture_cache: Relax mismatched image type from assert to cache miss. (#2830) 2025-04-22 15:03:43 -07:00
squidbus
5b0205bc59 fix: Texture cache image type assert. 2025-04-22 14:00:08 -07:00
Dmugetsu
cda421434b
Adding missmatch info to Texture cache assert (#2828) 2025-04-22 22:49:29 +03:00
squidbus
df89241eb8
vk_rasterizer: Improve viewport depth calculations. (#2799) 2025-04-17 13:04:48 -07:00
squidbus
ddf3df7f56 fix: clang-format 2025-04-16 10:48:17 -07:00
squidbus
04e4ce0775 fix: Bad Intel drivers. 2025-04-16 09:52:18 -07:00
squidbus
3bc876ca78
renderer_vulkan: Improve handling of required vs optional extensions. (#2792)
* renderer_vulkan: Improve handling of required vs optional extensions.

* documents: Update quickstart Vulkan requirements.
2025-04-15 22:31:58 -07:00
squidbus
247e935353
externals: Update MoltenVK (#2791) 2025-04-15 17:13:19 -07:00
squidbus
683a223c1b
vk_rasterizer: Control mapped_ranges access with shared lock. (#2788) 2025-04-14 20:58:33 -07:00
squidbus
37d4cd091c
renderer_vulkan: Make some primitive state dynamic. (#2764)
* renderer_vulkan: Make some primitive state dynamic.

* renderer_vulkan: Silence MoltenVK primitive restart warning spam.
2025-04-10 16:20:01 -07:00
Dmugetsu
5abec2a291
Enabling Depth Bias Explicity (#2766) 2025-04-09 17:06:54 -07:00
squidbus
03b1fef331
renderer_vulkan: Only update dynamic state when changed. (#2751) 2025-04-08 07:22:16 -07:00
squidbus
b8f6ef1c0b
externals: Update MoltenVK (#2754) 2025-04-07 12:23:04 +03:00
squidbus
0c6f2b470f
renderer_vulkan: Use more depth-stencil dynamic state. (#2749) 2025-04-05 23:14:27 +03:00
squidbus
afd0251dd2
shader_recompiler: Use VK_AMD_shader_trinary_minmax when available. (#2739)
* shader_recompiler: Use VK_AMD_shader_trinary_minmax when available.

* shader_recompiler: Simplify signed/unsigned trinary instruction variants.
2025-04-02 23:36:54 +03:00
squidbus
f85d8df71e
vulkan: Lower list primitive restart warning to debug log. (#2725) 2025-03-30 22:02:33 +03:00
kalaposfos13
5caab76a45
Implement DmaDataSrc::MemoryUsingL2 and DmaDataDst::MemoryUsingL2 (#2680)
* Implement DmaDataSrc::MemoryUsingL2 and DmaDataDst::MemoryUsingL2

* Add L2 handling to the other place it's used
2025-03-26 23:03:50 +02:00
kalaposfos13
a1ec8b0a88
Handle compute packets that are split between the ends of two command buffers (#2476)
* Squashed initial implementation

* Logging for checking if buffers are memory contiguous

* Add check to see if first instruction is valid in the next buffer to avoid false positives

* Oof

* Replace old code with IndecisiveTurtle's new, better implementation

* Add `unlikely` keyword to the split packet handling branches

Co-authored-by: TheTurtle <47210458+raphaelthegreat@users.noreply.github.com>

---------

Co-authored-by: IndecisiveTurtle <47210458+raphaelthegreat@users.noreply.github.com>
2025-03-26 00:01:21 +02:00
Vinicius Rangel
5691046dcc
Renderer fixes (Splash + Aspect Ratio) (#2645)
* rewrite splash

removed Splash class
rewrite using imgui texture manager
fix crashes & old validation error

* handle games with abnormal aspect ratios
2025-03-13 18:10:24 +02:00
Vinicius Rangel
f663176a5d
FidelityFX FSR implementation (#2624)
* host_shaders: support for includes

* video_core: add a simpler vulkan asserts

* video_core: refactored post processing pipeline to another file

* renderer_vulkan: add define param to compile shader utility

* video_core: fsr implementation

* devtools: show resolution & fsr state
2025-03-12 20:33:30 +02:00
Randomuser8219
6331eb1d8a
Add unexcepted depth format to unreachable (#2557) 2025-02-28 00:16:53 -08:00
IndecisiveTurtle
0a23072938 hot-fix: Compare with correct size 2025-02-24 17:43:05 +02:00
TheTurtle
76b4da6212
video_core: Various small improvements and bug fixes (#2525)
* ir_passes: Add barrier at end of block too

* vk_platform: Always assign names to resources

* texture_cache: Better overlap handling

* liverpool: Avoid resuming ce_task when its finished

* spirv_quad_rect: Skip default attributes

Fixes some crashes

* memory: Improve buffer size clamping

* liverpool: Relax binary header validity check

* liverpool: Stub SetPredication with a warning

* Better than outright crash

* emit_spirv: Implement round to zero mode

* liverpool: queue::pop takes the front element

* image_info: Remove obsolete assert

The old code assumed the mip only had 1 layer thus a right overlap could not return mip 0. But with the new path we handle images that are both mip-mapped and multi-layer, thus this can happen

* tile_manager: Fix size calculation

* spirv_quad_rect: Skip default attributes

---------

Co-authored-by: poly <47796739+polybiusproxy@users.noreply.github.com>
Co-authored-by: squidbus <175574877+squidbus@users.noreply.github.com>
2025-02-24 14:31:12 +02:00
squidbus
8a793f64bf misc: Add message indicating unimplemented primitive type. 2025-02-21 21:18:12 -08:00
squidbus
9424047214
shader_recompiler: Proper support for inst-typed buffer format operations. (#2469) 2025-02-21 03:01:18 -08:00
squidbus
5b3e156197
externals: Update MoltenVK (#2492) 2025-02-21 12:41:36 +02:00
georgemoralis
cc583b6189 hot-fix: rasterizer 2025-02-19 13:55:18 +02:00
TheTurtle
da0ab005c7
video_core: Fix some cases of "Attempted to track non-GPU memory" (#2447)
* memory: Consider flexible mappings as gpu accessible

Multiple guest apps do this with perfectly valid sharps in simple shaders. This needs some hw testing to see how it is handled but for now doesnt hurt to handle it

* memory: Clamp large buffers to mapped area

Sometimes huge buffers can be bound that start on some valid mapping but arent fully contained by it. It is not reasonable to expect the game needing all of the memory, so clamp the size to avoid the gpu tracking assert

* clang-format fix

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2025-02-19 13:31:35 +02:00
squidbus
fd3d3c4158
shader_recompiler: Implement AMD buffer bounds checking behavior. (#2448)
* shader_recompiler: Implement AMD buffer bounds checking behavior.

* shader_recompiler: Use SRT flatbuf for bounds check size.

* shader_recompiler: Fix buffer atomic bounds check.

* buffer_cache: Prevent false image-to-buffer sync.

Lowering vertex fetch to formatted buffer surfaced an issue where a CPU modified range may be overwritten with stale GPU modified image data.

* Address review comments.
2025-02-17 16:13:39 +02:00
squidbus
e13fb2e366
renderer_vulkan: Bind descriptors to specific stages in layout. (#2458) 2025-02-16 15:08:16 +02:00
TheTurtle
82cacec8eb
shader_recompiler: Remove special case buffers and add support for aliasing (#2428)
* shader_recompiler: Move shared mem lowering into emitter

* IR can be quite verbose during first stages of translation, before ssa and constant prop passes have run that drastically simplify it. This lowering can also be done during emission so why not do it then to save some compilation time

* runtime_info: Pack PsColorBuffer into 8 bytes

* Drops the size of the total structure by half from 396 to 204 bytes. Also should make comparison of the array a bit faster, since its a hot path done every draw

* emit_spirv_context: Add infrastructure for buffer aliases

* Splits out the buffer creation function so it can be reused when defining multiple type aliases

* shader_recompiler: Merge srt_flatbuf into buffers list

* Its no longer a special case, yay

* shader_recompiler: Complete buffer aliasing support

* Add a bunch more types into buffers, such as F32 for float reads/writes and 8/16 bit integer types for formatted buffers

* shader_recompiler: Remove existing shared memory emulation

* The current impl relies on backend side implementaton and hooking into every shared memory access. It also doesnt handle atomics. Will be replaced by an IR pass that solves these issues

* shader_recompiler: Reintroduce shared memory on ssbo emulation

* Now it is performed with an IR pass, and combined with the previous commit cleanup, is fully transparent from the backend, other than requiring workgroup_index be provided as an attribute (computing this on every shared memory access is gonna be too verbose

* clang format

* buffer_cache: Reduce buffer sizes

* vk_rasterizer: Cleanup resource binding code

* Reduce noise in the functions, also remove some arguments which are class members

* Fix gcc
2025-02-15 14:06:56 +02:00
squidbus
6e12642151
shader_recompiler: Lower non-compute shared memory into spare VGPRs. (#2403) 2025-02-12 20:10:13 -08:00
squidbus
c9d425dc08 fix: Correct number of allocated VGPRs. 2025-02-12 17:53:52 -08:00
squidbus
2188895b40
buffer_cache: Give null buffer full usage flags. (#2400) 2025-02-11 00:19:38 -08:00
squidbus
843cd01308 fix: Disable VK_EXT_tooling_info on AMD proprietary for now. 2025-02-09 16:34:20 -08:00
psucien
04fe3a79b9
fix: lower UBO max size to account buffer cache offset (#2388)
* fix: lower UBO max size to account buffer cache offset

* review comments

* remove UBO size from spec and always set it to max on shader side
2025-02-09 22:03:20 +01:00
squidbus
15b520f4a2
renderer_vulkan: Skip tessellation isolines if not supported. (#2384) 2025-02-09 10:20:13 -08:00
psucien
5d4812d1a6 hot-fix: fix for unintended gamma correction bypass when HDR is disabled 2025-02-09 18:22:07 +01:00
psucien
8f2883a388
video_out: HDR support (#2381)
* Initial HDR support

* fix for crashes when debug tools used
2025-02-09 15:54:54 +01:00
squidbus
cfe249debe
shader_recompiler: Replace texel buffers with in-shader buffer format interpretation (#2363)
* shader_recompiler: Replace texel buffers with in-shader buffer format interpretation

* shader_recompiler: Move 10/11-bit float conversion to functions and address some comments.

* vulkan: Remove VK_KHR_maintenance5 as it is no longer needed for buffer views.

* shader_recompiler: Add helpers for composites and bitfields in pack/unpack.

* shader_recompiler: Use initializer_list for bitfield insert helper.
2025-02-06 20:40:49 -08:00
DanielSvoboda
46cbee1585
RemapSwizzle formatting (#2368)
This doesn't change anything, it just reduces duplicate information.
2025-02-06 18:18:02 -08:00
squidbus
78ea536c95 hotfix: 4444 swizzle order 2025-02-06 17:55:46 -08:00
squidbus
1a00b1af24
vulkan: Use more supported 4444 format. (#2366) 2025-02-06 17:45:47 -08:00
squidbus
1eb0affdea
vk_instance: Clean up extension management. (#2342) 2025-02-06 16:38:02 -08:00
Stephen Miller
e972a8805d
Bump size of buffer_views (#2357)
Uncharted 4 (and perhaps some other games) fill this up, causing a `Unhandled exception: boost::container::bad_alloc thrown` exception
2025-02-05 19:54:13 +02:00
squidbus
b879dd59c6
shader_recompiler: Add workaround for drivers with unexpected unorm rounding behavior. (#2310) 2025-02-04 01:01:59 -08:00
Vladislav Mikhalin
1d8c607c15 hotfix: stronger conditions for the vtx offset error message 2025-02-01 20:44:10 +03:00