vrend: fix next ubo id when there is no update

When there is no change to UBOs of a shader stage, we still need to
increment next_ubo_id to match bind_ubo_locs.  This was regressed by
commit 2192c92 (renderer: only update dirty constbufs).

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Chia-I Wu 6 years ago
parent d5a10f07be
commit 424fdb4ab6
  1. 2
      src/vrend_renderer.c

@ -3862,7 +3862,7 @@ static int vrend_draw_bind_ubo_shader(struct vrend_context *ctx,
update = dirty & ctx->sub->const_bufs_used_mask[shader_type];
if (!update)
return next_ubo_id;
return next_ubo_id + util_bitcount(mask);
while (mask) {
/* The const_bufs_used_mask stores the gallium uniform buffer indices */

Loading…
Cancel
Save