Repository navigation
feat(vulkan): expose the WSI surface kind to add-ons - #15
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add-ons can now tell which window system a Vulkan swap chain presents to. The layer stores the surface kind (win32, wayland, xcb, xlib) as swap chain private data before
init_swapchain, under a public GUID in the newinclude/reshade_api_wsi.hpp:swapchain::get_hwnd()still returns the native window (wl_surface*on Wayland).Why
vkAutoHDR (https://github.com/TheForgotten69/vk-autoHDR) needs this to:
wp_color_management_surface_feedback_v1), which is only valid on Wayland surfaces;Guessing from the
hwndpointer is not reliable. Inside gamescope, for example, xcb swap chains still get scRGB.Changes
include/reshade_api_wsi.hpp:surface_kindenum andsurface_kind_guid.vulkan_hooks.hpp: the internalvulkan_wsi_kindis now an alias of the public enum, so the values cannot drift.vulkan_hooks_swapchain.cpp: oneset_private_datacall beforeinit_swapchain.Testing
build-linuxand ran the vkAutoHDR headless gamescope smoke suite (hdr, hdroff, xcb, nopumbo, wlnocm): all pass.kwin_wayland --virtualwith the NVIDIA 615 and RADV drivers: the add-on readswaylandand engages.