[PR #3691] [MERGED] VK settings activation based on layers #3658

Closed
opened 2026-02-27 22:04:31 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3691
Author: @Niram7777
Created: 10/1/2025
Status: Merged
Merged: 10/2/2025
Merged by: @squidbus

Base: mainHead: vk-settings-activation-layer


📝 Commits (2)

  • 4af52db VK settings activation based on layers
  • df33984 Fix clang-format

📊 Changes

1 file changed (+32 additions, -4 deletions)

View changed files

📝 src/video_core/renderer_vulkan/vk_platform.cpp (+32 -4)

📄 Description

  1. Fix nullptr log when accessing emulator GUI settings with extension missing causing signal handler to call stop (it would be better to setup logs before anything else, but here it is a quick fix).

  2. Fix VK extension warning:

[Render.Vulkan] <Info> vk_platform.cpp:227 CreateInstance: Creating vulkan instance
[Render.Vulkan] <Info> vk_platform.cpp:183 operator(): Candidate instance extension VK_EXT_layer_settings is not available
[Render.Vulkan] <Info> vk_platform.cpp:270 CreateInstance: Enabled instance extensions: VK_KHR_wayland_surface, VK_KHR_surface, VK_EXT_debug_utils

Based on

Normal start

[Render.Vulkan] <Info> vk_platform.cpp:256 CreateInstance: Creating vulkan instance
[Render.Vulkan] <Info> vk_platform.cpp:299 CreateInstance: Enabled instance extensions: VK_KHR_wayland_surface, VK_KHR_surface, VK_EXT_swapchain_colorspace, VK_EXT_debug_utils, VK_EXT_layer_settings
[Render.Vulkan] <Info> vk_platform.cpp:300 CreateInstance: Enabled instance layers: VK_LAYER_KHRONOS_validation, VK_LAYER_LUNARG_crash_diagnostic
[Render.Vulkan] <Info> vk_instance.cpp:105 Instance: Found 2 physical devices
[Render.Vulkan] <Info> vk_instance.cpp:651 CollectDeviceParameters: GPU_Vendor: NVIDIA
[Render.Vulkan] <Info> vk_instance.cpp:652 CollectDeviceParameters: GPU_Model: NVIDIA RTX PRO 6000 Blackwell Workstation Edition
[Render.Vulkan] <Info> vk_instance.cpp:653 CollectDeviceParameters: GPU_Integrated: No
[Render.Vulkan] <Info> vk_instance.cpp:654 CollectDeviceParameters: GPU_Vulkan_Driver: NVIDIA 580.82.9.0
[Render.Vulkan] <Info> vk_instance.cpp:655 CollectDeviceParameters: GPU_Vulkan_Version: 1.4.312

With RenderDoc

[Render.Vulkan] <Info> vk_platform.cpp:256 CreateInstance: Creating vulkan instance
[Render.Vulkan] <Error> vk_platform.cpp:210 GetInstanceExtensions: Settings for layer VK_LAYER_KHRONOS_validation not available.
[Render.Vulkan] <Error> vk_platform.cpp:210 GetInstanceExtensions: Settings for layer VK_LAYER_LUNARG_crash_diagnostic not available.
[Render.Vulkan] <Info> vk_platform.cpp:299 CreateInstance: Enabled instance extensions: VK_KHR_xlib_surface, VK_KHR_surface, VK_EXT_swapchain_colorspace, VK_EXT_debug_utils
[Render.Vulkan] <Info> vk_platform.cpp:300 CreateInstance: Enabled instance layers: VK_LAYER_KHRONOS_validation, VK_LAYER_LUNARG_crash_diagnostic
[Render.Vulkan] <Info> vk_instance.cpp:105 Instance: Found 3 physical devices
[Render.Vulkan] <Info> vk_instance.cpp:651 CollectDeviceParameters: GPU_Vendor: NVIDIA
[Render.Vulkan] <Info> vk_instance.cpp:652 CollectDeviceParameters: GPU_Model: NVIDIA RTX PRO 6000 Blackwell Workstation Edition
[Render.Vulkan] <Info> vk_instance.cpp:653 CollectDeviceParameters: GPU_Integrated: No
[Render.Vulkan] <Info> vk_instance.cpp:654 CollectDeviceParameters: GPU_Vulkan_Driver: NVIDIA 580.82.9.0
[Render.Vulkan] <Info> vk_instance.cpp:655 CollectDeviceParameters: GPU_Vulkan_Version: 1.4.0

I am guessing RenderDoc is messing with layer path to not have my VK settings available there

The next improvement would be to use vk_layer_settings.txt instead IMO
https://vulkan.lunarg.com/doc/sdk/1.4.321.1/windows/layer_configuration.html


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/3691 **Author:** [@Niram7777](https://github.com/Niram7777) **Created:** 10/1/2025 **Status:** ✅ Merged **Merged:** 10/2/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `vk-settings-activation-layer` --- ### 📝 Commits (2) - [`4af52db`](https://github.com/shadps4-emu/shadPS4/commit/4af52db76d7aa78459221d55ffb349c37b3d295f) VK settings activation based on layers - [`df33984`](https://github.com/shadps4-emu/shadPS4/commit/df33984ac0343a9e6eb4f1f53673e3194c2308d0) Fix clang-format ### 📊 Changes **1 file changed** (+32 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/renderer_vulkan/vk_platform.cpp` (+32 -4) </details> ### 📄 Description 1. Fix nullptr log when accessing emulator GUI settings with extension missing causing signal handler to call stop (it would be better to setup logs before anything else, but here it is a quick fix). 2. Fix VK extension warning: ``` [Render.Vulkan] <Info> vk_platform.cpp:227 CreateInstance: Creating vulkan instance [Render.Vulkan] <Info> vk_platform.cpp:183 operator(): Candidate instance extension VK_EXT_layer_settings is not available [Render.Vulkan] <Info> vk_platform.cpp:270 CreateInstance: Enabled instance extensions: VK_KHR_wayland_surface, VK_KHR_surface, VK_EXT_debug_utils ``` Based on - https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/8760#issuecomment-2447462238 - https://github.com/KhronosGroup/Vulkan-Samples/pull/1366/files#diff-590ca11c17edcf2236215b1326e168d8b2d515f0d4469af2cd22caf6c89b1f13 - https://registry.khronos.org/vulkan/specs/latest/man/html/vkEnumerateInstanceExtensionProperties.html#_description Normal start ``` [Render.Vulkan] <Info> vk_platform.cpp:256 CreateInstance: Creating vulkan instance [Render.Vulkan] <Info> vk_platform.cpp:299 CreateInstance: Enabled instance extensions: VK_KHR_wayland_surface, VK_KHR_surface, VK_EXT_swapchain_colorspace, VK_EXT_debug_utils, VK_EXT_layer_settings [Render.Vulkan] <Info> vk_platform.cpp:300 CreateInstance: Enabled instance layers: VK_LAYER_KHRONOS_validation, VK_LAYER_LUNARG_crash_diagnostic [Render.Vulkan] <Info> vk_instance.cpp:105 Instance: Found 2 physical devices [Render.Vulkan] <Info> vk_instance.cpp:651 CollectDeviceParameters: GPU_Vendor: NVIDIA [Render.Vulkan] <Info> vk_instance.cpp:652 CollectDeviceParameters: GPU_Model: NVIDIA RTX PRO 6000 Blackwell Workstation Edition [Render.Vulkan] <Info> vk_instance.cpp:653 CollectDeviceParameters: GPU_Integrated: No [Render.Vulkan] <Info> vk_instance.cpp:654 CollectDeviceParameters: GPU_Vulkan_Driver: NVIDIA 580.82.9.0 [Render.Vulkan] <Info> vk_instance.cpp:655 CollectDeviceParameters: GPU_Vulkan_Version: 1.4.312 ``` With RenderDoc ``` [Render.Vulkan] <Info> vk_platform.cpp:256 CreateInstance: Creating vulkan instance [Render.Vulkan] <Error> vk_platform.cpp:210 GetInstanceExtensions: Settings for layer VK_LAYER_KHRONOS_validation not available. [Render.Vulkan] <Error> vk_platform.cpp:210 GetInstanceExtensions: Settings for layer VK_LAYER_LUNARG_crash_diagnostic not available. [Render.Vulkan] <Info> vk_platform.cpp:299 CreateInstance: Enabled instance extensions: VK_KHR_xlib_surface, VK_KHR_surface, VK_EXT_swapchain_colorspace, VK_EXT_debug_utils [Render.Vulkan] <Info> vk_platform.cpp:300 CreateInstance: Enabled instance layers: VK_LAYER_KHRONOS_validation, VK_LAYER_LUNARG_crash_diagnostic [Render.Vulkan] <Info> vk_instance.cpp:105 Instance: Found 3 physical devices [Render.Vulkan] <Info> vk_instance.cpp:651 CollectDeviceParameters: GPU_Vendor: NVIDIA [Render.Vulkan] <Info> vk_instance.cpp:652 CollectDeviceParameters: GPU_Model: NVIDIA RTX PRO 6000 Blackwell Workstation Edition [Render.Vulkan] <Info> vk_instance.cpp:653 CollectDeviceParameters: GPU_Integrated: No [Render.Vulkan] <Info> vk_instance.cpp:654 CollectDeviceParameters: GPU_Vulkan_Driver: NVIDIA 580.82.9.0 [Render.Vulkan] <Info> vk_instance.cpp:655 CollectDeviceParameters: GPU_Vulkan_Version: 1.4.0 ``` I am guessing RenderDoc is messing with layer path to not have my VK settings available there The next improvement would be to use vk_layer_settings.txt instead IMO https://vulkan.lunarg.com/doc/sdk/1.4.321.1/windows/layer_configuration.html --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:04:31 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#3658
No description provided.