Since we use same constant state for both binning pass program state and
draw pass state, and it is possible for binning pass shader to use fewer
consts, we need to make sure we program a large enough constlen.
Signed-off-by: Rob Clark <robdclark@chromium.org>
s[i].instrlen = 0;
}
}
+
+ /* since we share the constant state w/ VS we need to make sure
+ * constlen is sufficiently large for full VS, even if the binning
+ * pass shader doesn't use them all
+ */
+ if (binning_pass) {
+ s[VS].constlen = MAX2(s[VS].constlen, align(state->bs->constlen, 4));
+ } else {
+ /* It should be impossible for VS to have smaller constlen than BS
+ * since BS is just a subset of VS.
+ */
+ debug_assert(s[VS].constlen >= state->bs->constlen);
+ }
}
static inline uint32_t