lavapipe: Do not allocate 0 sized buffers for descriptor sets

This will crash the new llvmpipe allocation mechanism.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29408>
This commit is contained in:
Konstantin Seurer
2024-05-05 14:48:11 +02:00
committed by Marge Bot
parent 3d159c02f6
commit 56028a888e
@@ -336,6 +336,8 @@ lvp_descriptor_set_create(struct lvp_device *device,
for (unsigned i = 0; i < layout->binding_count; i++)
bo_size += layout->binding[i].uniform_block_size;
bo_size = MAX2(bo_size, 64);
struct pipe_resource template = {
.bind = PIPE_BIND_CONSTANT_BUFFER,
.screen = device->pscreen,