summaryrefslogtreecommitdiffstats
path: root/src/freedreno/ir3/ir3_context.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-05-02 09:37:21 -0700
committerRob Clark <[email protected]>2019-05-02 11:19:22 -0700
commitca3eb5db665cbcc2de5a5d3158e3dc68f86e5822 (patch)
treeefef1d5fd96eb368b3f1aa7ede612ffa3a45aeec /src/freedreno/ir3/ir3_context.c
parente941faf3e83fa0d5ce0bd6e67119e8d6bf975502 (diff)
freedreno/ir3: add some ubo range related asserts
And a comment.. since we are mixing units of bytes/dwords/vec4, hopefully this will avoid some unit confusion. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/freedreno/ir3/ir3_context.c')
-rw-r--r--src/freedreno/ir3/ir3_context.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3_context.c b/src/freedreno/ir3/ir3_context.c
index f822e9e13e9..da1e148e37a 100644
--- a/src/freedreno/ir3/ir3_context.c
+++ b/src/freedreno/ir3/ir3_context.c
@@ -123,7 +123,10 @@ ir3_context_init(struct ir3_compiler *compiler,
*
* Immediates go last mostly because they are inserted in the CP pass
* after the nir -> ir3 frontend.
+ *
+ * Note UBO size in bytes should be aligned to vec4
*/
+ debug_assert((ctx->so->shader->ubo_state.size % 16) == 0);
unsigned constoff = align(ctx->so->shader->ubo_state.size / 16, 4);
unsigned ptrsz = ir3_pointer_size(ctx);