asahi: Upload vertex and geom/tess params together

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38404>
This commit is contained in:
Faith Ekstrand 2025-11-13 17:21:06 -05:00 committed by Marge Bot
parent f36465d574
commit a96fd8f0a7

View file

@ -3932,9 +3932,6 @@ agx_batch_geometry_params(struct agx_batch *batch, uint64_t input_index_buffer,
.verts_per_instance = draw ? draw->count : 0,
};
batch->uniforms.vertex_params =
agx_pool_upload_aligned(&batch->pool, &vp, sizeof(vp), 8);
struct poly_geometry_params params = {
.indirect_desc = batch->geom_indirect,
.flat_outputs =
@ -4048,6 +4045,9 @@ agx_batch_geometry_params(struct agx_batch *batch, uint64_t input_index_buffer,
}
}
batch->uniforms.vertex_params =
agx_pool_upload_aligned(&batch->pool, &vp, sizeof(vp), 8);
return agx_pool_upload_aligned_with_bo(&batch->pool, &params, sizeof(params),
8, &batch->geom_params_bo);
}
@ -4566,9 +4566,6 @@ agx_draw_patches(struct agx_context *ctx, const struct pipe_draw_info *info,
.verts_per_instance = draws ? draws->count : 0,
};
batch->uniforms.vertex_params =
agx_pool_upload_aligned(&batch->pool, &vp, sizeof(vp), 8);
agx_upload_draw_params(batch, indirect, draws, info);
/* Setup parameters */
@ -4664,8 +4661,12 @@ agx_draw_patches(struct agx_context *ctx, const struct pipe_draw_info *info,
.gpu;
}
batch->uniforms.vertex_params =
agx_pool_upload_aligned(&batch->pool, &vp, sizeof(vp), 8);
uint64_t state =
agx_pool_upload_aligned(&batch->pool, &params, sizeof(params), 4);
batch->uniforms.tess_params = state;
if (indirect) {
perf_debug(dev, "Indirect tessellation");
@ -4694,8 +4695,6 @@ agx_draw_patches(struct agx_context *ctx, const struct pipe_draw_info *info,
tess_grid = agx_grid_indirect_local(grids + 2 * grid_stride);
}
batch->uniforms.tess_params = state;
agx_launch(batch, vs_grid, agx_workgroup(64, 1, 1), ctx->vs, ctx->linked.vs,
MESA_SHADER_VERTEX, 0);