Commit graph

284 commits

Author SHA1 Message Date
Quang Ngô
1bc27135e3
renderer_vulkan: fix deadlock when resizing the SDL window (#1860)
* renderer_vulkan: Fix deadlock when resizing the SDL window

* Address review comment
2024-12-29 13:22:35 +02:00
Quang Ngô
0351b864d0
texture_cache: Enable anisotropic filtering (#1872) 2024-12-27 16:47:26 +02:00
squidbus
a86ee7e7f5
vk_platform: Enable MoltenVK debug if crash diagnostics is enabled. (#1887)
* vk_platform: Enable MoltenVK debug if crash diagnostics is enabled.

* build: Make sure MoltenVK gets re-bundled when changed.
2024-12-27 16:46:31 +02:00
Vinicius Rangel
edc027a8bc
Devtools IV (#1910)
* devtools: fix popen in non-windows environment

* devtools: fix frame crash assertion when hidden

* devtools: add search to shader list

* devtools: add copy name to shader list

* devtools: frame dump: search by shader name
2024-12-26 23:08:47 +02:00
squidbus
3c111202e1
renderer_vulkan: Make sure at least one viewport is set (#1859) 2024-12-25 16:05:51 +02:00
squidbus
a89c29c2ca
shader_recompiler: Rework image read/write emit. (#1819) 2024-12-25 01:13:32 +02:00
squidbus
6d728ec7ed
renderer_vulkan: Enable LDS barriers for MoltenVK (#1866) 2024-12-24 23:03:04 +02:00
squidbus
0a4453b912
renderer_vulkan: Simplify depth pipeline state and move stencil to dynamic state. (#1854)
* renderer_vulkan: Simplify depth pipeline state and move stencil to dynamic state.

* Change graphics key depth-stencil flags to bitfields.
2024-12-24 13:45:11 +02:00
TheTurtle
092d42e981
renderer_vulkan: Implement rectlist emulation with tessellation (#1857)
* renderer_vulkan: Implement rectlist emulation with tessellation

* clang format

* renderer_vulkan: Use tessellation for quad primitive as well

* vk_rasterizer: Handle viewport enable flags

* review

* shader_recompiler: Fix quad/rect list FS passthrough semantics.

* spirv: Bump to 1.5

* remove pragma

---------

Co-authored-by: squidbus <175574877+squidbus@users.noreply.github.com>
2024-12-24 13:28:47 +02:00
psucien
c2e9c877dd hot-fix: missing fce barrier 2024-12-23 18:20:37 +01:00
Quang Ngô
400da1aa8d
Handle swapchain recreation (#1830) 2024-12-23 16:21:48 +02:00
psucien
2dc5755799 build: exclude Tracy from release builds 2024-12-22 22:51:48 +01:00
Vladislav Mikhalin
7fe4df85ab
Clear color attachment if FCE was invoked before any draws (#1851)
* Clear RT if FCE was invoked before any draws

Co-authored-by: psucien <bad_cast@protonmail.com>

* address review comments

---------

Co-authored-by: psucien <bad_cast@protonmail.com>
2024-12-22 18:12:43 +01:00
setepenre
8a409d86d4
post-processing: rework gamma correction (#1756) 2024-12-22 16:18:07 +01:00
squidbus
14dc136832
renderer_vulkan: Various attachment cleanup and fixes. (#1795) 2024-12-22 16:08:48 +02:00
TheTurtle
5eebb04de9
vk_rasterizer: hot fix 2024-12-22 15:31:10 +02:00
TheTurtle
fb2c035c05
vk_rasterizer: Fix stencil clears (#1840) 2024-12-22 02:49:42 +02:00
Daniel R.
8d8bb05055
renderer_vulkan: add support for Polygon draws (#1798) 2024-12-21 10:20:24 +01:00
TheTurtle
188eebb92a
ir: Add heuristic based LDS barrier pass (#1801)
* ir: Add heuristic based LDS barrier pass

* Attempts to insert barriers after zero-depth divergant conditional blocks in shaders that use shared memory

* lds_barriers: Limit to nvidia

* Intel has historically had problems with cs barriers, will debug other time
2024-12-19 10:18:28 +02:00
squidbus
ccfb1bbfa8
vk_instance: Add additional fallback for missing D16UnormS8Uint. (#1810) 2024-12-18 07:56:08 +02:00
squidbus
87773a417b
mac: Choose whether system Vulkan is needed at runtime. (#1780) 2024-12-17 15:04:19 +02:00
psucien
e7c4ffe032 hot-fix: Tracy operation restored; memory leak fix as a bonus 2024-12-15 20:53:29 +01:00
psucien
0fd1ab674b
GPU processor refactoring (#1787)
* coroutine code prettification

* asc queues submission refactoring

* better asc ring context handling

* final touches and review notes

* even more simplification for context saving
2024-12-15 00:54:46 +02:00
squidbus
8b88344679
vk_instance: Remove unused dynamic state 2 features struct (#1791) 2024-12-14 22:46:19 +02:00
TheTurtle
e9ede8d627
Revert "DmaData and Recompiler fixes (#1775)" (#1784)
This reverts commit cafd40f2c2.
2024-12-14 16:17:14 +02:00
Vladislav Mikhalin
cafd40f2c2
DmaData and Recompiler fixes (#1775)
* liverpool: fix dmadata packet handling

* recompiler: emit a label right after s_branch to prevent dead code interferrence

* specialize barriers
2024-12-14 14:33:06 +02:00
baggins183
3c0c921ef5
Tessellation (#1528)
* shader_recompiler: Tessellation WIP

* fix compiler errors after merge

DONT MERGE set log file to /dev/null

DONT MERGE linux pthread bb fix

save work

DONT MERGE dump ir

save more work

fix mistake with ES shader

skip list

add input patch control points dynamic state

random stuff

* WIP Tessellation partial implementation. Squash commits

* test: make local/tcs use attr arrays

* attr arrays in TCS/TES

* dont define empty attr arrays

* switch to special opcodes for tess tcs/tes reads and tcs writes

* impl tcs/tes read attr insts

* rebase fix

* save some work

* save work probably broken and slow

* put Vertex LogicalStage after TCS and TES to fix bindings

* more refactors

* refactor pattern matching and optimize modulos (disabled)

* enable modulo opt

* copyright

* rebase fixes

* remove some prints

* remove some stuff

* Add TCS/TES support for shader patching and use LogicalStage

* refactor and handle wider DS instructions

* get rid of GetAttributes for special tess constants reads. Immediately replace some upon seeing readconstbuffer. Gets rid of some extra passes over IR

* stop relying on GNMX HsConstants struct. Change runtime_info.hs_info and some regs

* delete some more stuff

* update comments for current implementation

* some cleanup

* uint error

* more cleanup

* remove patch control points dynamic state (because runtime_info already depends on it)

* fix potential problem with determining passthrough

---------

Co-authored-by: IndecisiveTurtle <47210458+raphaelthegreat@users.noreply.github.com>
2024-12-14 12:56:17 +02:00
squidbus
3e22622508
renderer_vulkan: Remove some fallbacks and misc format queries that are no longer needed. (#1773) 2024-12-14 12:04:30 +02:00
squidbus
8caca4df32
shader_recompiler: Support VK_AMD_shader_image_load_store_lod for IMAGE_STORE_MIP (#1770)
* shader_recompiler: Support VK_AMD_shader_image_load_store_lod for IMAGE_STORE_MIP

* emit_spirv: Fix missing extension declaration.
2024-12-14 12:03:42 +02:00
Diego Cea López
715ac8a279
vk_shader_hle: Don't alter the order of the skipped copies. (#1757)
* vk_shader_hle: Don't alter the order of the skipped copies.

* Simplification.

* Format.

* More simplification.
2024-12-14 00:27:09 +02:00
TheTurtle
722a0e36be
graphics: Improve handling of color buffer and storage image swizzles (#1763)
* liverpool_to_vk: Remove wrong component swap formats

* shader_recompiler: Handle storage and buffer format swizzles

* shader_recompiler: Skip unsupported depth export

* image_view: Remove image format swizzle

* Platform support is not always guaranteed
2024-12-13 21:49:37 +02:00
TheTurtle
cfbd869126
texture_cache: Improve support for stencil reads (#1758)
* texture_cache: Improve support for stencil reads

* libraries: Supress some spammy logs

* core: Support loading font libraries

* texture_cache: Remove assert
2024-12-13 18:28:19 +02:00
Diego Cea López
1e3d034f96
Fix HLE buffer copy not executed when there's only 1 copy. (#1754) 2024-12-12 22:45:56 +02:00
squidbus
ec8e5d5ef1
renderer_vulkan: Fix some color attachment indexing issues. (#1755) 2024-12-12 20:45:18 +02:00
squidbus
3d1e332c6f
renderer_vulkan: Disable culling for RectList. (#1749) 2024-12-12 11:05:59 +02:00
squidbus
714605c6a7
renderer_vulkan: Require exact image format for resolve pass. (#1742) 2024-12-11 21:51:39 +01:00
squidbus
14f7dc3527
cache: Invalidate pages for file reads. (#1726)
* cache: Invalidate pages for file reads.

* texture_cache: Simplify invalidate intersection check.

* vk_rasterizer: Make aware of mapped memory ranges.

* buffer_cache: Remove redundant page calculations.

Called functions will convert to page numbers/addresses themselves.

* file_system: Simplify memory invalidation and add a few missed cases.
2024-12-11 21:11:24 +02:00
squidbus
e612e881ac
renderer_vulkan: Bind null color attachments when target is masked out. (#1740)
* renderer_vulkan: Bind null color attachments when target is masked out.

* Simplify setting null color attachment
2024-12-11 21:10:40 +02:00
squidbus
e5e1aba241
renderer_vulkan: Introduce shader HLE system with copy shader implementation. (#1683)
* renderer_vulkan: Introduce shader HLE system with copy shader implementation.

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

* buffer_cache: Handle obtaining buffer views partially within buffers.

* vk_shader_hle: Make more efficient

---------

Co-authored-by: TheTurtle <47210458+raphaelthegreat@users.noreply.github.com>
2024-12-10 14:44:08 +02:00
Vinicius Rangel
f1b23c616e
Devtools - Shader editing (#1705)
* devtools: shader editing and compiling

* devtools: patch shader at runtime

* devtools: shader editing load patch even with config disabled
2024-12-09 21:11:11 +01:00
squidbus
7d546f32d8
image_view: Add more BGRA storage format swizzles. (#1693) 2024-12-08 10:19:39 +02:00
¥IGA
2266622dcf
Support for Vulkan 1.4 (#1665) 2024-12-07 19:41:41 +02:00
psucien
941a668f78 hot-fix: obtain cmdbuf for dispatches after cache ops
This fixes cmdbuf being in incorrect state after scheduler rotation on flush
2024-12-07 10:30:36 +01:00
Vladislav Mikhalin
8eacb88a86
recompiler: fixed fragment shader built-in attribute access (#1676)
* recompiler: fixed fragment shader built-in attribute access

* handle en/addr separately

* handle other registers as well
2024-12-07 01:20:09 +02:00
TheTurtle
9e618c0e0c
video_core: Add multipler to handle special cases of texture buffer stride mismatch (#1640)
* page_manager: Enable userfaultfd by default

* Much faster than page faults and causes less problems

* shader_recompiler: Add texel buffer multiplier

* Fixes format mismatch assert when vsharp stride is multiple of format stride

* shader_recompiler: Specialize UBOs on size

* Some games can perform manual vertex pulling and thus bind read only buffers of varying size. We only recompile when the vsharp size is larger than size in shader, in opposite case its not needed

* clang format
2024-12-06 19:54:59 +02:00
squidbus
d05846a327
specialization: Fix fetch shader field type (#1675) 2024-12-06 12:59:55 +02:00
psucien
37f4bad2b7
video_core: fix for targets clears and copies (#1670) 2024-12-05 23:09:22 +02:00
squidbus
920acb8d8b
renderer_vulkan: Parse fetch shader per-pipeline (#1656)
* shader_recompiler: Read image format info directly from sharps instead of storing in shader info.

* renderer_vulkan: Parse fetch shader per-pipeline

* Few minor fixes.

* shader_recompiler: Specialize on vertex attribute number types.

* shader_recompiler: Move GetDrawOffsets to fetch shader
2024-12-04 13:03:47 +02:00
squidbus
74b091fd08
renderer_vulkan: Add support for indexed QuadList draw. (#1661) 2024-12-04 10:15:58 +01:00
TheTurtle
eb844b9b63
shader_recompiler: Implement manual barycentric interpolation path (#1644)
* shader_recompiler: Implement manual barycentric interpolation path

* clang format

* emit_spirv: Fix typo

* emit_spirv: Simplify variable definition

* spirv_emit: clang format
2024-12-02 23:20:54 +02:00