freedreno/a6xx: make sure binning pass constlen is large enough
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>
This commit is contained in:
parent
d200d58e65
commit
abfb31acdb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue