aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2017-08-16 13:29:41 -0700
committerChris Forbes <chrisf@ijw.co.nz>2017-08-17 09:49:34 -0700
commit872a5ca25a2f87f98d53fea4699d4f795ada8b23 (patch)
treec8d53d20b7125b63e31d3d72d929b662aaf1075a
parent20ed22faea36c9b5c72a6110dce008b8532b7237 (diff)
downloadusermoji-872a5ca25a2f87f98d53fea4699d4f795ada8b23.tar.xz
layers: Wire up static_status check for CmdSetScissor
-rw-r--r--layers/core_validation.cpp7
-rw-r--r--layers/vk_validation_error_database.txt2
2 files changed, 8 insertions, 1 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index f5df7cec..d65c5576 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -5186,8 +5186,15 @@ VKAPI_ATTR void VKAPI_CALL CmdSetScissor(VkCommandBuffer commandBuffer, uint32_t
if (pCB) {
skip |= ValidateCmdQueueFlags(dev_data, pCB, "vkCmdSetScissor()", VK_QUEUE_GRAPHICS_BIT, VALIDATION_ERROR_1d802415);
skip |= ValidateCmd(dev_data, pCB, CMD_SETSCISSORSTATE, "vkCmdSetScissor()");
+ if (pCB->static_status & CBSTATUS_SCISSOR_SET) {
+ skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
+ HandleToUint64(commandBuffer), __LINE__, VALIDATION_ERROR_1d80049c, "DS",
+ "vkCmdSetScissor(): pipeline was created without VK_DYNAMIC_STATE_SCISSOR flag. %s.",
+ validation_error_map[VALIDATION_ERROR_1d80049c]);
+ }
if (!skip) {
pCB->scissorMask |= ((1u << scissorCount) - 1u) << firstScissor;
+ pCB->status |= CBSTATUS_SCISSOR_SET;
}
}
lock.unlock();
diff --git a/layers/vk_validation_error_database.txt b/layers/vk_validation_error_database.txt
index 02cdbd17..6e96e6c4 100644
--- a/layers/vk_validation_error_database.txt
+++ b/layers/vk_validation_error_database.txt
@@ -2295,7 +2295,7 @@ VALIDATION_ERROR_1d600628~^~N~^~Unknown~^~vkCmdSetLineWidth~^~VUID-vkCmdSetLineW
VALIDATION_ERROR_1d602401~^~Y~^~None~^~vkCmdSetLineWidth~^~VUID-vkCmdSetLineWidth-commandBuffer-parameter~^~core~^~The spec valid usage text states 'commandBuffer must be a valid VkCommandBuffer handle' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetLineWidth-commandBuffer-parameter)~^~implicit
VALIDATION_ERROR_1d602413~^~N~^~Unknown~^~vkCmdSetLineWidth~^~VUID-vkCmdSetLineWidth-commandBuffer-recording~^~core~^~The spec valid usage text states 'commandBuffer must be in the recording state' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetLineWidth-commandBuffer-recording)~^~implicit
VALIDATION_ERROR_1d602415~^~Y~^~Unknown~^~vkCmdSetLineWidth~^~VUID-vkCmdSetLineWidth-commandBuffer-cmdpool~^~core~^~The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetLineWidth-commandBuffer-cmdpool)~^~implicit
-VALIDATION_ERROR_1d80049c~^~N~^~Unknown~^~vkCmdSetScissor~^~VUID-vkCmdSetScissor-None-00590~^~core~^~The spec valid usage text states 'The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetScissor-None-00590)~^~
+VALIDATION_ERROR_1d80049c~^~Y~^~Unknown~^~vkCmdSetScissor~^~VUID-vkCmdSetScissor-None-00590~^~core~^~The spec valid usage text states 'The currently bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_SCISSOR dynamic state enabled' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetScissor-None-00590)~^~
VALIDATION_ERROR_1d80049e~^~N~^~Unknown~^~vkCmdSetScissor~^~VUID-vkCmdSetScissor-firstScissor-00591~^~core~^~The spec valid usage text states 'firstScissor must be less than VkPhysicalDeviceLimits::maxViewports' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetScissor-firstScissor-00591)~^~
VALIDATION_ERROR_1d8004a0~^~N~^~Unknown~^~vkCmdSetScissor~^~VUID-vkCmdSetScissor-firstScissor-00592~^~core~^~The spec valid usage text states 'The sum of firstScissor and scissorCount must be between 1 and VkPhysicalDeviceLimits::maxViewports, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetScissor-firstScissor-00592)~^~
VALIDATION_ERROR_1d8004a2~^~N~^~Unknown~^~vkCmdSetScissor~^~VUID-vkCmdSetScissor-firstScissor-00593~^~core~^~The spec valid usage text states 'If the multiple viewports feature is not enabled, firstScissor must be 0' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetScissor-firstScissor-00593)~^~