aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-09-11 06:02:53 +0100
committerDave Airlie <[email protected]>2017-09-11 23:55:15 +0100
commit6cc545b2128f3ddfb4963b820350f0e9585557f4 (patch)
tree7d83671b2ca6d14effe1a6a881be9b00bf1e0595
parent1dbcfd2941753b37490d4bbc0d45d289b4988b11 (diff)
radv: use upload_data to upload push descriptors.
This is just a reusing code. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
-rw-r--r--src/amd/vulkan/radv_cmd_buffer.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 39383b0dbe4..4e133d1f255 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -1383,18 +1383,15 @@ static void
radv_flush_push_descriptors(struct radv_cmd_buffer *cmd_buffer)
{
struct radv_descriptor_set *set = &cmd_buffer->push_descriptors.set;
- uint32_t *ptr = NULL;
unsigned bo_offset;
- if (!radv_cmd_buffer_upload_alloc(cmd_buffer, set->size, 32,
- &bo_offset,
- (void**) &ptr))
+ if (!radv_cmd_buffer_upload_data(cmd_buffer, set->size, 32,
+ set->mapped_ptr,
+ &bo_offset))
return;
set->va = cmd_buffer->device->ws->buffer_get_va(cmd_buffer->upload.upload_bo);
set->va += bo_offset;
-
- memcpy(ptr, set->mapped_ptr, set->size);
}
static void