diff options
Diffstat (limited to 'src/mesa/state_tracker/st_glsl_to_tgsi.cpp')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 99422df7f74..393d66820d8 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -6301,16 +6301,14 @@ st_translate_program( } } - if (program->shader) { - 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; - assert(num_const_vecs > 0); - first = 0; - last = num_const_vecs > 0 ? num_const_vecs - 1 : 0; - ureg_DECL_constant2D(t->ureg, first, last, i + 1); - } + for (i = 0; i < proginfo->info.num_ubos; i++) { + unsigned size = proginfo->sh.UniformBlocks[i]->UniformBufferSize; + unsigned num_const_vecs = (size + 15) / 16; + unsigned first, last; + assert(num_const_vecs > 0); + first = 0; + last = num_const_vecs > 0 ? num_const_vecs - 1 : 0; + ureg_DECL_constant2D(t->ureg, first, last, i + 1); } /* Emit immediate values. |