mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
vc4: Fix UBO allocation when no uniforms are used.
We do rely on a real BO getting allocated, so make sure we ask for a non-zero size.
This commit is contained in:
parent
db8712bcbc
commit
427f934f9e
1 changed files with 2 additions and 1 deletions
|
|
@ -606,7 +606,8 @@ vc4_get_uniform_bo(struct vc4_context *vc4, struct vc4_shader_state *shader,
|
|||
uint32_t *out_offset)
|
||||
{
|
||||
struct vc4_shader_uniform_info *uinfo = &shader->uniforms[shader_index];
|
||||
struct vc4_bo *ubo = vc4_bo_alloc(vc4->screen, uinfo->count * 4, "ubo");
|
||||
struct vc4_bo *ubo = vc4_bo_alloc(vc4->screen,
|
||||
MAX2(1, uinfo->count * 4), "ubo");
|
||||
uint32_t *map = vc4_bo_map(ubo);
|
||||
|
||||
for (int i = 0; i < uinfo->count; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue