Skip to content

feat: Filled in basic Graphics Output implementation for Vulkan via SDL3-CS#3048

Open
Feralnex wants to merge 2 commits intostride3d:masterfrom
Feralnex:vulkan-graphics-output-basic-implementation
Open

feat: Filled in basic Graphics Output implementation for Vulkan via SDL3-CS#3048
Feralnex wants to merge 2 commits intostride3d:masterfrom
Feralnex:vulkan-graphics-output-basic-implementation

Conversation

@Feralnex
Copy link
Contributor

@Feralnex Feralnex commented Feb 2, 2026

PR Details

Filled in basic Graphics Output implementation for Vulkan API via SDL3-CS. In general Vulkan doesn't expose current display mode or bounds of the display or even native handle to the monitor like in DXGI. In the end I've managed to implement a trick to achieve that.

The trick is to create hidden window on each display that SDL3 returns and create on each one of them a hidden window. Then to determine if GPU can render to specific display a surface needs to be created for Vulkan to render to and check if it supports rendering to that window on this display and if it does then also fetch supported formats while at it. Afterwards all is cleaned up of course.

I could use Silk.Net.SDL but current version lacks details about Numerator and Denominator of the Refresh Rate when it comes to display modes.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

Comment on lines +53 to +54
// Vulkan: No DirectX-style feature-level restrictions.
// We ignore targetProfiles.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note that GraphicsProfile is not a DX concept (it is not FeatureLevel, even though it follows a similar naming), but a Stride concept. It was used more in the past when we had to support D3D 9, OpenGL ES, D3D 10, etc., as some of those did not support certain output formats, or some combinations of parameters.

If the Vulkan implementation supports all GraphicsProfiles, I'd say so without referencing Direct3D feature levels, to avoid confusion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fully agree so I updated method documentation and comment

@Feralnex
Copy link
Contributor Author

Feralnex commented Feb 4, 2026

After merging this PR I'll update Vortice.Vulkan to newest version. My prayers have been answered..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants