summaryrefslogtreecommitdiffstats
path: root/src/freedreno
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-05-02 09:25:36 -0700
committerRob Clark <[email protected]>2019-05-02 11:19:22 -0700
commitf697f61590fcdbba624749ce535f5a8f7b0267a5 (patch)
tree073c6b679e9d7de1be1a7e3c0181a370b9130058 /src/freedreno
parent32925f407248dfdd6994523d7a895112da8a82ae (diff)
freedreno/ir3: fix lowered ubo region alignment
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 <[email protected]>
Diffstat (limited to 'src/freedreno')
-rw-r--r--src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c b/src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c
index aaa2a8684a2..a79b1a30bf9 100644
--- a/src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c
+++ b/src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c
@@ -126,7 +126,7 @@ ir3_nir_analyze_ubo_ranges(nir_shader *nir, struct ir3_shader *shader)
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) {