Destroy shader modules after graphics pipeline has been created (Refs #277)
This commit is contained in:
parent
72af67420d
commit
5f797ec2cb
1 changed files with 6 additions and 2 deletions
|
|
@ -932,7 +932,7 @@ public:
|
||||||
vertexInputBinding.inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
|
vertexInputBinding.inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
|
||||||
|
|
||||||
// Inpute attribute bindings describe shader attribute locations and memory layouts
|
// Inpute attribute bindings describe shader attribute locations and memory layouts
|
||||||
std::array<VkVertexInputAttributeDescription,2> vertexInputAttributs;
|
std::array<VkVertexInputAttributeDescription, 2> vertexInputAttributs;
|
||||||
// These match the following shader layout (see triangle.vert):
|
// These match the following shader layout (see triangle.vert):
|
||||||
// layout (location = 0) in vec3 inPos;
|
// layout (location = 0) in vec3 inPos;
|
||||||
// layout (location = 1) in vec3 inColor;
|
// layout (location = 1) in vec3 inColor;
|
||||||
|
|
@ -997,6 +997,10 @@ public:
|
||||||
|
|
||||||
// Create rendering pipeline using the specified states
|
// Create rendering pipeline using the specified states
|
||||||
VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCreateInfo, nullptr, &pipeline));
|
VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCreateInfo, nullptr, &pipeline));
|
||||||
|
|
||||||
|
// Shader modules are no longer needed once the graphics pipeline has been created
|
||||||
|
vkDestroyShaderModule(device, shaderStages[0].module, nullptr);
|
||||||
|
vkDestroyShaderModule(device, shaderStages[1].module, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void prepareUniformBuffers()
|
void prepareUniformBuffers()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue