aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisf@ijw.co.nz>2015-07-24 13:53:47 +1200
committerChris Forbes <chrisf@ijw.co.nz>2015-07-27 13:13:21 +1200
commitb0b768d09c6df78575b60e61fd2eb457243edea0 (patch)
tree904a58d353a5467aabc6eb84d8d2294e3a3d8c16
parent284e66eb6475ffe309431a0ee7b636497bd92b11 (diff)
downloadusermoji-b0b768d09c6df78575b60e61fd2eb457243edea0.tar.xz
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>
-rw-r--r--layers/shader_checker.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/layers/shader_checker.cpp b/layers/shader_checker.cpp
index 94b39845..a8bfaed0 100644
--- a/layers/shader_checker.cpp
+++ b/layers/shader_checker.cpp
@@ -887,9 +887,8 @@ shader_stage_attribs[VK_SHADER_STAGE_FRAGMENT + 1] = {
};
-//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 @@ vkCreateGraphicsPipelines(VkDevice device,
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