feat(vulkan): re-enable GPU-Assisted Validation #19
1 changed files with 14 additions and 20 deletions
feat(vulkan): re-enable GPU-Assisted Validation
The GPU-AV enable list was removed to dodge a crash in SDK 1.4.341, whose GPU-AV null-deref'd on descriptor_heap pipelines (VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, layout = VK_NULL_HANDLE) in PipelineSubState::GetPipelineLayoutUnion: https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/12103 That was fixed in the next SDK release. The validation layer is now 1.4.350 (> 1.4.341), so restore VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT in the VkValidationFeaturesEXT enable list. Verified by running the HelloUI example (which draws through the descriptor_heap compute pipelines) with the layer active: it renders the full UI for the entire run with GPU-AV reporting "Both GPU Assisted Validation and Normal Core Check Validation are enabled" and no descriptor-heap null-deref or VUID errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
commit
e7469133e8
|
|
@ -432,30 +432,24 @@ void Device::Initialize() {
|
||||||
app.pEngineName = "Crafter.Graphics";
|
app.pEngineName = "Crafter.Graphics";
|
||||||
app.apiVersion = VK_MAKE_VERSION(1, 4, 0);
|
app.apiVersion = VK_MAKE_VERSION(1, 4, 0);
|
||||||
|
|
||||||
// TODO(re-enable GPU-AV): once Vulkan SDK > 1.4.341 is the floor.
|
// GPU-Assisted Validation: shader-execution-time instrumentation that
|
||||||
|
// catches out-of-bounds descriptor / buffer access the standard layer
|
||||||
|
// can't see. Opt-in via the enable list below.
|
||||||
//
|
//
|
||||||
// GPU-Assisted Validation is opt-in via the enable list — leaving it
|
// This was previously disabled to work around a bug in SDK 1.4.341's
|
||||||
// out disables it. SDK 1.4.341's GPU-AV does not handle
|
// GPU-AV, which null-deref'd on descriptor_heap pipelines
|
||||||
// descriptor_heap pipelines (VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT
|
// (VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT with layout =
|
||||||
// with layout = VK_NULL_HANDLE): `PipelineSubState::GetPipelineLayoutUnion`
|
// VK_NULL_HANDLE) in `PipelineSubState::GetPipelineLayoutUnion`:
|
||||||
// null-derefs on the first dispatch/draw against such a pipeline.
|
|
||||||
//
|
|
||||||
// Tracked + fixed upstream:
|
|
||||||
// https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/12103
|
// https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/12103
|
||||||
// Per spencer-lunarg (LunarG): broken in 1.4.341, fixed and landing
|
// Per spencer-lunarg (LunarG) that was fixed in the next SDK release.
|
||||||
// in the next SDK release. Once we bump our Vulkan-Headers / SDK
|
// The validation layer is now 1.4.350 (> 1.4.341), so re-enable it.
|
||||||
// dependency past 1.4.341, restore the original enable list:
|
VkValidationFeatureEnableEXT enabledValidationFeatures[] = {
|
||||||
//
|
VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT,
|
||||||
// VkValidationFeatureEnableEXT enables[] = {
|
};
|
||||||
// VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT
|
|
||||||
// };
|
|
||||||
// validationFeatures.enabledValidationFeatureCount = 1;
|
|
||||||
// validationFeatures.pEnabledValidationFeatures = enables;
|
|
||||||
//
|
|
||||||
// Standard validation (the layer itself) is still on; only the GPU-AV
|
|
||||||
// out-of-bounds / shader-instrumentation checks are temporarily off.
|
|
||||||
VkValidationFeaturesEXT validationFeatures = {
|
VkValidationFeaturesEXT validationFeatures = {
|
||||||
.sType = VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT,
|
.sType = VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT,
|
||||||
|
.enabledValidationFeatureCount = sizeof(enabledValidationFeatures) / sizeof(enabledValidationFeatures[0]),
|
||||||
|
.pEnabledValidationFeatures = enabledValidationFeatures,
|
||||||
};
|
};
|
||||||
|
|
||||||
VkInstanceCreateInfo instanceCreateInfo = {};
|
VkInstanceCreateInfo instanceCreateInfo = {};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue