mesa/st: fix number of ubos being declared in a shader
authorRoland Scheidegger <sroland@vmware.com>
Wed, 14 May 2014 19:06:23 +0000 (21:06 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Thu, 15 May 2014 00:35:25 +0000 (02:35 +0200)
commit3e817e7e56806d8adb8f16c35136045c29908944
treef8083144a13d3c8b642849f9ade0e468c0daaf17
parent9c64cb80d29bb779a99f5a32b0974e8f92e8c902
mesa/st: fix number of ubos being declared in a shader

Previously the code used the total number of ubos being declared in the
linked program (so the ubos of all shaders combined), use the number
from the particular shader instead.
This fixes an assertion failure with piglit arb_uniform_buffer_object-maxblocks
seen in llvmpipe since 8a9f5ecdb116d0449d63f7b94efbfa8b205d826f as it now emits
code for each declared buffer, not just the ones actually used.

CC: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp