diff options
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_atom_constbuf.c | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c index 3b5031dcf20..30bffa648c5 100644 --- a/src/mesa/state_tracker/st_atom_constbuf.c +++ b/src/mesa/state_tracker/st_atom_constbuf.c @@ -248,7 +248,7 @@ static void st_bind_ubos(struct st_context *st, if (!shader) return; - for (i = 0; i < shader->NumUniformBlocks; i++) { + for (i = 0; i < shader->Program->info.num_ubos; i++) { struct gl_uniform_buffer_binding *binding; struct st_buffer_object *st_obj; diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index df7a1bc0cfe..99422df7f74 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -6302,9 +6302,7 @@ st_translate_program( } if (program->shader) { - unsigned num_ubos = program->shader->NumUniformBlocks; - - for (i = 0; i < num_ubos; i++) { + for (i = 0; i < proginfo->info.num_ubos; i++) { unsigned size = program->shader->UniformBlocks[i]->UniformBufferSize; unsigned num_const_vecs = (size + 15) / 16; unsigned first, last; @@ -6646,7 +6644,7 @@ set_affected_state_flags(uint64_t *states, if (shader->NumImages) *states |= new_images; - if (shader->NumUniformBlocks) + if (prog->info.num_ubos) *states |= new_ubos; if (shader->NumShaderStorageBlocks) |