asahi: rm redundant input_vertices

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179>
This commit is contained in:
Alyssa Rosenzweig 2024-05-09 10:36:13 -04:00 committed by Marge Bot
parent e5c7bca88d
commit 4a344de276
4 changed files with 4 additions and 8 deletions

View file

@ -231,7 +231,7 @@ lower_gs_inputs(nir_builder *b, nir_intrinsic_instr *intr, void *_)
nir_def *vertex = vertex_id_for_topology_class(
b, vert_in_prim, b->shader->info.gs.input_primitive);
nir_def *verts = load_geometry_param(b, input_vertices);
nir_def *verts = load_geometry_param(b, vs_grid[0]);
nir_def *unrolled =
nir_iadd(b, nir_imul(b, nir_load_instance_id(b), verts), vertex);

View file

@ -469,7 +469,6 @@ libagx_gs_setup_indirect(global struct agx_geometry_params *p,
/* Calculate number of primitives input into the GS */
uint prim_per_instance = u_decomposed_prims_for_vertices(mode, vertex_count);
p->input_primitives = prim_per_instance * instance_count;
p->input_vertices = vertex_count;
/* Invoke VS as (vertices, instances, 1); GS as (primitives, instances, 1) */
p->vs_grid[0] = vertex_count;

View file

@ -121,14 +121,11 @@ struct agx_geometry_params {
uint32_t xfb_prims[MAX_VERTEX_STREAMS];
/* Within an indirect GS draw, the grids used to dispatch the VS/GS written
* out by the GS indirect setup kernel. Unused for direct GS draws.
* out by the GS indirect setup kernel or the CPU for a direct draw.
*/
uint32_t vs_grid[3];
uint32_t gs_grid[3];
/* Number of input vertices, part of the stride for the vertex buffer */
uint32_t input_vertices;
/* Number of input primitives across all instances, calculated by the CPU for
* a direct draw or the GS indirect setup kernel for an indirect draw.
*/
@ -151,7 +148,7 @@ struct agx_geometry_params {
*/
uint32_t input_topology;
} PACKED;
AGX_STATIC_ASSERT(sizeof(struct agx_geometry_params) == 79 * 4);
AGX_STATIC_ASSERT(sizeof(struct agx_geometry_params) == 78 * 4);
struct agx_tess_params {
/* Persistent (cross-draw) geometry state */

View file

@ -3934,13 +3934,13 @@ agx_batch_geometry_params(struct agx_batch *batch, uint64_t input_index_buffer,
batch->uniforms.vertex_output_buffer_ptr =
agx_pool_alloc_aligned(&batch->pool, 8, 8).gpu;
} else {
params.vs_grid[0] = draw->count;
params.gs_grid[0] =
u_decomposed_prims_for_vertices(info->mode, draw->count);
params.primitives_log2 = util_logbase2_ceil(params.gs_grid[0]);
params.input_primitives = params.gs_grid[0] * info->instance_count;
params.input_vertices = draw->count;
unsigned vb_size = libagx_tcs_in_size(draw->count * info->instance_count,
batch->uniforms.vertex_outputs);