Commit Graph

63 Commits

Author SHA1 Message Date
Triang3l
fe1fd36137 [D3D12/Vulkan] Simplify host GPU fence management
Replace the `SubmissionTracker`s with new `GPUCompletionTimeline`s with a
more unified interface (using a base class), and without the internal logic
for queue ownership transfers since that idea was scrapped during the
development of the `Presenter`.

Also use this fence management logic for GPU emulation, though without
architectural reworks for now, just on the bottom level.

Still very messy, but can be cleaned up in further GPU command processor
and presenter reworks.
2025-12-14 21:24:38 +03:00
Triang3l
0b2ffa3148 [GPU] Change texture load cbuffer to push constants
Simplify the code, eliminating the need for supporting requesting cbuffers
for anything other than guest draw command execution.
2025-08-20 12:46:26 +03:00
Triang3l
b5432ab83f [Vulkan] Refactoring and fixes for VulkanProvider and related areas
Enable portability subset physical device enumeration.

Don't use Vulkan 1.1+ logical devices on Vulkan 1.0 instances due to the
VkApplicationInfo::apiVersion specification.

Make sure all extension dependencies are enabled when creating a device.

Prefer exposing feature support over extension support via the device
interface to avoid causing confusion with regard to promoted extensions
(especially those that required some features as extensions, but had those
features made optional when they were promoted).

Allow creating presentation-only devices, not demanding any optional
features beyond the basic Vulkan 1.0, for use cases such as internal tools
or CPU rendering.

Require the independentBlend feature for GPU emulation as working around is
complicated, while support is almost ubiquitous.

Move the graphics system initialization fatal error message to xenia_main
after attempting to initialize all implementations, for automatic fallback
to other implementations in the future.

Log Vulkan driver info.

Improve Vulkan debug message logging, enabled by default.

Refactor code, with simplified logic for enabling extensions and layers.
2025-08-14 23:44:21 +03:00
Triang3l
3d30b2eec3 [Vulkan] Shader memory export (#145) 2024-05-25 16:31:50 +03:00
Triang3l
45050b2380 [GPU] Vulkan fragment shader interlock RB and related fixes/cleanup
Also fixes addressing of MSAA samples 2 and 3 for 64bpp color render targets in the ROV RB implementation on Direct3D 12.
Additionally, with FSI/ROV, alpha test and alpha to coverage are done only if the render target 0 was dynamically written to (according to the Direct3D 9 rules for writing to color render targets, though not sure if they actually apply to the alpha tests on Direct3D 9, but for safety).
There is also some code cleanup for things spotted during the development of the feature.
2022-10-09 22:06:41 +03:00
Triang3l
7595cdb52b [Vulkan] Non-GS point sprites + minor SPIR-V fixes 2022-07-27 17:14:28 +03:00
Triang3l
77e85ecaa4 [Vulkan] 32-bit index fetch without fullDrawIndexUint32 2022-07-25 16:53:12 +03:00
Triang3l
b3edc56576 [Vulkan] Merge texture and sampler descriptors into a single descriptor set
Put all descriptors used by translated shaders in up to 4 descriptor sets, which is the minimum required, and the most common on Android, `maxBoundDescriptorSets` device limit value
2022-07-09 17:10:28 +03:00
Triang3l
e4de8663c4 [Vulkan] All guest draw uniform buffer bindings in a single descriptor set
Reduce the number of bound descriptor sets from 10 to 6, which is still above the minimum limit of 4, but closer
2022-07-07 21:05:56 +03:00
Triang3l
7c2df55209 [Vulkan] Cache clear: shared memory, scratch buffer 2022-06-29 13:24:45 +03:00
Triang3l
05ef7a273a [Vulkan] Samplers (only 1.0 core features for now) 2022-06-28 22:42:18 +03:00
Triang3l
6688b13773 [Vulkan] PsParamGen 2022-06-26 15:01:27 +03:00
Triang3l
4b4205ba00 [Vulkan] Frontbuffer presentation 2022-06-25 14:33:43 +03:00
Triang3l
1a22216e44 [SPIR-V] Texture fetch instructions 2022-06-09 21:42:16 +03:00
Triang3l
6c9a06b2da [Vulkan] Texture loading 2022-05-24 22:42:22 +03:00
Triang3l
91c4e02e96 [Vulkan] Implement ClearCaches and don't do it for pipelines 2022-05-22 15:05:15 +03:00
Triang3l
46202dd27a [Vulkan] Basic texture descriptor set allocation/binding 2022-05-17 22:42:28 +03:00
Triang3l
0db94a700f [Vulkan] Use pipeline layout key structures directly 2022-05-15 17:42:27 +03:00
Triang3l
b80361ee3c [Vulkan] Texture cache: Maximum dimensions, null images 2022-05-15 16:59:27 +03:00
Triang3l
185c23dd50 [Vulkan] Gather shader stages that VS can be translated into 2022-05-15 16:31:24 +03:00
Triang3l
b88f715140 Merge branch 'master' into vulkan 2022-05-03 00:13:17 +03:00
Triang3l
0acb97d383 [Vulkan] EDRAM range ownership transfers, resolve clears, 2x-as-4x MSAA
Transfers are functional on a D3D12-like level, but need additional work so fallbacks are used when multisampled integer sampled images are not supported, and to eliminate transfers between render targets within Vulkan format compatibility classes by using different views directly.
2022-04-03 16:40:29 +03:00
Triang3l
1259c9f7a2 [Vulkan] Pipeline barrier merging 2022-03-21 23:02:51 +03:00
Triang3l
c75e0dd19e [Vulkan] Blend and depth/stencil state, small pipeline cleanup 2022-02-15 23:00:21 +03:00
Triang3l
922efb13ce Merge branch 'master' into vulkan 2022-02-03 21:12:10 +03:00
Triang3l
fe3f0f26e4 [UI] Image post-processing and full presentation/window rework
[GPU] Add FXAA post-processing
[UI] Add FidelityFX FSR and CAS post-processing
[UI] Add blue noise dithering from 10bpc to 8bpc
[GPU] Apply the DC PWL gamma ramp closer to the spec, supporting fully white color
[UI] Allow the GPU CP thread to present on the host directly, bypassing the UI thread OS paint event
[UI] Allow variable refresh rate (or tearing)
[UI] Present the newest frame (restart) on DXGI
[UI] Replace GraphicsContext with a far more advanced Presenter with more coherent surface connection and UI overlay state management
[UI] Connect presentation to windows via the Surface class, not native window handles
[Vulkan] Switch to simpler Vulkan setup with no instance/device separation due to interdependencies and to pass fewer objects around
[Vulkan] Lower the minimum required Vulkan version to 1.0
[UI/GPU] Various cleanup, mainly ComPtr usage
[UI] Support per-monitor DPI awareness v2 on Windows
[UI] DPI-scale Dear ImGui
[UI] Replace the remaining non-detachable window delegates with unified window event and input listeners
[UI] Allow listeners to safely destroy or close the window, and to register/unregister listeners without use-after-free and the ABA problem
[UI] Explicit Z ordering of input listeners and UI overlays, top-down for input, bottom-up for drawing
[UI] Add explicit window lifecycle phases
[UI] Replace Window virtual functions with explicit desired state, its application, actual state, its feedback
[UI] GTK: Apply the initial size to the drawing area
[UI] Limit internal UI frame rate to that of the monitor
[UI] Hide the cursor using a timer instead of polling due to no repeated UI thread paints with GPU CP thread presentation, and only within the window
2022-01-29 13:22:03 +03:00
Triang3l
2800f6180a [Vulkan] Primitive processor 2021-06-09 20:54:31 +03:00
Triang3l
a94301d967 [Vulkan] Viewport from draw_util and vtx_fmt 2020-11-18 12:48:12 +03:00
Triang3l
65c8d2b28e [Vulkan] Basic draw call architecture + [D3D12] Some cleanup 2020-11-14 14:16:04 +03:00
Triang3l
93f6a00201 [Vulkan] Transient descriptor pool + other cleanup for future drawing 2020-11-07 23:18:28 +03:00
Triang3l
afe304b328 [Vulkan] Shared memory descriptor set 2020-11-07 20:43:45 +03:00
Triang3l
d7341f9873 [Vulkan] Internal descriptor set layouts 2020-11-07 14:03:31 +03:00
Triang3l
fdbed73463 [Vulkan/SPIR-V] Some pipeline layout parts + exec conditionals 2020-10-25 15:09:39 +03:00
Triang3l
2782fc927d Merge branch 'master' into vulkan 2020-10-08 21:38:41 +03:00
Triang3l
81bc33523a [GPU] Remove unused FinalizeTrace 2020-10-08 21:37:29 +03:00
Triang3l
4d59f556a9 [Vulkan] Sparse shared memory 2020-10-07 21:03:50 +03:00
Triang3l
2c50c670d8 [Vulkan] Basic shared memory uploading 2020-10-04 22:08:30 +03:00
Triang3l
865f77bae2 [Vulkan] Submissions 2020-10-01 21:17:10 +03:00
Triang3l
7b93670dbd [Vulkan] Remove old Vulkan code, change shaders directory, create empty Vulkan backend 2020-08-31 21:44:29 +03:00
Triang3l
bd5f77bc3b [GPU] Common resolve code based on compute shaders, swap MSAA samples 1 and 2, change ROV write rounding, random refactoring 2020-08-09 21:33:10 +03:00
Triang3l
4bb0ca0e09 [GPU] Move all xenos.h to gpu::xenos, disambiguate Dimension/TextureDimension 2020-07-11 15:54:22 +03:00
gibbed
5bf0b34445 C++17ification.
C++17ification!

- Filesystem interaction now uses std::filesystem::path.
- Usage of const char*, std::string have been changed to
  std::string_view where appropriate.
- Usage of printf-style functions changed to use fmt.
2020-04-07 16:09:41 -05:00
Triang3l
90b772a330 [GPU] Set VGT_DRAW_INITIATOR and use major mode from it 2020-02-24 23:27:25 +03:00
Triang3l
c499229455 [GPU] Store an EDRAM snapshot in traces 2019-11-04 17:30:20 +03:00
Triang3l
c057b5a032 [D3D12] Make trace dump partially work 2019-10-25 08:38:06 +03:00
Triang3l
4623b41023 [D3D12] Trace guest memory operations 2019-10-23 23:33:50 +03:00
gibbed
ee5724f5dd [GPU] Move gamma ramp tracking to CommandProcessor. 2018-05-22 05:36:24 -05:00
gibbed
fb650ae024 [Vulkan] Start tracking the gamma ramp. 2018-05-21 23:16:15 -05:00
DrChat
16cf9883ca [Vulkan] Fix a couple validation errors 2018-02-19 11:19:24 -06:00
Dr. Chat
84758a3a3f Vulkan CP: Use the color blitter 2017-05-13 10:15:56 -05:00