layers: Adjust SC to validate bulk pipeline creation
Previously we passed `count` down to the validator and then dropped it
on the floor, ignoring anything other than pipeline 0.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Courtney Goeltzenleuchter <courtney@lunarg.com>
diff --git a/layers/shader_checker.cpp b/layers/shader_checker.cpp
index 94b3984..a8bfaed 100644
--- a/layers/shader_checker.cpp
+++ b/layers/shader_checker.cpp
@@ -887,9 +887,8 @@
};
-//TODO handle count > 1
static bool
-validate_graphics_pipeline(VkDevice dev, uint32_t count, VkGraphicsPipelineCreateInfo const *pCreateInfo)
+validate_graphics_pipeline(VkDevice dev, VkGraphicsPipelineCreateInfo const *pCreateInfo)
{
/* We seem to allow pipeline stages to be specified out of order, so collect and identify them
* before trying to do anything more: */
@@ -969,7 +968,10 @@
const VkGraphicsPipelineCreateInfo *pCreateInfos,
VkPipeline *pPipelines)
{
- bool pass = validate_graphics_pipeline(device, count, pCreateInfos);
+ bool pass = true;
+ for (uint32_t i = 0; i < count; i++) {
+ pass = validate_graphics_pipeline(device, &pCreateInfos[i]) && pass;
+ }
if (pass) {
/* The driver is allowed to crash if passed junk. Only actually create the