summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-12-22 00:56:48 -0500
committerRob Clark <[email protected]>2016-12-27 16:54:01 -0500
commit859cb24d94f3b0b7f8f0e98642ff4b92b1f7f2f1 (patch)
treeaad49c7394ec4f5be10444f42983f5a7b460eee0 /src/gallium
parentd6545f234593fb00d02fdc07f9b2a803d2b569f6 (diff)
ttn: set ->info->num_ubos
For dealing w/ 32b vs 64b gpu addresses, I need to rework how we pass UBO buffer addresses to shader, and knowing up front the # of UBOs is useful. But I noticed ttn wasn't setting this. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/nir/tgsi_to_nir.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c
index f50a5a6c0b4..c7afe960f94 100644
--- a/src/gallium/auxiliary/nir/tgsi_to_nir.c
+++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c
@@ -314,8 +314,11 @@ ttn_emit_declaration(struct ttn_compile *c)
file == TGSI_FILE_CONSTANT);
/* nothing to do for UBOs: */
- if ((file == TGSI_FILE_CONSTANT) && decl->Declaration.Dimension)
+ if ((file == TGSI_FILE_CONSTANT) && decl->Declaration.Dimension) {
+ b->shader->info->num_ubos =
+ MAX2(b->shader->info->num_ubos, decl->Dim.Index2D);
return;
+ }
if ((file == TGSI_FILE_INPUT) || (file == TGSI_FILE_OUTPUT)) {
is_array = (is_array && decl->Declaration.Array &&