Mesa (master): freedreno/ir3: Drop unnecessary alignment of pushed UBO size.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 5 21:08:36 UTC 2020


Module: Mesa
Branch: master
Commit: 9e58ab09ffbd18355868000b2da90a5cd73b5c09
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9e58ab09ffbd18355868000b2da90a5cd73b5c09

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jun  1 11:40:36 2020 -0700

freedreno/ir3: Drop unnecessary alignment of pushed UBO size.

The analysis pass gives us vec4-aligned size, and all of our other
constbuf allocations here are in vec4 units, so we can just divide by 16.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5273>

---

 src/freedreno/ir3/ir3_nir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c
index 148186050bf..ac07224b8e1 100644
--- a/src/freedreno/ir3/ir3_nir.c
+++ b/src/freedreno/ir3/ir3_nir.c
@@ -477,7 +477,7 @@ ir3_setup_const_state(struct ir3_shader *shader, nir_shader *nir)
 	const_state->num_driver_params = align(const_state->num_driver_params, 4);
 
 	debug_assert((shader->ubo_state.size % 16) == 0);
-	unsigned constoff = align(shader->ubo_state.size / 16, 8);
+	unsigned constoff = shader->ubo_state.size / 16;
 	unsigned ptrsz = ir3_pointer_size(compiler);
 
 	if (const_state->num_ubos > 0) {



More information about the mesa-commit mailing list