mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 20:00:10 +01:00
pvr: Move descriptor write into pvr_write_descriptor_set()
Moving descriptor write functionality from pvr_UpdateDescriptorSets() into pvr_write_descriptor_set(). This is in preparation for adding descriptor copy support. Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21332>
This commit is contained in:
parent
c660cef599
commit
30b7263419
1 changed files with 96 additions and 92 deletions
|
|
@ -1835,16 +1835,9 @@ static void pvr_descriptor_update_input_attachment(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void pvr_UpdateDescriptorSets(VkDevice _device,
|
static void pvr_write_descriptor_set(struct pvr_device *device,
|
||||||
uint32_t descriptorWriteCount,
|
const VkWriteDescriptorSet *write_set)
|
||||||
const VkWriteDescriptorSet *pDescriptorWrites,
|
|
||||||
uint32_t descriptorCopyCount,
|
|
||||||
const VkCopyDescriptorSet *pDescriptorCopies)
|
|
||||||
{
|
{
|
||||||
PVR_FROM_HANDLE(pvr_device, device, _device);
|
|
||||||
|
|
||||||
for (uint32_t i = 0; i < descriptorWriteCount; i++) {
|
|
||||||
const VkWriteDescriptorSet *write_set = &pDescriptorWrites[i];
|
|
||||||
PVR_FROM_HANDLE(pvr_descriptor_set, set, write_set->dstSet);
|
PVR_FROM_HANDLE(pvr_descriptor_set, set, write_set->dstSet);
|
||||||
uint32_t *map = set->pvr_bo->bo->map;
|
uint32_t *map = set->pvr_bo->bo->map;
|
||||||
const struct pvr_descriptor_set_layout_binding *binding =
|
const struct pvr_descriptor_set_layout_binding *binding =
|
||||||
|
|
@ -1858,7 +1851,7 @@ void pvr_UpdateDescriptorSets(VkDevice _device,
|
||||||
* can skip this update.
|
* can skip this update.
|
||||||
*/
|
*/
|
||||||
if (binding->shader_stage_mask == 0)
|
if (binding->shader_stage_mask == 0)
|
||||||
continue;
|
return;
|
||||||
|
|
||||||
vk_foreach_struct_const (ext, write_set->pNext) {
|
vk_foreach_struct_const (ext, write_set->pNext) {
|
||||||
pvr_debug_ignored_stype(ext->sType);
|
pvr_debug_ignored_stype(ext->sType);
|
||||||
|
|
@ -1934,7 +1927,18 @@ void pvr_UpdateDescriptorSets(VkDevice _device,
|
||||||
unreachable("Unknown descriptor type");
|
unreachable("Unknown descriptor type");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void pvr_UpdateDescriptorSets(VkDevice _device,
|
||||||
|
uint32_t descriptorWriteCount,
|
||||||
|
const VkWriteDescriptorSet *pDescriptorWrites,
|
||||||
|
uint32_t descriptorCopyCount,
|
||||||
|
const VkCopyDescriptorSet *pDescriptorCopies)
|
||||||
|
{
|
||||||
|
PVR_FROM_HANDLE(pvr_device, device, _device);
|
||||||
|
|
||||||
|
for (uint32_t i = 0; i < descriptorWriteCount; i++)
|
||||||
|
pvr_write_descriptor_set(device, &pDescriptorWrites[i]);
|
||||||
|
|
||||||
if (descriptorCopyCount > 0)
|
if (descriptorCopyCount > 0)
|
||||||
pvr_finishme("Descriptor copying support missing\n");
|
pvr_finishme("Descriptor copying support missing\n");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue