Make repo working again
I rewrote basically all pipeline specific code to make it more customizable. I made it work, which is insane. I never thought I would be able to go back to working state again.
This commit is contained in:
1 parent
bd05c03a12
commit
9cb692344f
11 files changed
+62
-80
No files matched your search
@@ -400,6 +400,28 @@ rse_err_t descriptor_get_vkhandle(struct descriptor_set_handle_t* descriptor_set
|
||||
return RSE_ERROR_NO_ERROR;
|
||||
}
|
||||
|
||||
rse_err_t descriptor_attach_image(struct graphics_context_t* context, struct descriptor_set_handle_t* descriptor_set_handle, uint16_t texture_id, VkSampler sampler, uint32_t binding)
|
||||
{
|
||||
VkDescriptorImageInfo image_info = {0};
|
||||
VkWriteDescriptorSet write_set = {0};
|
||||
|
||||
image_info.sampler = sampler;
|
||||
image_info.imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
|
||||
image_info.imageView = context->texture_images[texture_id].image_view;
|
||||
|
||||
write_set.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
|
||||
write_set.pImageInfo = &image_info;
|
||||
write_set.dstSet = descriptor_set_handle->descriptor_sets;
|
||||
write_set.dstBinding = binding;
|
||||
write_set.dstArrayElement = 0U;
|
||||
write_set.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; //TODO: Maybe not only samplers?
|
||||
write_set.descriptorCount = 1;
|
||||
|
||||
vkUpdateDescriptorSets(context->device, 1U, &write_set, 0, NULL);
|
||||
|
||||
return RSE_ERROR_NO_ERROR;
|
||||
}
|
||||
|
||||
rse_err_t descriptor_attach_buffer(struct graphics_context_t* context, struct descriptor_set_handle_t* descriptor_set_handle, struct vulkan_buffer_t* buffer, uint32_t binding, VkDescriptorType type)
|
||||
{
|
||||
VkDescriptorBufferInfo buffer_info = {0};
|
||||
|
||||
Reference in new issue
Block a user