| 413 | } |
| 414 | |
| 415 | void 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 | |
| 433 | void vkRenderer::createGraphicsPipeline() { |
| 434 | auto vertShaderCode = readFile("../shaders/vk/shader.vert.spv"); |
nothing calls this directly
no outgoing calls
no test coverage detected