summaryrefslogtreecommitdiff
path: root/lib/mesa/src/asahi/compiler/agx_uniforms.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/src/asahi/compiler/agx_uniforms.c')
-rw-r--r--lib/mesa/src/asahi/compiler/agx_uniforms.c38
1 files changed, 2 insertions, 36 deletions
diff --git a/lib/mesa/src/asahi/compiler/agx_uniforms.c b/lib/mesa/src/asahi/compiler/agx_uniforms.c
index bd8f0a1ed..f357b2f86 100644
--- a/lib/mesa/src/asahi/compiler/agx_uniforms.c
+++ b/lib/mesa/src/asahi/compiler/agx_uniforms.c
@@ -48,11 +48,8 @@ agx_indexed_sysval(agx_context *ctx, enum agx_push_type type,
/* Otherwise, push */
assert(ctx->out->push_ranges < AGX_MAX_PUSH_RANGES);
- ctx->out->push_count = ALIGN_POT(ctx->out->push_count, agx_size_align_16(size));
-
- unsigned base = ctx->out->push_count;
- ctx->out->push_count += length;
- assert(ctx->out->push_count <= AGX_NUM_UNIFORMS);
+ unsigned base = ctx->push_base;
+ ctx->push_base += length;
ctx->out->push[ctx->out->push_ranges++] = (struct agx_push) {
.type = type,
@@ -63,34 +60,3 @@ agx_indexed_sysval(agx_context *ctx, enum agx_push_type type,
return agx_uniform(base + index, size);
}
-
-agx_index
-agx_vbo_base(agx_context *ctx, unsigned vbo)
-{
- /* Check if we already pushed */
- for (unsigned i = 0; i < ctx->out->push_ranges; ++i) {
- struct agx_push push = ctx->out->push[i];
-
- if (push.type == AGX_PUSH_VBO_BASE && push.vbo == vbo) {
- return agx_uniform(push.base, AGX_SIZE_64);
- }
- }
-
- /* Otherwise, push */
- assert(ctx->out->push_ranges < AGX_MAX_PUSH_RANGES);
-
- ctx->out->push_count = ALIGN_POT(ctx->out->push_count, 4);
-
- unsigned base = ctx->out->push_count;
- ctx->out->push_count += 4;
- assert(ctx->out->push_count <= AGX_NUM_UNIFORMS);
-
- ctx->out->push[ctx->out->push_ranges++] = (struct agx_push) {
- .type = AGX_PUSH_VBO_BASE,
- .base = base,
- .length = 4,
- .vbo = vbo,
- };
-
- return agx_uniform(base, AGX_SIZE_64);
-}