Skip to content

gallium/u_upload_mgr: lower risk of hitting an assert

The assert(size < INT32_MAX / 2) can be triggered by large uploads.

Since we know that the caller of u_upload_alloc_buffer will consume min_size bytes, we can init buffer_private_refcount to a much smaller value.

Fixes: ccf9ef36 ("gallium/u_upload_mgr: eliminate all atomics for the upload buffer")

Closes: #4235 (closed)

Edited by Pierre-Eric Pelloux-Prayer

Merge request reports