Commit Graph

80 Commits

Author SHA1 Message Date
lizzie 5ea24621cf [vk] fix LM3 and TL:LTD multiple NonUniform annotations (#3997)
should fix AMD

Signed-off-by: lizzie lizzie@eden-emu.dev

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3997
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-05-29 03:28:10 +02:00
lizzie 17e2be173c [spirv] nuke spirv-opt (#3877)
lots of AGILEism in spirv-opt
theres BETTER alternatives like https://github.com/renderbag/re-spirv (im not gonna bother for now, it probably has shitty build system)
it sucks

the IR already resolves most of the shader code to just constant load/stores
Spirv-opt passes do not seem to make such a big difference
only introduce extra latency
like for example cbuf pass in IR already removes a lot of code, that spirv_opt would otherwise miss due to the fact it doesn't have cbuf information

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Co-authored-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3877
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: crueter <crueter@eden-emu.dev>
2026-04-25 21:54:27 +02:00
crueter 09a8fab2a2 [spirv] improved spir-v shader opt (#239)
increases speed ~tenfold for Spir-V output optimization when using it on load.

Co-authored-by: wildcard <nubieluv@gmail.com>
Signed-off-by: crueter <crueter@eden-emu.dev>

Co-authored-by: wildcard <nubieluv@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/239
Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
2025-08-15 21:40:41 +02:00
crueter 51b170b470 [cmake] refactor: Use CPM over submodules (#143)
Transfers the majority of submodules and large externals to CPM, using source archives rather than full Git clones. Not only does this save massive amounts of clone and configure time, but dependencies are grabbed on-demand rather than being required by default. Additionally, CPM will (generally) automatically search for system dependencies, though certain dependencies have options to control this.

Testing shows gains ranging from 5x to 10x in terms of overall clone/configure time.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/143
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
2025-08-04 04:50:14 +02:00
Gamer64 a002730d68 [VK] Rework SPIRV Shader Optimization (#238)
The actual SPIRV Shader Optimization option doesn't seem to do anything as long as it isn't vinculed, so let's rework it to make it work

Co-authored-by: Gamer64 <76565986+Gamer64ytb@users.noreply.github.com>
Co-authored-by: echosys <echosys@noreply.localhost>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/238
2025-07-03 01:13:33 +00:00
Liam 749f0564ae shader_recompiler: throw on missing geometry streams in geometry shaders 2024-02-19 00:34:00 -05:00
Liam a41e57d968 renderer_vulkan: ignore viewport stores on non-supporting drivers 2023-11-19 11:27:12 -05:00
Kelebek1 c7430e51e3 Remove memory allocations in some hot paths 2023-06-22 08:05:10 +01:00
Liam 0a077cb467 Vulkan: update initialization
Co-authored-by: bylaws <bylaws@users.noreply.github.com>
2022-11-27 14:58:28 -05:00
Morph 2b87305d31 general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-23 05:55:32 -04:00
ameerj 712b7883be emit_spirv: Add Xfb execution mode when transform feedback is used
Fixes Transform Feedback on Vulkan AMD drivers.
2022-01-28 16:32:48 -05:00
Matías Locatti 244dff4e6e Empty spaces 2021-12-28 18:50:51 -03:00
Matías Locatti 1a30c0a125 Changes to avoid warnings in SSE4.2 optimized SPIR-V 2021-12-28 17:35:55 -03:00
ameerj 3f06a447fb emit_spirv: Reduce emit_spirv.h include overhead
emit_spirv.h is included in video_core, which was propagating further includes that video_core did not depend on.
2021-12-05 18:11:19 -05:00
ReinUsesLisp ff35ef8ec1 emit_spirv: Workaround VK_KHR_shader_float_controls on fp16 Nvidia
Fix regression on Fire Emblem: Three Houses when using native fp16.
2021-07-22 21:51:40 -04:00
ReinUsesLisp b1df436cef shader: Rework varyings and implement passthrough geometry shaders
Put all varyings into a single std::bitset with helpers to access it.

Implement passthrough geometry shaders using host's.
2021-07-22 21:51:39 -04:00
ReinUsesLisp 04c1dca457 shader: Move loop safety tests to code emission 2021-07-22 21:51:39 -04:00
ReinUsesLisp 04fed81921 spirv: Reduce log severity of mismatching denorm rules 2021-07-22 21:51:35 -04:00
ReinUsesLisp f40daa777e shader: Add logging 2021-07-22 21:51:35 -04:00
ReinUsesLisp 9452fe2dc6 shader: Split profile and runtime information in separate structs 2021-07-22 21:51:33 -04:00
ReinUsesLisp 5c6dc51c69 shader: Read branch conditions from an instruction
Fixes the identity removal pass.
2021-07-22 21:51:32 -04:00
lat9nq 69210028b4 shader_recompiler: GCC fixes
Fixes members of unnamed union not being accessible, and one function
without a declaration.
2021-07-22 21:51:31 -04:00
ReinUsesLisp 6be1db8873 emit_spirv: Jump to loop body with local variable
Silence unused variable warning
2021-07-22 21:51:31 -04:00
ReinUsesLisp cb344497a7 emit_spirv: Add missing block in case 2021-07-22 21:51:31 -04:00
ReinUsesLisp f2ae32fa76 glasm: Initial implementation of phi nodes on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 03f6d424ce glasm: Rework control flow introducing a syntax list
This commit regresses VertexA shaders, their transformation pass has to
be adapted to the new control flow.
2021-07-22 21:51:31 -04:00
ReinUsesLisp 7273fcab95 glasm: Implement shuffle and vote instructions on GLASM 2021-07-22 21:51:31 -04:00
ReinUsesLisp 055db41f19 Move SPIR-V emission functions to their own header 2021-07-22 21:51:30 -04:00
ameerj 455872a4af shader: Implement Int32 SUATOM/SURED 2021-07-22 21:51:30 -04:00
ReinUsesLisp d2e6291c0e spirv: Do not enable ShaderLayer
This is enabled by an extension instead of the capability.
2021-07-22 21:51:29 -04:00
ReinUsesLisp b2fe282ad3 spirv: Enable DemoteToHelperInvocationEXT only when supported 2021-07-22 21:51:29 -04:00
ReinUsesLisp 2ee532c9bc spirv: Use OriginLowerLeft when requested 2021-07-22 21:51:29 -04:00
ReinUsesLisp 884a937022 spirv: Support OpenGL uniform buffers and change bindings 2021-07-22 21:51:29 -04:00
ReinUsesLisp 6236b611cf shader: Move microinstruction header to the value header 2021-07-22 21:51:28 -04:00
FernandoS27 f1a3f449d6 shader: Address feedback 2021-07-22 21:51:28 -04:00
FernandoS27 b1e325f317 shader: Implement fine derivates constant propagation 2021-07-22 21:51:28 -04:00
ReinUsesLisp cc96469019 shader: Implement PIXLD.MY_INDEX 2021-07-22 21:51:28 -04:00
ReinUsesLisp b6b541e36a spirv: Implement ViewportMask with NV_viewport_array2 2021-07-22 21:51:28 -04:00
ReinUsesLisp 38908d0f7e shader: Implement tessellation shaders, polygon mode and invocation id 2021-07-22 21:51:27 -04:00
ReinUsesLisp bba876f192 spirv: Implement Layer stores 2021-07-22 21:51:27 -04:00
ReinUsesLisp e59971ea1b shader: Implement transform feedbacks and define file format 2021-07-22 21:51:27 -04:00
ReinUsesLisp 4a6c299e3f shader: Implement early Z tests 2021-07-22 21:51:27 -04:00
ReinUsesLisp c84c2ab88c spirv: Rework storage buffers and shader memory 2021-07-22 21:51:27 -04:00
ReinUsesLisp 4b32692423 shader: Implement geometry shaders 2021-07-22 21:51:27 -04:00
ReinUsesLisp 1cae8e9a10 spirv: Define StorageImageWriteWithoutFormat capability when used 2021-07-22 21:51:27 -04:00
ameerj 62c3bef607 shader: Implement ATOM/S and RED 2021-07-22 21:51:27 -04:00
ReinUsesLisp ece2e64825 spirv: Move phi node patching to a separate function 2021-07-22 21:51:27 -04:00
ReinUsesLisp 480ce24b7e spirv: Guard against typeless image reads on unsupported devices 2021-07-22 21:51:27 -04:00
ReinUsesLisp 1e5255de49 spirv: Fix forward declarations on phi nodes 2021-07-22 21:51:27 -04:00
ReinUsesLisp 5ab1ac4f29 shader: Implement SULD and SUST 2021-07-22 21:51:26 -04:00