diff options
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_program.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_program.c b/src/gallium/drivers/freedreno/a6xx/fd6_program.c index 9888e51f86e..3603d800f04 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_program.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_program.c @@ -285,6 +285,19 @@ setup_stages(struct fd6_program_state *state, struct stage *s, bool binning_pass 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 |