Commit abfb31ac authored by Rob Clark's avatar Rob Clark

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's avatarRob Clark <robdclark@chromium.org>
parent d200d58e
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment