Check dynamic state / line rasterization feature support during sample init #1145
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.
Description
This PR adds feature checks to the following samples prior to Vulkan device creation:
rectangularLines
,bresenhamLines
, andsmoothLines
featuresextendedDynamicState2
andextendedDynamicState2PatchControlPoints
featuresextendedDynamicState2
andextendedDynamicState2LogicOp
featuresextendedDynamicState2
andextendedDynamicState2PatchControlPoints
featuresIn addition, for dynamic_line_rasterization, the sample now enables line types individually, and provides feedback to users regarding which types are supported.
Also, for extended_dynamic_state2, the
VK_EXT_primitive_topology_list_restart
extension has been made optional to allow the sample to mostly work on macOS.Tested on Windows 10 and macOS Ventura using an AMD 6600XT GPU with lastest AMD drivers and SDK 1.3.290. The samples no longer crash on Windows 10 when using AMD drivers, and run as per the following:
Windows 10: dynamic_line_rasterization runs with partial lines support; extended_dynamic_state2, logic_op_dynamic_state, and patch_control_points do not run based on lack of feature support, but exit cleanly.
macOS Ventura: extended_dynamic_state2 and patch_control_points run; dynamic_line_rasterization and logic_op_dynamic_state do not run based on lack of feature support, but exit cleanly.
Fixes #1144
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batch
command line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: