This is the number of uniform blocks at linking time, not after
finalizing shaders.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4734>
if (!prog)
return;
- for (i = 0; i < prog->info.num_ubos; i++) {
+ for (i = 0; i < prog->sh.NumUniformBlocks; i++) {
struct gl_buffer_binding *binding;
struct st_buffer_object *st_obj;
struct pipe_transfer *ubo_transfer[PIPE_MAX_CONSTANT_BUFFERS] = {0};
assert(prog->info.num_ubos <= ARRAY_SIZE(ubo_transfer));
- for (unsigned i = 0; i < prog->info.num_ubos; i++) {
+ for (unsigned i = 0; i < prog->sh.NumUniformBlocks; i++) {
struct gl_buffer_binding *binding =
&st->ctx->UniformBufferBindings[prog->sh.UniformBlocks[i]->Binding];
struct st_buffer_object *st_obj = st_buffer_object(binding->BufferObject);