c/render: Tidy compute rendering

This commit is contained in:
Jakob Bornecrantz 2021-09-25 15:45:11 +01:00
parent f74812f02e
commit d8a580d875
2 changed files with 10 additions and 32 deletions

View file

@ -474,7 +474,7 @@ comp_rendering_compute_init(struct comp_compositor *c, struct comp_resources *r,
vk, //
r->compute.descriptor_pool, // descriptor_pool
r->compute.descriptor_set_layout, // descriptor_set_layout
&crc->clear_descriptor_set)); // descriptor_set
&crc->descriptor_set)); // descriptor_set
return true;
}
@ -510,7 +510,7 @@ comp_rendering_compute_close(struct comp_rendering_compute *crc)
destroy_command_buffer(vk, crc->cmd);
// Reclaimed by vkResetDescriptorPool.
crc->clear_descriptor_set = VK_NULL_HANDLE;
crc->descriptor_set = VK_NULL_HANDLE;
vk->vkResetDescriptorPool(vk->device, crc->r->compute.descriptor_pool, 0);
@ -606,7 +606,7 @@ comp_rendering_compute_projection_timewarp(struct comp_rendering_compute *crc,
r->compute.ubo_binding, //
r->compute.ubo.buffer, //
VK_WHOLE_SIZE, //
crc->clear_descriptor_set); //
crc->descriptor_set); //
vk->vkCmdBindPipeline( //
crc->cmd, // commandBuffer
@ -619,7 +619,7 @@ comp_rendering_compute_projection_timewarp(struct comp_rendering_compute *crc,
r->compute.pipeline_layout, // layout
0, // firstSet
1, // descriptorSetCount
&crc->clear_descriptor_set, // pDescriptorSets
&crc->descriptor_set, // pDescriptorSets
0, // dynamicOffsetCount
NULL); // pDynamicOffsets
@ -726,7 +726,7 @@ comp_rendering_compute_projection(struct comp_rendering_compute *crc,
r->compute.ubo_binding, //
r->compute.ubo.buffer, //
VK_WHOLE_SIZE, //
crc->clear_descriptor_set); //
crc->descriptor_set); //
vk->vkCmdBindPipeline( //
crc->cmd, // commandBuffer
@ -739,7 +739,7 @@ comp_rendering_compute_projection(struct comp_rendering_compute *crc,
r->compute.pipeline_layout, // layout
0, // firstSet
1, // descriptorSetCount
&crc->clear_descriptor_set, // pDescriptorSets
&crc->descriptor_set, // pDescriptorSets
0, // dynamicOffsetCount
NULL); // pDynamicOffsets
@ -849,7 +849,7 @@ comp_rendering_compute_clear(struct comp_rendering_compute *crc, //
r->compute.ubo_binding, //
r->compute.ubo.buffer, //
VK_WHOLE_SIZE, //
crc->clear_descriptor_set); //
crc->descriptor_set); //
vk->vkCmdBindPipeline( //
crc->cmd, // commandBuffer
@ -862,7 +862,7 @@ comp_rendering_compute_clear(struct comp_rendering_compute *crc, //
r->compute.pipeline_layout, // layout
0, // firstSet
1, // descriptorSetCount
&crc->clear_descriptor_set, // pDescriptorSets
&crc->descriptor_set, // pDescriptorSets
0, // dynamicOffsetCount
NULL); // pDynamicOffsets

View file

@ -469,30 +469,8 @@ struct comp_rendering_compute
//! Command buffer where all commands are recorded.
VkCommandBuffer cmd;
//! Clear descriptor set.
VkDescriptorSet clear_descriptor_set;
#if 0
struct
{
//! The data for this target.
struct comp_target_data data;
//! Image view we are targeting, not owned by the rendering.
VkImageView image_view;
} targets[2];
//! Number of different targets, number of views are always two.
uint32_t num_targets;
#endif
struct
{
int temp;
} view;
//! The current view we are "rendering" to.
uint32_t current_view;
//! Shared descriptor set between clear, projection and timewarp.
VkDescriptorSet descriptor_set;
};
struct comp_rendering_compute_data