MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / createDescriptorSetLayout

Method createDescriptorSetLayout

src/Renderer/vkRenderer.cpp:415–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413}
414
415void vkRenderer::createDescriptorSetLayout() {
416 VkDescriptorSetLayoutBinding uboLayoutBinding = {};
417 uboLayoutBinding.binding = 0;
418 uboLayoutBinding.descriptorCount = 1;
419 uboLayoutBinding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
420 uboLayoutBinding.pImmutableSamplers = nullptr;
421 uboLayoutBinding.stageFlags = VK_SHADER_STAGE_VERTEX_BIT;
422
423 VkDescriptorSetLayoutCreateInfo layoutInfo = {};
424 layoutInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
425 layoutInfo.bindingCount = 1;
426 layoutInfo.pBindings = &uboLayoutBinding;
427
428 if (vkCreateDescriptorSetLayout(device, &layoutInfo, nullptr, &descriptorSetLayout) != VK_SUCCESS) {
429 throw std::runtime_error("failed to create descriptor set layout!");
430 }
431}
432
433void vkRenderer::createGraphicsPipeline() {
434 auto vertShaderCode = readFile("../shaders/vk/shader.vert.spv");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected