Since we emit UBO regions INDIRECTly (ie. not copied into cmdstream but
emit by EXT_SRC_ADDR) we need to keep them 4*vec4 aligned. Which the
code already mostly did, except for aligning the first UBO region itself
(ie. the one after block==0 which is the "real" uniforms).
Fixes: 893425a607a freedreno/ir3: Push UBOs to constant file
Fixes: 3c8779af325 freedreno/ir3: Enable PIPE_CAP_PACKED_UNIFORMS
Signed-off-by: Rob Clark <robdclark@chromium.org>
struct ir3_ubo_analysis_state *state = &shader->ubo_state;
memset(state, 0, sizeof(*state));
- state->range[0].end = nir->num_uniforms * 16;
+ state->range[0].end = align(nir->num_uniforms * 16, 16 * 4); /* align to 4*vec4 */
nir_foreach_function(function, nir) {
if (function->impl) {