aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorMark Young <marky@lunarg.com>2016-03-31 16:03:20 -0600
committerTobin Ehlis <tobine@google.com>2016-03-31 16:33:59 -0600
commit5b3a88f563bd9fc8f76b15bbfee7a12842ab04a3 (patch)
treed6332967f782cc2b7f4664ff8fe22acbafac1c65 /layers/core_validation.cpp
parent27d5956706f35ec88865a7e37f1363d588d4d2e3 (diff)
downloadusermoji-5b3a88f563bd9fc8f76b15bbfee7a12842ab04a3.tar.xz
layers: Fix layer_validation_tests errors and update new message
Update the error message returned for the new color/blend attachment compare, and fix tests Tobin discovered were triggering early on the new error check. Change-Id: I43c99a7db651632efde46a1ae17b5bfb4f424a78
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 7235fd5e..e7ff9c5e 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -3396,6 +3396,7 @@ static VkSampleCountFlagBits getNumSamples(layer_data *my_data, const VkPipeline
// Validate state related to the PSO
static VkBool32 validatePipelineState(layer_data *my_data, const GLOBAL_CB_NODE *pCB, const VkPipelineBindPoint pipelineBindPoint,
const VkPipeline pipeline) {
+ VkBool32 skipCall = VK_FALSE;
if (VK_PIPELINE_BIND_POINT_GRAPHICS == pipelineBindPoint) {
// Verify that any MSAA request in PSO matches sample# in bound FB
// Skip the check if rasterization is disabled.
@@ -3410,11 +3411,11 @@ static VkBool32 validatePipelineState(layer_data *my_data, const GLOBAL_CB_NODE
uint32_t i;
if (pPipeline->cbStateCI.attachmentCount != pSD->colorAttachmentCount) {
- return log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT,
- reinterpret_cast<const uint64_t &>(pipeline), __LINE__, DRAWSTATE_INVALID_RENDERPASS, "DS",
- "Render pass subpass %u mismatch between blend state attachment count %u and "
- "sub-pass color attachment count %u! These must be the same.",
- pCB->activeSubpass, pPipeline->cbStateCI.attachmentCount, pSD->colorAttachmentCount);
+ skipCall |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT,
+ reinterpret_cast<const uint64_t &>(pipeline), __LINE__, DRAWSTATE_INVALID_RENDERPASS, "DS",
+ "Mismatch between blend state attachment count %u and subpass %u color attachment "
+ "count %u! These must be the same.",
+ pPipeline->cbStateCI.attachmentCount, pCB->activeSubpass, pSD->colorAttachmentCount);
}
for (i = 0; i < pSD->colorAttachmentCount; i++) {
@@ -3440,11 +3441,11 @@ static VkBool32 validatePipelineState(layer_data *my_data, const GLOBAL_CB_NODE
}
if (psoNumSamples != subpassNumSamples) {
- return log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT,
- (uint64_t)pipeline, __LINE__, DRAWSTATE_NUM_SAMPLES_MISMATCH, "DS",
- "Num samples mismatch! Binding PSO (%#" PRIxLEAST64
- ") with %u samples while current RenderPass (%#" PRIxLEAST64 ") w/ %u samples!",
- (uint64_t)pipeline, psoNumSamples, (uint64_t)pCB->activeRenderPass, subpassNumSamples);
+ skipCall |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT,
+ (uint64_t)pipeline, __LINE__, DRAWSTATE_NUM_SAMPLES_MISMATCH, "DS",
+ "Num samples mismatch! Binding PSO (%#" PRIxLEAST64
+ ") with %u samples while current RenderPass (%#" PRIxLEAST64 ") w/ %u samples!",
+ (uint64_t)pipeline, psoNumSamples, (uint64_t)pCB->activeRenderPass, subpassNumSamples);
}
} else {
// TODO : I believe it's an error if we reach this point and don't have an activeRenderPass
@@ -3455,7 +3456,7 @@ static VkBool32 validatePipelineState(layer_data *my_data, const GLOBAL_CB_NODE
} else {
// TODO : Validate non-gfx pipeline updates
}
- return VK_FALSE;
+ return skipCall;
}
// Block of code at start here specifically for managing/tracking DSs