glsl_to_tgsi: Use {Num}UniformBlocks instead of {Num}BufferInterfaceBlocks
authorIago Toral Quiroga <itoral@igalia.com>
Fri, 16 Oct 2015 09:43:18 +0000 (11:43 +0200)
committerIago Toral Quiroga <itoral@igalia.com>
Mon, 19 Oct 2015 06:20:40 +0000 (08:20 +0200)
The latter holds both UBOs and SSBOs, but here we only want UBOs.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index 06f510db536d6144677bf786ca8bee22d29977b7..f481e8902d88917a2c83067a6434726a118ebe7f 100644 (file)
@@ -5388,10 +5388,10 @@ st_translate_program(
    }
 
    if (program->shader) {
-      unsigned num_ubos = program->shader->NumBufferInterfaceBlocks;
+      unsigned num_ubos = program->shader->NumUniformBlocks;
 
       for (i = 0; i < num_ubos; i++) {
-         unsigned size = program->shader->BufferInterfaceBlocks[i].UniformBufferSize;
+         unsigned size = program->shader->UniformBlocks[i]->UniformBufferSize;
          unsigned num_const_vecs = (size + 15) / 16;
          unsigned first, last;
          assert(num_const_vecs > 0);