aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2017-03-01 14:16:17 -0700
committerMark Lobodzinski <mark@lunarg.com>2017-03-13 16:02:59 -0600
commita4cb5d8d993b9e81f0cb2cca7e2e570fa787b21c (patch)
treef6029f0f45ac8a4506e83382ee04a306e886475b
parent30d58922251a62b7d06b7d1382b8ac5afb03fc25 (diff)
downloadusermoji-a4cb5d8d993b9e81f0cb2cca7e2e570fa787b21c.tar.xz
layers: Validate depthClamp device feature
Change-Id: I61a1c8511b2b142ddf178fbf74654aaad80964bf
-rw-r--r--layers/core_validation.cpp9
-rw-r--r--layers/vk_validation_error_database.txt2
2 files changed, 10 insertions, 1 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 5a2d4d89..49b0b4bc 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -3240,6 +3240,15 @@ static bool verifyPipelineCreateState(layer_data *dev_data, std::vector<PIPELINE
pPipeline->graphicsPipelineCI.pRasterizationState->lineWidth);
}
+ if ((pPipeline->graphicsPipelineCI.pRasterizationState->depthClampEnable == VK_TRUE) &&
+ (!dev_data->enabled_features.depthClamp)) {
+ skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0,
+ __LINE__, VALIDATION_ERROR_01455, "DS",
+ "vkCreateGraphicsPipelines(): the depthClamp device feature is disabled: the depthClampEnable "
+ "member of the VkPipelineRasterizationStateCreateInfo structure must be set to VK_FALSE. %s",
+ validation_error_map[VALIDATION_ERROR_01455]);
+ }
+
// If rasterization is enabled...
if (pPipeline->graphicsPipelineCI.pRasterizationState->rasterizerDiscardEnable == VK_FALSE) {
auto subpass_desc = renderPass ? &renderPass->createInfo.pSubpasses[pPipeline->graphicsPipelineCI.subpass] : nullptr;
diff --git a/layers/vk_validation_error_database.txt b/layers/vk_validation_error_database.txt
index 01269bb5..dfab0dfd 100644
--- a/layers/vk_validation_error_database.txt
+++ b/layers/vk_validation_error_database.txt
@@ -1440,7 +1440,7 @@ VALIDATION_ERROR_01451~^~Y~^~ViewportAndScissorBoundsChecking~^~vkCmdSetViewport
VALIDATION_ERROR_01452~^~Y~^~ViewportAndScissorBoundsChecking~^~vkCmdSetViewport~^~For more information refer to Vulkan Spec Section '23.5. Controlling the Viewport' which states 'y + height must be less than or equal to viewportBoundsRange[1]' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkViewport)~^~
VALIDATION_ERROR_01453~^~N~^~Unknown~^~vkCmdSetViewport~^~For more information refer to Vulkan Spec Section '23.5. Controlling the Viewport' which states 'minDepth must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkViewport)~^~
VALIDATION_ERROR_01454~^~N~^~Unknown~^~vkCmdSetViewport~^~For more information refer to Vulkan Spec Section '23.5. Controlling the Viewport' which states 'maxDepth must be between 0.0 and 1.0, inclusive' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkViewport)~^~
-VALIDATION_ERROR_01455~^~N~^~Unknown~^~vkCmdSetViewport~^~For more information refer to Vulkan Spec Section '24. Rasterization' which states 'If the depth clamping feature is not enabled, depthClampEnable must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkPipelineRasterizationStateCreateInfo)~^~
+VALIDATION_ERROR_01455~^~Y~^~None~^~vkCmdSetViewport~^~For more information refer to Vulkan Spec Section '24. Rasterization' which states 'If the depth clamping feature is not enabled, depthClampEnable must be VK_FALSE' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkPipelineRasterizationStateCreateInfo)~^~
VALIDATION_ERROR_01456~^~N~^~Unknown~^~vkCmdSetViewport~^~For more information refer to Vulkan Spec Section '24. Rasterization' which states 'If the non-solid fill modes feature is not enabled, polygonMode must be VK_POLYGON_MODE_FILL' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkPipelineRasterizationStateCreateInfo)~^~
VALIDATION_ERROR_01457~^~N~^~Unknown~^~vkCmdSetViewport~^~For more information refer to Vulkan Spec Section '24. Rasterization' which states 'sType must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkPipelineRasterizationStateCreateInfo)~^~implicit, TBD in parameter validation layer.
VALIDATION_ERROR_01458~^~N~^~Unknown~^~vkCmdSetViewport~^~For more information refer to Vulkan Spec Section '24. Rasterization' which states 'pNext must be NULL, or a pointer to a valid instance of VkPipelineRasterizationStateRasterizationOrderAMD' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkPipelineRasterizationStateCreateInfo)~^~implicit, TBD in parameter validation layer.