aboutsummaryrefslogtreecommitdiff
path: root/layers
diff options
context:
space:
mode:
authorChris Forbes <chrisf@ijw.co.nz>2018-04-15 18:31:06 -0700
committerChris Forbes <chrisf@ijw.co.nz>2018-04-17 14:30:49 -0700
commit7ea6c8637ba179b6f34f2e513dcf5d38d52b4f4e (patch)
tree9c5679b2f18c3fc8b8fce546d8218d86fd4e6aeb /layers
parent2f1dbdbfe2b8adac45ff00df12a7bfb308070952 (diff)
downloadusermoji-7ea6c8637ba179b6f34f2e513dcf5d38d52b4f4e.tar.xz
layers: Validate subpass dependency access vs stage masks
Diffstat (limited to 'layers')
-rw-r--r--layers/core_validation.cpp23
-rw-r--r--layers/vk_validation_error_database.txt4
2 files changed, 21 insertions, 6 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index b9860852..a798cc62 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -9167,10 +9167,25 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderP
// ValidateLayouts.
skip |= ValidateRenderpassAttachmentUsage(dev_data, pCreateInfo);
for (uint32_t i = 0; i < pCreateInfo->dependencyCount; ++i) {
- skip |= ValidateStageMaskGsTsEnables(dev_data, pCreateInfo->pDependencies[i].srcStageMask, "vkCreateRenderPass()",
- VALIDATION_ERROR_13e006b8, VALIDATION_ERROR_13e006bc);
- skip |= ValidateStageMaskGsTsEnables(dev_data, pCreateInfo->pDependencies[i].dstStageMask, "vkCreateRenderPass()",
- VALIDATION_ERROR_13e006ba, VALIDATION_ERROR_13e006be);
+ auto const &dependency = pCreateInfo->pDependencies[i];
+ skip |= ValidateStageMaskGsTsEnables(dev_data, dependency.srcStageMask, "vkCreateRenderPass()", VALIDATION_ERROR_13e006b8,
+ VALIDATION_ERROR_13e006bc);
+ skip |= ValidateStageMaskGsTsEnables(dev_data, dependency.dstStageMask, "vkCreateRenderPass()", VALIDATION_ERROR_13e006ba,
+ VALIDATION_ERROR_13e006be);
+
+ if (!ValidateAccessMaskPipelineStage(dependency.srcAccessMask, dependency.srcStageMask)) {
+ skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0,
+ VALIDATION_ERROR_13e006c8,
+ "CreateRenderPass: pDependencies[%u].srcAccessMask (0x%X) is not supported by srcStageMask (0x%X).", i,
+ dependency.srcAccessMask, dependency.srcStageMask);
+ }
+
+ if (!ValidateAccessMaskPipelineStage(dependency.dstAccessMask, dependency.dstStageMask)) {
+ skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0,
+ VALIDATION_ERROR_13e006ca,
+ "CreateRenderPass: pDependencies[%u].dstAccessMask (0x%X) is not supported by dstStageMask (0x%X).", i,
+ dependency.dstAccessMask, dependency.dstStageMask);
+ }
}
if (!skip) {
skip |= ValidateLayouts(dev_data, device, pCreateInfo);
diff --git a/layers/vk_validation_error_database.txt b/layers/vk_validation_error_database.txt
index 10c2e2aa..5f06ea34 100644
--- a/layers/vk_validation_error_database.txt
+++ b/layers/vk_validation_error_database.txt
@@ -1410,8 +1410,8 @@ VALIDATION_ERROR_13e006c0~^~N~^~Unknown~^~VkSubpassDependency~^~VUID-VkSubpassDe
VALIDATION_ERROR_13e006c2~^~N~^~Unknown~^~VkSubpassDependency~^~VUID-VkSubpassDependency-srcSubpass-00865~^~core~^~The spec valid usage text states 'srcSubpass and dstSubpass must not both be equal to VK_SUBPASS_EXTERNAL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDependency-srcSubpass-00865)~^~
VALIDATION_ERROR_13e006c4~^~N~^~Unknown~^~VkSubpassDependency~^~VUID-VkSubpassDependency-srcSubpass-00866~^~core~^~The spec valid usage text states 'If srcSubpass is equal to dstSubpass, srcStageMask and dstStageMask must only contain one of VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT, VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT, VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT, VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, or VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDependency-srcSubpass-00866)~^~
VALIDATION_ERROR_13e006c6~^~N~^~Unknown~^~VkSubpassDependency~^~VUID-VkSubpassDependency-srcSubpass-00867~^~core~^~The spec valid usage text states 'If srcSubpass is equal to dstSubpass and not all of the stages in srcStageMask and dstStageMask are framebuffer-space stages, the logically latest pipeline stage in srcStageMask must be logically earlier than or equal to the logically earliest pipeline stage in dstStageMask' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDependency-srcSubpass-00867)~^~
-VALIDATION_ERROR_13e006c8~^~N~^~Unknown~^~VkSubpassDependency~^~VUID-VkSubpassDependency-srcAccessMask-00868~^~core~^~The spec valid usage text states 'Any access flag included in srcAccessMask must be supported by one of the pipeline stages in srcStageMask, as specified in the table of supported access types.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDependency-srcAccessMask-00868)~^~
-VALIDATION_ERROR_13e006ca~^~N~^~Unknown~^~VkSubpassDependency~^~VUID-VkSubpassDependency-dstAccessMask-00869~^~core~^~The spec valid usage text states 'Any access flag included in dstAccessMask must be supported by one of the pipeline stages in dstStageMask, as specified in the table of supported access types.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDependency-dstAccessMask-00869)~^~
+VALIDATION_ERROR_13e006c8~^~Y~^~Unknown~^~VkSubpassDependency~^~VUID-VkSubpassDependency-srcAccessMask-00868~^~core~^~The spec valid usage text states 'Any access flag included in srcAccessMask must be supported by one of the pipeline stages in srcStageMask, as specified in the table of supported access types.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDependency-srcAccessMask-00868)~^~
+VALIDATION_ERROR_13e006ca~^~Y~^~Unknown~^~VkSubpassDependency~^~VUID-VkSubpassDependency-dstAccessMask-00869~^~core~^~The spec valid usage text states 'Any access flag included in dstAccessMask must be supported by one of the pipeline stages in dstStageMask, as specified in the table of supported access types.' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkSubpassDependency-dstAccessMask-00869)~^~
VALIDATION_ERROR_13e006cc~^~N~^~Unknown~^~VkSubpassDependency~^~VUID-VkSubpassDependency-dependencyFlags-00870~^~(VK_VERSION_1_1,VK_KHR_multiview)~^~The spec valid usage text states 'If dependencyFlags includes VK_DEPENDENCY_VIEW_LOCAL_BIT, then both srcSubpass and dstSubpass must not equal VK_SUBPASS_EXTERNAL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSubpassDependency-dependencyFlags-00870)~^~
VALIDATION_ERROR_13e006ce~^~N~^~Unknown~^~VkSubpassDependency~^~VUID-VkSubpassDependency-dependencyFlags-00871~^~(VK_VERSION_1_1,VK_KHR_multiview)~^~The spec valid usage text states 'If dependencyFlags includes VK_DEPENDENCY_VIEW_LOCAL_BIT, then the render pass must have multiview enabled' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSubpassDependency-dependencyFlags-00871)~^~
VALIDATION_ERROR_13e006d0~^~N~^~Unknown~^~VkSubpassDependency~^~VUID-VkSubpassDependency-srcSubpass-00872~^~(VK_VERSION_1_1,VK_KHR_multiview)~^~The spec valid usage text states 'If srcSubpass equals dstSubpass and that subpass has more than one bit set in the view mask, then dependencyFlags must include VK_DEPENDENCY_VIEW_LOCAL_BIT' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkSubpassDependency-srcSubpass-00872)~^~