Commit 05ae1d46 authored by Marek Olšák's avatar Marek Olšák Committed by Emil Velikov
Browse files

radeonsi: prevent a negative buffer offset in si_upload_descriptors

(cherry picked from commit 16856a1e)
parent 3d4383f1
...@@ -161,11 +161,10 @@ static bool si_upload_descriptors(struct si_context *sctx, ...@@ -161,11 +161,10 @@ static bool si_upload_descriptors(struct si_context *sctx,
} }
uint32_t *ptr; uint32_t *ptr;
int buffer_offset; unsigned buffer_offset;
u_upload_alloc(sctx->b.b.const_uploader, 0, upload_size, u_upload_alloc(sctx->b.b.const_uploader, first_slot_offset, upload_size,
si_optimal_tcc_alignment(sctx, upload_size), si_optimal_tcc_alignment(sctx, upload_size),
(unsigned*)&buffer_offset, &buffer_offset, (struct pipe_resource**)&desc->buffer,
(struct pipe_resource**)&desc->buffer,
(void**)&ptr); (void**)&ptr);
if (!desc->buffer) { if (!desc->buffer) {
desc->gpu_address = 0; desc->gpu_address = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment