From e0c711ad6b60885004d99b211f4f3387ad85926f Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Tue, 27 Oct 2015 11:32:31 -0600 Subject: [PATCH] misc: Remove dynamic array definititions Windows doesn't like dynamicly sized arrays. Replace with new'd array of objects or object pointers instead. --- layers/shader_checker.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layers/shader_checker.cpp b/layers/shader_checker.cpp index aae2813..64feaf0 100644 --- a/layers/shader_checker.cpp +++ b/layers/shader_checker.cpp @@ -1056,8 +1056,8 @@ validate_graphics_pipeline(VkDevice dev, VkGraphicsPipelineCreateInfo const *pCr int geometry_stage = get_shader_stage_id(VK_SHADER_STAGE_GEOMETRY_BIT); int fragment_stage = get_shader_stage_id(VK_SHADER_STAGE_FRAGMENT_BIT); - shader_module const *shaders[fragment_stage + 1]; /* exclude CS */ - memset(shaders, 0, sizeof(shaders)); + shader_module **shaders = new shader_module*[fragment_stage + 1]; /* exclude CS */ + memset(shaders, 0, sizeof(shader_module *) * (fragment_stage +1)); render_pass const *rp = 0; VkPipelineVertexInputStateCreateInfo const *vi = 0; bool pass = true; @@ -1145,6 +1145,8 @@ validate_graphics_pipeline(VkDevice dev, VkGraphicsPipelineCreateInfo const *pCr pass = validate_fs_outputs_against_render_pass(dev, shaders[fragment_stage], rp, pCreateInfo->subpass) && pass; } + delete shaders; + loader_platform_thread_unlock_mutex(&globalLock); return pass; } -- 2.7.4