#238: Fixes the "num samples mismatch" error being shown incorrectly for subpasses...
authorDominik Witczak <Dominik.Witczak@amd.com>
Fri, 1 Apr 2016 11:19:49 +0000 (13:19 +0200)
committerTobin Ehlis <tobine@google.com>
Fri, 1 Apr 2016 20:30:10 +0000 (14:30 -0600)
layers/core_validation.cpp

index be85127e2ad1c188c6665ef6bbb57df25d995972..c400b432d3a96a1b4884e82b21ead847e78ebf5d 100644 (file)
@@ -3372,7 +3372,8 @@ static VkBool32 validatePipelineState(layer_data *my_data, const GLOBAL_CB_NODE
                         subpassNumSamples = (VkSampleCountFlagBits)-1;
                 }
 
-                if (psoNumSamples != subpassNumSamples) {
+                if ((pSD->colorAttachmentCount > 0 || pSD->pDepthStencilAttachment) &&
+                    psoNumSamples != 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