mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
nvk: CmdPushDescriptorSetWithTemplateKHR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
parent
1944af3260
commit
fd70fcd62b
3 changed files with 45 additions and 0 deletions
|
|
@ -460,3 +460,26 @@ nvk_cmd_buffer_dump(struct nvk_cmd_buffer *cmd, FILE *fp)
|
|||
vk_push_print(fp, &push, &dev->pdev->info);
|
||||
}
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL
|
||||
nvk_CmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer,
|
||||
VkDescriptorUpdateTemplate _template,
|
||||
VkPipelineLayout _layout,
|
||||
uint32_t set,
|
||||
const void *pData)
|
||||
{
|
||||
VK_FROM_HANDLE(nvk_cmd_buffer, cmd, commandBuffer);
|
||||
VK_FROM_HANDLE(vk_descriptor_update_template, template, _template);
|
||||
VK_FROM_HANDLE(vk_pipeline_layout, pipeline_layout, _layout);
|
||||
|
||||
struct nvk_push_descriptor_set *push_set =
|
||||
nvk_cmd_push_descriptors(cmd, template->bind_point, set);
|
||||
if (unlikely(push_set == NULL))
|
||||
return;
|
||||
|
||||
struct nvk_descriptor_set_layout *set_layout =
|
||||
vk_to_nvk_descriptor_set_layout(pipeline_layout->set_layouts[set]);
|
||||
|
||||
nvk_push_descriptor_set_update_template(push_set, set_layout,
|
||||
template, pData);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -640,3 +640,17 @@ nvk_UpdateDescriptorSetWithTemplate(VkDevice device,
|
|||
|
||||
nvk_descriptor_set_write_template(set, template, pData);
|
||||
}
|
||||
|
||||
void
|
||||
nvk_push_descriptor_set_update_template(
|
||||
struct nvk_push_descriptor_set *push_set,
|
||||
struct nvk_descriptor_set_layout *layout,
|
||||
const struct vk_descriptor_update_template *template,
|
||||
const void *data)
|
||||
{
|
||||
struct nvk_descriptor_set tmp_set = {
|
||||
.layout = layout,
|
||||
.mapped_ptr = push_set->data,
|
||||
};
|
||||
nvk_descriptor_set_write_template(&tmp_set, template, data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include "nvk_private.h"
|
||||
|
||||
#include "nouveau_bo.h"
|
||||
#include "nvk_device.h"
|
||||
#include "vulkan/runtime/vk_object.h"
|
||||
#include "vulkan/runtime/vk_descriptor_update_template.h"
|
||||
|
||||
|
|
@ -76,4 +77,11 @@ nvk_push_descriptor_set_update(struct nvk_push_descriptor_set *push_set,
|
|||
uint32_t write_count,
|
||||
const VkWriteDescriptorSet *writes);
|
||||
|
||||
void
|
||||
nvk_push_descriptor_set_update_template(
|
||||
struct nvk_push_descriptor_set *push_set,
|
||||
struct nvk_descriptor_set_layout *layout,
|
||||
const struct vk_descriptor_update_template *template,
|
||||
const void *data);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue