Commit graph

347 commits

Author SHA1 Message Date
b695ca5a2a Revert some wip changes 2025-04-28 16:14:42 -03:00
JPikachu
c64c404a2f Enable ExtendedDynamicState 3 2025-04-23 19:01:56 +01:00
edendev
e96383615b Fixed typo 2025-04-22 21:02:48 -07:00
edendev
8823f12f18 Enable ExtendedDynamicState 2 and other features 2025-04-22 20:59:02 -07:00
edendev
5080513a5e Enable ExtendedDynamicState 1 across platforms 2025-04-22 18:22:25 -07:00
Zephyron
728de0406e vulkan: Improve memory allocation robustness
Enhances the Vulkan memory allocator with better OOM handling and memory
alignment:

* Add memory recovery by cleaning up empty allocations before failing
* Implement proper fallback to non-device-local memory
* Simplify memory alignment handling for different vendors
* Add better error logging for allocation failures
* Add IsEmpty() helper to track unused allocations
* Fix alignment requirements for Adreno (4KB) vs other vendors

These changes improve the robustness of memory allocation, particularly
in low-memory situations, and streamline vendor-specific alignment
requirements.
2025-04-19 17:19:16 -03:00
Zephyron
389327d3f0 vulkan: Add Samsung driver workarounds
Add workarounds for Samsung Xclipse GPUs:

- Disable extendedDynamicState3ColorBlendEquation as it is broken in Samsung
  drivers, similar to AMD drivers
- Add Samsung's proprietary driver to the validated driver list for clock
  boosting
- Fix log message to indicate both AMD and Samsung drivers have broken
  color blend equation support

Remove stray logical OR operator from validated_driver condition.
2025-04-14 12:17:19 -03:00
e26a256a44 Fix Zephyron commits 2025-04-13 00:23:18 -03:00
Zephyron
777111dfb4 feat(video_core): Fix Linux compilation issues in Hybrid Memory Manager
- Added missing <thread> header for std::thread usage
- Added <fcntl.h> for O_CLOEXEC and O_NONBLOCK definitions
- Fixed struct initialization order in uffdio_copy to match declaration order

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-04-12 23:42:39 -03:00
Zephyron
34693001aa Add Windows support to Hybrid Memory Manager
This commit adds Windows-specific implementation of the fault-managed memory
system, providing similar functionality to the existing Linux/Android implementation.

Key changes:
- Added Windows-specific memory management using VirtualAlloc/VirtualFree
- Implemented Windows vectored exception handler for page fault handling
- Added proper memory protection and page fault handling on Windows
- Updated memory snapshot functionality to work on Windows
- Added proper cleanup of Windows-specific resources
- Fixed type conversion issues in memory management code
- Added proper error handling for Windows memory operations
- Fixed VRAM Memory Layout Mode to allow up to 12Gb

The implementation uses Windows-specific APIs:
- VirtualAlloc/VirtualFree for memory management
- AddVectoredExceptionHandler for page fault handling
- VirtualProtect for memory protection management

This change maintains feature parity with the Linux/Android implementation
while using Windows-native APIs for better performance and reliability.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-04-12 23:42:24 -03:00
Zephyron
9615e910f9 feat(video_core): Implement HybridMemory for advanced Vulkan memory management
Adds a new cross-platform memory management system with enhanced capabilities:
- Fault-managed memory allocation for Linux/Android platforms
- Memory snapshot and differential snapshot support
- Predictive memory reuse tracking for optimized access patterns
- Vulkan compute buffer integration
- User-configurable settings for enabling features

The system integrates with the existing Vulkan renderer to provide more
efficient memory handling, especially for compute-intensive workloads.

Co-authored-by: boss.sfc <boss.sfc@citron-emu.org>
Co-committed-by: boss.sfc <boss.sfc@citron-emu.org>
Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-04-12 23:41:26 -03:00
9cef9f5dce Update fmt to allow for v11
Signed-off-by: swurl <swurl@swurl.xyz>
2025-04-10 01:11:22 +02:00
darktux
492d3856e8 Vulkan validation error fix.
Different image usage flags between image creation and image view
creation.
2025-04-04 03:40:48 +02:00
darktux
edff3d4adb Radeon gpu profiler detection support 2025-04-04 03:40:47 +02:00
yuzubot
f2aa821f94 "Merge Tagged PR 13178" 2024-03-03 13:02:49 +00:00
Narr the Reg
615cc06ca4 Merge pull request #13001 from liamwhite/scaled-availability
vulkan_device: don't use fixed cap for memory limits
2024-02-22 11:31:17 -06:00
Narr the Reg
091abdc5cb Merge pull request #13075 from liamwhite/mali-having-a-bad-time
shader_recompiler: throw on missing geometry streams in geometry shaders
2024-02-22 11:30:26 -06:00
FearlessTobi
4d55e58ee4 scope_exit: Make constexpr
Allows the use of the macro in constexpr-contexts.
Also avoids some potential problems when nesting braces inside it.
2024-02-19 16:00:46 +01:00
Liam
749f0564ae shader_recompiler: throw on missing geometry streams in geometry shaders 2024-02-19 00:34:00 -05:00
Liam
a956f0f4f8 vulkan_device: don't use fixed cap for memory limits 2024-02-18 18:59:13 -05:00
Moonlacer
31200d0c7a Add Samsung Proprietary Driver ID to Reorder Pass
For RDNA-based Samsung Xclipse GPUs
2024-02-01 17:53:26 -06:00
liamwhite
bc857b4b5a Merge pull request #12439 from FireBurn/vkresult
Simplify VkResult lookup
2024-01-29 09:08:32 -05:00
Matías Locatti
fa47a39052 Demote Mesa dozen to the bottom of the device list 2024-01-24 23:36:14 -03:00
Mike Lothian
0a3c09f2f6 Simplify VkResult lookup 2024-01-22 03:10:43 +00:00
Viktor Szépe
e895ebb546 Fix typos in video_core 2024-01-07 22:44:55 +00:00
liamwhite
aec8115476 Merge pull request #12449 from liamwhite/debug-utils
renderer_vulkan: skip SetObjectNameEXT on unsupported driver
2023-12-26 11:45:39 -05:00
Liam
072c63ec91 renderer_vulkan: skip SetObjectNameEXT on unsupported driver 2023-12-23 11:08:02 -05:00
Liam
188916635a renderer_vulkan: demote format assert to error log 2023-12-23 11:04:02 -05:00
liamwhite
154009b915 Merge pull request #12414 from jbeich/vk274
externals: update Vulkan-Headers to v1.3.274
2023-12-20 12:46:50 -05:00
Fernando S
18b7ed6453 Merge pull request #12403 from liamwhite/clipdistance
shader_recompiler: use minimal clip distance array
2023-12-20 18:45:20 +01:00
Jan Beich
af5d54b6c8 vulkan_common: unbreak build with Vulkan-Headers 1.3.274
src/video_core/vulkan_common/vulkan_wrapper.cpp:293:13: error: enumeration value 'VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR' not handled in switch [-Werror,-Wswitch]
    switch (result) {
            ^~~~~~
2023-12-20 01:12:41 +01:00
Liam
6611ba122b shader_recompiler: ignore clip distances beyond driver support level 2023-12-18 22:25:14 -05:00
Liam
47429e716c renderer_vulkan: work around turnip binding bug in a610 2023-12-17 15:45:09 -05:00
Liam
2ccd547309 renderer_vulkan: exclude more qcom drivers from extensions 2023-11-29 21:06:06 -05:00
liamwhite
f6c13b4dad Merge pull request #12154 from liamwhite/more-drivers
vulkan_device: add names for more driverID enumeration values
2023-11-29 12:33:34 -05:00
Fernando S
896ae72dbf Merge pull request #11535 from GPUCode/upload_cmdbuf
renderer_vulkan: Introduce separate cmd buffer for uploads
2023-11-26 18:33:05 +01:00
Liam
a0ed6c0653 vulkan_device: add names for more driverID enumeration values 2023-11-24 12:00:41 -05:00
Liam
86d9651d5d renderer_vulkan: exclude steam deck oled from force max clock setting 2023-11-24 11:38:39 -05:00
Liam
a41e57d968 renderer_vulkan: ignore viewport stores on non-supporting drivers 2023-11-19 11:27:12 -05:00
Fernando Sahmkow
c6330ca05f Vulkan: Be more generous with pipeline workers for Android 2023-11-19 14:54:15 +01:00
GPUCode
4b853ff5cf renderer_vulkan: Introduce separate cmd buffer for uploads 2023-11-12 20:27:39 +01:00
Liam
bd45923351 vulkan_common: use highest API version 2023-10-24 17:04:17 -04:00
Kelebek1
90d99fbd00 Manually robust on Maxwell and earlier 2023-10-19 19:54:31 +01:00
Kelebek1
2fe13a4d53 Not not allocate DeviceLocal buffers as mapped 2023-10-10 12:49:07 +01:00
liamwhite
cfb7500e29 Merge pull request #11656 from liamwhite/recreate-surface-automatically
vk_present_manager: recreate surface on any surface loss
2023-10-07 12:49:54 -04:00
liamwhite
b932f304ad Merge pull request #11544 from Kelebek1/reduce_stream_buffer_renderdoc
Allow GPUs without rebar to open multiple RenderDoc captures
2023-10-07 12:49:19 -04:00
liamwhite
d14f8815b1 Merge pull request #11688 from Kelebek1/x8d42
Implement X8_D24 pixel format
2023-10-07 10:55:14 -04:00
liamwhite
bab15ef979 Merge pull request #11684 from Kelebek1/disable_push_descriptor_maxwell
Disable push descriptor for Pascal and older nVidia architectures
2023-10-07 10:54:52 -04:00
Kelebek1
a1df96e84d Allow GPUs without rebar to open multiple RenderDoc captures 2023-10-06 07:52:06 +01:00
Kelebek1
5063305487 Implement X8_D24 format 2023-10-06 00:58:30 +01:00