Skip to content

Commit

Permalink
layers: Fix VUID from 1.3.269
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-lunarg committed Oct 24, 2023
1 parent 5cc2c48 commit d8bcd52
Show file tree
Hide file tree
Showing 13 changed files with 98 additions and 120 deletions.
68 changes: 34 additions & 34 deletions layers/core_checks/cc_cmd_buffer_dynamic.cpp

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions layers/core_checks/cc_drawdispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ struct DispatchVuidsCmdDraw : DrawDispatchVuid {
set_color_blend_enable_08657 = "VUID-vkCmdDraw-None-08657";
set_color_blend_equation_08658 = "VUID-vkCmdDraw-None-08658";
set_color_write_mask_08659 = "VUID-vkCmdDraw-None-08659";
set_blend_operation_advance_09416 = "VUID-vkCmdDraw-rasterizerDiscardEnable-09416";
set_rasterization_streams_08660 = "VUID-vkCmdDraw-None-08660";
set_conservative_rasterization_mode_08661 = "VUID-vkCmdDraw-None-08661";
set_extra_primitive_overestimation_size_08662 = "VUID-vkCmdDraw-None-08662";
Expand Down Expand Up @@ -488,6 +489,7 @@ struct DispatchVuidsCmdDrawMultiEXT : DrawDispatchVuid {
set_color_blend_enable_08657 = "VUID-vkCmdDrawMultiEXT-None-08657";
set_color_blend_equation_08658 = "VUID-vkCmdDrawMultiEXT-None-08658";
set_color_write_mask_08659 = "VUID-vkCmdDrawMultiEXT-None-08659";
set_blend_operation_advance_09416 = "VUID-vkCmdDrawMultiEXT-rasterizerDiscardEnable-09416";
set_rasterization_streams_08660 = "VUID-vkCmdDrawMultiEXT-None-08660";
set_conservative_rasterization_mode_08661 = "VUID-vkCmdDrawMultiEXT-None-08661";
set_extra_primitive_overestimation_size_08662 = "VUID-vkCmdDrawMultiEXT-None-08662";
Expand Down Expand Up @@ -769,6 +771,7 @@ struct DispatchVuidsCmdDrawIndexed : DrawDispatchVuid {
set_color_blend_enable_08657 = "VUID-vkCmdDrawIndexed-None-08657";
set_color_blend_equation_08658 = "VUID-vkCmdDrawIndexed-None-08658";
set_color_write_mask_08659 = "VUID-vkCmdDrawIndexed-None-08659";
set_blend_operation_advance_09416 = "VUID-vkCmdDrawIndexed-rasterizerDiscardEnable-09416";
set_rasterization_streams_08660 = "VUID-vkCmdDrawIndexed-None-08660";
set_conservative_rasterization_mode_08661 = "VUID-vkCmdDrawIndexed-None-08661";
set_extra_primitive_overestimation_size_08662 = "VUID-vkCmdDrawIndexed-None-08662";
Expand Down Expand Up @@ -1050,6 +1053,7 @@ struct DispatchVuidsCmdDrawMultiIndexedEXT : DrawDispatchVuid {
set_color_blend_enable_08657 = "VUID-vkCmdDrawMultiIndexedEXT-None-08657";
set_color_blend_equation_08658 = "VUID-vkCmdDrawMultiIndexedEXT-None-08658";
set_color_write_mask_08659 = "VUID-vkCmdDrawMultiIndexedEXT-None-08659";
set_blend_operation_advance_09416 = "VUID-vkCmdDrawMultiIndexedEXT-rasterizerDiscardEnable-09416";
set_rasterization_streams_08660 = "VUID-vkCmdDrawMultiIndexedEXT-None-08660";
set_conservative_rasterization_mode_08661 = "VUID-vkCmdDrawMultiIndexedEXT-None-08661";
set_extra_primitive_overestimation_size_08662 = "VUID-vkCmdDrawMultiIndexedEXT-None-08662";
Expand Down Expand Up @@ -1332,6 +1336,7 @@ struct DispatchVuidsCmdDrawIndirect : DrawDispatchVuid {
set_color_blend_enable_08657 = "VUID-vkCmdDrawIndirect-None-08657";
set_color_blend_equation_08658 = "VUID-vkCmdDrawIndirect-None-08658";
set_color_write_mask_08659 = "VUID-vkCmdDrawIndirect-None-08659";
set_blend_operation_advance_09416 = "VUID-vkCmdDrawIndirect-rasterizerDiscardEnable-09416";
set_rasterization_streams_08660 = "VUID-vkCmdDrawIndirect-None-08660";
set_conservative_rasterization_mode_08661 = "VUID-vkCmdDrawIndirect-None-08661";
set_extra_primitive_overestimation_size_08662 = "VUID-vkCmdDrawIndirect-None-08662";
Expand Down Expand Up @@ -1615,6 +1620,7 @@ struct DispatchVuidsCmdDrawIndexedIndirect : DrawDispatchVuid {
set_color_blend_enable_08657 = "VUID-vkCmdDrawIndexedIndirect-None-08657";
set_color_blend_equation_08658 = "VUID-vkCmdDrawIndexedIndirect-None-08658";
set_color_write_mask_08659 = "VUID-vkCmdDrawIndexedIndirect-None-08659";
set_blend_operation_advance_09416 = "VUID-vkCmdDrawIndexedIndirect-rasterizerDiscardEnable-09416";
set_rasterization_streams_08660 = "VUID-vkCmdDrawIndexedIndirect-None-08660";
set_conservative_rasterization_mode_08661 = "VUID-vkCmdDrawIndexedIndirect-None-08661";
set_extra_primitive_overestimation_size_08662 = "VUID-vkCmdDrawIndexedIndirect-None-08662";
Expand Down Expand Up @@ -1986,6 +1992,7 @@ struct DispatchVuidsCmdDrawIndirectCount : DrawDispatchVuid {
set_color_blend_enable_08657 = "VUID-vkCmdDrawIndirectCount-None-08657";
set_color_blend_equation_08658 = "VUID-vkCmdDrawIndirectCount-None-08658";
set_color_write_mask_08659 = "VUID-vkCmdDrawIndirectCount-None-08659";
set_blend_operation_advance_09416 = "VUID-vkCmdDrawIndirectCount-rasterizerDiscardEnable-09416";
set_rasterization_streams_08660 = "VUID-vkCmdDrawIndirectCount-None-08660";
set_conservative_rasterization_mode_08661 = "VUID-vkCmdDrawIndirectCount-None-08661";
set_extra_primitive_overestimation_size_08662 = "VUID-vkCmdDrawIndirectCount-None-08662";
Expand Down Expand Up @@ -2272,6 +2279,7 @@ struct DispatchVuidsCmdDrawIndexedIndirectCount : DrawDispatchVuid {
set_color_blend_enable_08657 = "VUID-vkCmdDrawIndexedIndirectCount-None-08657";
set_color_blend_equation_08658 = "VUID-vkCmdDrawIndexedIndirectCount-None-08658";
set_color_write_mask_08659 = "VUID-vkCmdDrawIndexedIndirectCount-None-08659";
set_blend_operation_advance_09416 = "VUID-vkCmdDrawIndexedIndirectCount-rasterizerDiscardEnable-09416";
set_rasterization_streams_08660 = "VUID-vkCmdDrawIndexedIndirectCount-None-08660";
set_conservative_rasterization_mode_08661 = "VUID-vkCmdDrawIndexedIndirectCount-None-08661";
set_extra_primitive_overestimation_size_08662 = "VUID-vkCmdDrawIndexedIndirectCount-None-08662";
Expand Down Expand Up @@ -2714,6 +2722,7 @@ struct DispatchVuidsCmdDrawMeshTasksNV: DrawDispatchVuid {
set_color_blend_enable_08657 = "VUID-vkCmdDrawMeshTasksNV-None-08657";
set_color_blend_equation_08658 = "VUID-vkCmdDrawMeshTasksNV-None-08658";
set_color_write_mask_08659 = "VUID-vkCmdDrawMeshTasksNV-None-08659";
set_blend_operation_advance_09416 = "VUID-vkCmdDrawMeshTasksNV-rasterizerDiscardEnable-09416";
set_rasterization_streams_08660 = "VUID-vkCmdDrawMeshTasksNV-None-08660";
set_conservative_rasterization_mode_08661 = "VUID-vkCmdDrawMeshTasksNV-None-08661";
set_extra_primitive_overestimation_size_08662 = "VUID-vkCmdDrawMeshTasksNV-None-08662";
Expand Down Expand Up @@ -2981,6 +2990,7 @@ struct DispatchVuidsCmdDrawMeshTasksIndirectNV: DrawDispatchVuid {
set_color_blend_enable_08657 = "VUID-vkCmdDrawMeshTasksIndirectNV-None-08657";
set_color_blend_equation_08658 = "VUID-vkCmdDrawMeshTasksIndirectNV-None-08658";
set_color_write_mask_08659 = "VUID-vkCmdDrawMeshTasksIndirectNV-None-08659";
set_blend_operation_advance_09416 = "VUID-vkCmdDrawMeshTasksIndirectNV-rasterizerDiscardEnable-09416";
set_rasterization_streams_08660 = "VUID-vkCmdDrawMeshTasksIndirectNV-None-08660";
set_conservative_rasterization_mode_08661 = "VUID-vkCmdDrawMeshTasksIndirectNV-None-08661";
set_extra_primitive_overestimation_size_08662 = "VUID-vkCmdDrawMeshTasksIndirectNV-None-08662";
Expand Down Expand Up @@ -3251,6 +3261,7 @@ struct DispatchVuidsCmdDrawMeshTasksIndirectCountNV : DrawDispatchVuid {
set_color_blend_enable_08657 = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08657";
set_color_blend_equation_08658 = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08658";
set_color_write_mask_08659 = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08659";
set_blend_operation_advance_09416 = "VUID-vkCmdDrawMeshTasksIndirectCountNV-rasterizerDiscardEnable-09416";
set_rasterization_streams_08660 = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08660";
set_conservative_rasterization_mode_08661 = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08661";
set_extra_primitive_overestimation_size_08662 = "VUID-vkCmdDrawMeshTasksIndirectCountNV-None-08662";
Expand Down Expand Up @@ -3515,6 +3526,7 @@ struct DispatchVuidsCmdDrawMeshTasksEXT: DrawDispatchVuid {
set_color_blend_enable_08657 = "VUID-vkCmdDrawMeshTasksEXT-None-08657";
set_color_blend_equation_08658 = "VUID-vkCmdDrawMeshTasksEXT-None-08658";
set_color_write_mask_08659 = "VUID-vkCmdDrawMeshTasksEXT-None-08659";
set_blend_operation_advance_09416 = "VUID-vkCmdDrawMeshTasksEXT-rasterizerDiscardEnable-09416";
set_rasterization_streams_08660 = "VUID-vkCmdDrawMeshTasksEXT-None-08660";
set_conservative_rasterization_mode_08661 = "VUID-vkCmdDrawMeshTasksEXT-None-08661";
set_extra_primitive_overestimation_size_08662 = "VUID-vkCmdDrawMeshTasksEXT-None-08662";
Expand Down Expand Up @@ -3782,6 +3794,7 @@ struct DispatchVuidsCmdDrawMeshTasksIndirectEXT: DrawDispatchVuid {
set_color_blend_enable_08657 = "VUID-vkCmdDrawMeshTasksIndirectEXT-None-08657";
set_color_blend_equation_08658 = "VUID-vkCmdDrawMeshTasksIndirectEXT-None-08658";
set_color_write_mask_08659 = "VUID-vkCmdDrawMeshTasksIndirectEXT-None-08659";
set_blend_operation_advance_09416 = "VUID-vkCmdDrawMeshTasksIndirectEXT-rasterizerDiscardEnable-09416";
set_rasterization_streams_08660 = "VUID-vkCmdDrawMeshTasksIndirectEXT-None-08660";
set_conservative_rasterization_mode_08661 = "VUID-vkCmdDrawMeshTasksIndirectEXT-None-08661";
set_extra_primitive_overestimation_size_08662 = "VUID-vkCmdDrawMeshTasksIndirectEXT-None-08662";
Expand Down Expand Up @@ -4052,6 +4065,7 @@ struct DispatchVuidsCmdDrawMeshTasksIndirectCountEXT : DrawDispatchVuid {
set_color_blend_enable_08657 = "VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08657";
set_color_blend_equation_08658 = "VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08658";
set_color_write_mask_08659 = "VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08659";
set_blend_operation_advance_09416 = "VUID-vkCmdDrawMeshTasksIndirectCountEXT-rasterizerDiscardEnable-09416";
set_rasterization_streams_08660 = "VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08660";
set_conservative_rasterization_mode_08661 = "VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08661";
set_extra_primitive_overestimation_size_08662 = "VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-08662";
Expand Down Expand Up @@ -4328,6 +4342,7 @@ struct DispatchVuidsCmdDrawIndirectByteCountEXT: DrawDispatchVuid {
set_color_blend_enable_08657 = "VUID-vkCmdDrawIndirectByteCountEXT-None-08657";
set_color_blend_equation_08658 = "VUID-vkCmdDrawIndirectByteCountEXT-None-08658";
set_color_write_mask_08659 = "VUID-vkCmdDrawIndirectByteCountEXT-None-08659";
set_blend_operation_advance_09416 = "VUID-vkCmdDrawIndirectByteCountEXT-rasterizerDiscardEnable-09416";
set_rasterization_streams_08660 = "VUID-vkCmdDrawIndirectByteCountEXT-None-08660";
set_conservative_rasterization_mode_08661 = "VUID-vkCmdDrawIndirectByteCountEXT-None-08661";
set_extra_primitive_overestimation_size_08662 = "VUID-vkCmdDrawIndirectByteCountEXT-None-08662";
Expand Down
15 changes: 3 additions & 12 deletions layers/core_checks/cc_pipeline_graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,9 @@ bool CoreChecks::ValidateGraphicsPipeline(const PIPELINE_STATE &pipeline, const
safe_VkSubpassDescription2 *subpass_desc = nullptr;

const auto &rp_state = pipeline.RenderPassState();
if (pipeline.IsRenderPassStateRequired()) {
if (!rp_state) {
const char *vuid = nullptr;
if (!IsExtEnabled(device_extensions.vk_khr_dynamic_rendering)) {
vuid = "VUID-VkGraphicsPipelineCreateInfo-renderPass-06575";
} else if (!enabled_features.dynamicRendering) {
vuid = "VUID-VkGraphicsPipelineCreateInfo-dynamicRendering-06576";
}
if (vuid) {
skip |= LogError(vuid, device, create_info_loc, "requires a valid renderPass, but one was not provided");
}
}
if (!rp_state && pipeline.IsRenderPassStateRequired() && !enabled_features.dynamicRendering) {
skip |= LogError("VUID-VkGraphicsPipelineCreateInfo-dynamicRendering-06576", device, create_info_loc,
"requires a valid renderPass, but one was not provided");
}

const auto subpass = pipeline.Subpass();
Expand Down
4 changes: 3 additions & 1 deletion layers/core_checks/cc_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ bool CoreChecks::ValidateQueryPoolWasReset(const QUERY_POOL_STATE &query_pool_st
continue;
}
if (query_pool_state.GetQueryState(i, 0u) == QUERYSTATE_UNKNOWN) {
skip |= LogError(kVUID_Core_QueryPool_NotReset, query_pool_state.pool(), loc.dot(Field::queryPool),
const char *vuid = loc.function == Func::vkGetQueryPoolResults ? "VUID-vkGetQueryPoolResults-None-09401"
: "VUID-vkCmdCopyQueryPoolResults-None-09402";
skip |= LogError(vuid, query_pool_state.pool(), loc.dot(Field::queryPool),
"%s and query %" PRIu32
": query not reset. After query pool creation, each query must be reset before it is used. Queries "
"must also be reset between uses.",
Expand Down
4 changes: 2 additions & 2 deletions layers/core_checks/cc_render_pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4326,7 +4326,7 @@ bool CoreChecks::PreCallValidateCreateFramebuffer(VkDevice device, const VkFrame

if (!b_has_non_zero_view_masks && layer_count != 1) {
LogObjectList objlist(pCreateInfo->renderPass, image_views[i], ivci.image);
skip |= LogError("VUID-VkFramebufferCreateInfo-renderPass-02747", objlist, attachment_loc,
skip |= LogError("VUID-VkFramebufferCreateInfo-renderPass-02746", objlist, attachment_loc,
"has a layer count (%" PRIu32
") not equal to 1 but renderPass (%s) was not specified with non-zero view masks.",
layer_count, FormatHandle(pCreateInfo->renderPass).c_str());
Expand Down Expand Up @@ -4372,7 +4372,7 @@ bool CoreChecks::PreCallValidateCreateFramebuffer(VkDevice device, const VkFrame
if (view_state->normalized_subresource_range.layerCount != 1 &&
!IsExtEnabled(device_extensions.vk_khr_multiview)) {
LogObjectList objlist(pCreateInfo->renderPass, image_views[i], ivci.image);
skip |= LogError("VUID-VkFramebufferCreateInfo-renderPass-02747", objlist, attachment_loc,
skip |= LogError("VUID-VkFramebufferCreateInfo-renderPass-02746", objlist, attachment_loc,
"is referenced by "
"VkRenderPassFragmentDensityMapCreateInfoEXT::fragmentDensityMapAttachment in "
"the pNext chain, but it was create with subresourceRange.layerCount (%" PRIu32
Expand Down
1 change: 1 addition & 0 deletions layers/core_checks/core_validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ struct DrawDispatchVuid {
const char* set_color_blend_enable_08657 = kVUIDUndefined;
const char* set_color_blend_equation_08658 = kVUIDUndefined;
const char* set_color_write_mask_08659 = kVUIDUndefined;
const char* set_blend_operation_advance_09416 = kVUIDUndefined;
const char* set_rasterization_streams_08660 = kVUIDUndefined;
const char* set_conservative_rasterization_mode_08661 = kVUIDUndefined;
const char* set_extra_primitive_overestimation_size_08662 = kVUIDUndefined;
Expand Down
2 changes: 0 additions & 2 deletions layers/error_message/validation_error_enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
[[maybe_unused]] static const char *kVUID_Core_DrawState_InvalidSecondaryCommandBuffer = "UNASSIGNED-CoreValidation-DrawState-InvalidSecondaryCommandBuffer";
[[maybe_unused]] static const char *kVUID_Core_DrawState_QueueForwardProgress = "UNASSIGNED-CoreValidation-DrawState-QueueForwardProgress";
[[maybe_unused]] static const char *kVUID_Core_DrawState_InvalidImageView = "UNASSIGNED-CoreValidation-DrawState-InvalidImageView";
[[maybe_unused]] static const char *kVUID_Core_QueryPool_NotReset = "UNASSIGNED-CoreValidation-QueryPool-NotReset";
[[maybe_unused]] static const char *kVUID_Core_DrawState_BlendOperationAdvanced = "UNASSIGNED-CoreValidation-DrawState-BlendOperationAdvanced";

[[maybe_unused]] static const char *kVUID_Core_Shader_AllowVaryingSubgroupSize = "UNASSIGNED-CoreValidation-Shader-AllowVaryingSubgroupSize";
[[maybe_unused]] static const char *kVUID_Core_Shader_RequireFullSubgroups = "UNASSIGNED-CoreValidation-Shader-RequireFullSubgroups";
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/best_practices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ TEST_F(VkBestPracticesLayerTest, CreatePipelineWithoutRenderPass) {

// This test checks that no BP messages are incorrectly triggered, but triggers core errors
m_errorMonitor->SetUnexpectedError("VUID-VkGraphicsPipelineCreateInfo-renderPass-06603");
m_errorMonitor->SetUnexpectedError("VUID-VkGraphicsPipelineCreateInfo-renderPass-06575");
m_errorMonitor->SetUnexpectedError("VUID-VkGraphicsPipelineCreateInfo-dynamicRendering-06576");

VkShaderObj vs(this, kVertexMinimalGlsl, VK_SHADER_STAGE_VERTEX_BIT);
VkShaderObj fs(this, kFragmentMinimalGlsl, VK_SHADER_STAGE_FRAGMENT_BIT);
Expand Down
Loading

0 comments on commit d8bcd52

Please sign in to comment.