Code cleanup
This commit is contained in:
parent
91ab6a517f
commit
afde90dcfd
3 changed files with 9 additions and 6 deletions
|
|
@ -335,7 +335,7 @@ public:
|
|||
vkEndCommandBuffer(compute.commandBuffer);
|
||||
}
|
||||
|
||||
void setupDescriptorSets()
|
||||
void setupDescriptors()
|
||||
{
|
||||
// Pool
|
||||
std::vector<VkDescriptorPoolSize> poolSizes = {
|
||||
|
|
@ -744,7 +744,7 @@ public:
|
|||
VulkanExampleBase::prepare();
|
||||
loadAssets();
|
||||
prepareBuffers();
|
||||
setupDescriptorSets();
|
||||
setupDescriptors();
|
||||
preparePipelines();
|
||||
prepareCompute();
|
||||
buildCommandBuffers();
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ public:
|
|||
}
|
||||
|
||||
// [POI] Set up descriptor sets and set layout
|
||||
void setupDescriptorSets()
|
||||
void setupDescriptors()
|
||||
{
|
||||
// Descriptor pool
|
||||
std::vector<VkDescriptorPoolSize> poolSizes = {
|
||||
|
|
@ -403,7 +403,7 @@ public:
|
|||
generateTextures();
|
||||
generateCubes();
|
||||
prepareUniformBuffers();
|
||||
setupDescriptorSets();
|
||||
setupDescriptors();
|
||||
preparePipelines();
|
||||
buildCommandBuffers();
|
||||
prepared = true;
|
||||
|
|
|
|||
|
|
@ -181,12 +181,15 @@ public:
|
|||
descriptorLayoutCI.pBindings = setLayoutBindings.data();
|
||||
VK_CHECK_RESULT(vkCreateDescriptorSetLayout(device, &descriptorLayoutCI, nullptr, &descriptorSetLayout));
|
||||
|
||||
VkPipelineLayoutCreateInfo pipelineLayoutCI = vks::initializers::pipelineLayoutCreateInfo(&descriptorSetLayout, 1);
|
||||
VK_CHECK_RESULT(vkCreatePipelineLayout(device, &pipelineLayoutCI, nullptr, &pipelineLayout));
|
||||
}
|
||||
|
||||
void preparePipelines()
|
||||
{
|
||||
// Layout
|
||||
VkPipelineLayoutCreateInfo pipelineLayoutCI = vks::initializers::pipelineLayoutCreateInfo(&descriptorSetLayout, 1);
|
||||
VK_CHECK_RESULT(vkCreatePipelineLayout(device, &pipelineLayoutCI, nullptr, &pipelineLayout));
|
||||
|
||||
// Pipeline
|
||||
VkPipelineInputAssemblyStateCreateInfo inputAssemblyStateCI = vks::initializers::pipelineInputAssemblyStateCreateInfo(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, 0, VK_FALSE);
|
||||
VkPipelineRasterizationStateCreateInfo rasterizationStateCI = vks::initializers::pipelineRasterizationStateCreateInfo(VK_POLYGON_MODE_FILL, VK_CULL_MODE_BACK_BIT, VK_FRONT_FACE_COUNTER_CLOCKWISE, 0);
|
||||
VkPipelineColorBlendAttachmentState blendAttachmentState = vks::initializers::pipelineColorBlendAttachmentState(0xf, VK_FALSE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue