{
VkBool32 skipCall = VK_FALSE;
+ if (pPipeline->graphicsPipelineCI.pColorBlendState != NULL) {
+ if (!my_data->physDevProperties.features.independentBlend) {
+ VkPipelineColorBlendAttachmentState *pAttachments = pPipeline->pAttachments;
+ for (uint i = 1 ; i < pPipeline->attachmentCount ; i++) {
+ if ((pAttachments[0].blendEnable != pAttachments[i].blendEnable) ||
+ (pAttachments[0].srcColorBlendFactor != pAttachments[i].srcColorBlendFactor) ||
+ (pAttachments[0].dstColorBlendFactor != pAttachments[i].dstColorBlendFactor) ||
+ (pAttachments[0].colorBlendOp != pAttachments[i].colorBlendOp) ||
+ (pAttachments[0].srcAlphaBlendFactor != pAttachments[i].srcAlphaBlendFactor) ||
+ (pAttachments[0].dstAlphaBlendFactor != pAttachments[i].dstAlphaBlendFactor) ||
+ (pAttachments[0].alphaBlendOp != pAttachments[i].alphaBlendOp) ||
+ (pAttachments[0].colorWriteMask != pAttachments[i].colorWriteMask)) {
+ skipCall |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT,
+ (VkDebugReportObjectTypeEXT) 0, 0, __LINE__, DRAWSTATE_INDEPENDENT_BLEND, "DS",
+ "Invalid Pipeline CreateInfo: If independent blend feature not enabled, all elements of pAttachments must be identical");
+ }
+ }
+ }
+ if (!my_data->physDevProperties.features.logicOp &&
+ (pPipeline->graphicsPipelineCI.pColorBlendState->logicOpEnable != VK_FALSE)) {
+ skipCall |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT,
+ (VkDebugReportObjectTypeEXT) 0, 0, __LINE__, DRAWSTATE_DISABLED_LOGIC_OP, "DS",
+ "Invalid Pipeline CreateInfo: If logic operations feature not enabled, logicOpEnable must be VK_FALSE");
+ }
+ if ((pPipeline->graphicsPipelineCI.pColorBlendState->logicOpEnable == VK_TRUE) &&
+ (pPipeline->graphicsPipelineCI.pColorBlendState->logicOp < VK_LOGIC_OP_CLEAR) ||
+ (pPipeline->graphicsPipelineCI.pColorBlendState->logicOp > VK_LOGIC_OP_SET)) {
+ skipCall |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT,
+ (VkDebugReportObjectTypeEXT) 0, 0, __LINE__, DRAWSTATE_INVALID_LOGIC_OP, "DS",
+ "Invalid Pipeline CreateInfo: If logicOpEnable is VK_TRUE, logicOp must be a valid VkLogicOp value");
+ }
+ }
+
if (!validate_pipeline_shaders(my_data, device, pPipeline)) {
skipCall = VK_TRUE;
}
// violate device limit
DRAWSTATE_INVALID_STORAGE_BUFFER_OFFSET, // Dynamic Storage Buffer Offsets
// violate device limit
+ DRAWSTATE_INDEPENDENT_BLEND, // If independent blending is not enabled, all
+ // elements of pAttachmentsMustBeIdentical
+ DRAWSTATE_DISABLED_LOGIC_OP, // If logic operations is not enabled, logicOpEnable
+ // must be VK_FALSE
+ DRAWSTATE_INVALID_LOGIC_OP, // If logicOpEnable is VK_TRUE, logicOp must
+ // must be a valid VkLogicOp value
} DRAW_STATE_ERROR;
typedef enum _SHADER_CHECKER_ERROR {
| Live Semaphore | When waiting on a semaphore, need to make sure that the semaphore is live and therefore can be signalled, otherwise queue is stalled and cannot make forward progress. | QUEUE_FORWARD_PROGRESS | vkQueueSubmit vkQueueBindSparse vkQueuePresentKHR vkAcquireNextImageKHR | TODO | Create test |
| Storage Buffer Alignment | Storage Buffer offsets in BindDescriptorSets must agree with offset alignment device limit | INVALID_STORAGE_BUFFER_OFFSET | vkCmdBindDescriptorSets | TODO | Create test |
| Uniform Buffer Alignment | Uniform Buffer offsets in BindDescriptorSets must agree with offset alignment device limit | INVALID_UNIFORM_BUFFER_OFFSET | vkCmdBindDescriptorSets | TODO | Create test |
+| Independent Blending | If independent blending is not enabled, all elements of pAttachments must be identical | INDEPENDENT_BLEND | vkCreateGraphicsPipelines | TODO | Create test |
+| Enabled Logic Operations | If logic operations is not enabled, logicOpEnable must be VK_FALSE | DISABLED_LOGIC_OP | vkCreateGraphicsPipelines | TODO | Create test |
+| Valid Logic Operations | If logicOpEnable is VK_TRUE, logicOp must be a valid VkLogicOp value | VALID_LOGIC_OP | vkCreateGraphicsPipelines | TODO | Create test |
| NA | Enum used for informational messages | NONE | | NA | None |
| NA | Enum used for errors in the layer itself. This does not indicate an app issue, but instead a bug in the layer. | INTERNAL_ERROR | | NA | None |
| NA | Enum used when VK_LAYER_LUNARG_draw_state attempts to allocate memory for its own internal use and is unable to. | OUT_OF_MEMORY | | NA | None |