diff --git a/VulkanTutorial1.0/ComputeAndGraphics.cpp b/VulkanTutorial1.0/ComputeAndGraphics.cpp index f7f6d57..9c52a66 100644 --- a/VulkanTutorial1.0/ComputeAndGraphics.cpp +++ b/VulkanTutorial1.0/ComputeAndGraphics.cpp @@ -637,7 +637,7 @@ void ComputeAndGraphics::createDescriptorSetLayout() { VkDescriptorSetLayoutBinding samplerLayoutBinding = createLayoutBindingInfo(1, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_SHADER_STAGE_FRAGMENT_BIT); - std::array bindings = {uboLayoutBinding, samplerLayoutBinding}; + std::vector bindings = {uboLayoutBinding, samplerLayoutBinding}; VkDescriptorSetLayoutCreateInfo layoutInfo{}; layoutInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; layoutInfo.bindingCount = static_cast(bindings.size()); @@ -655,7 +655,7 @@ void ComputeAndGraphics::createComputeDescriptorSetLayout() { VkDescriptorSetLayoutBinding computeLayoutBinding2 = createLayoutBindingInfo(3, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_SHADER_STAGE_COMPUTE_BIT); - std::array bindings = {uboLayoutBinding, computeLayoutBinding1, computeLayoutBinding2}; + std::vector bindings = {uboLayoutBinding, computeLayoutBinding1, computeLayoutBinding2}; VkDescriptorSetLayoutCreateInfo layoutInfo{}; layoutInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; layoutInfo.bindingCount = static_cast(bindings.size()); @@ -680,8 +680,8 @@ VkDescriptorSetLayoutBinding ComputeAndGraphics::createLayoutBindingInfo(uint32_ void ComputeAndGraphics::createGraphicsPipeline() { - auto vertShaderCode = readFile("shaders/vertComp.spv"); - auto fragShaderCode = readFile("shaders/fragComp.spv"); + auto vertShaderCode = readFile("shaders/VulkanTutorial1.0/ComputeAndGraphics/vertComp.spv"); + auto fragShaderCode = readFile("shaders/VulkanTutorial1.0/ComputeAndGraphics/fragComp.spv"); VkShaderModule vertShaderModule = createShaderModule(vertShaderCode); VkShaderModule fragShaderModule = createShaderModule(fragShaderCode); VkPipelineShaderStageCreateInfo vertShaderStageInfo = createPipelineShaderInfo(VK_SHADER_STAGE_VERTEX_BIT, vertShaderModule); @@ -890,7 +890,7 @@ VkPipelineColorBlendStateCreateInfo ComputeAndGraphics::colorPipelineBlendStateI void ComputeAndGraphics::createComputePipeline() { - auto computeShaderCode = readFile("shaders/compComp.spv"); + auto computeShaderCode = readFile("shaders/VulkanTutorial1.0/ComputeAndGraphics/compComp.spv"); VkShaderModule computeShaderModule = createShaderModule(computeShaderCode); VkPipelineShaderStageCreateInfo computeShaderStageInfo = createPipelineShaderInfo(VK_SHADER_STAGE_COMPUTE_BIT, computeShaderModule);