asahi: split up agx_nir_lower_vs_before_gs

honeykrisp needs to preserve info for a little longer.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
This commit is contained in:
Alyssa Rosenzweig
2024-07-18 14:39:56 -04:00
committed by Marge Bot
parent d3e7a7b8c8
commit 4e5ce7e759
3 changed files with 10 additions and 10 deletions

View File

@@ -1488,7 +1488,7 @@ lower_vs_before_gs(nir_builder *b, nir_intrinsic_instr *intr, void *data)
bool
agx_nir_lower_vs_before_gs(struct nir_shader *vs,
const struct nir_shader *libagx, uint64_t *outputs)
const struct nir_shader *libagx)
{
bool progress = false;
@@ -1500,12 +1500,7 @@ agx_nir_lower_vs_before_gs(struct nir_shader *vs,
if (progress)
link_libagx(vs, libagx);
/* Turn into a compute shader now that we're free of vertexisms */
vs->info.stage = MESA_SHADER_COMPUTE;
memset(&vs->info.cs, 0, sizeof(vs->info.cs));
vs->xfb_info = NULL;
*outputs = vs->info.outputs_written;
return true;
return progress;
}
void

View File

@@ -27,8 +27,7 @@ struct nir_def *agx_load_per_vertex_input(struct nir_builder *b,
bool agx_nir_lower_sw_vs(struct nir_shader *s, unsigned index_size_B);
bool agx_nir_lower_vs_before_gs(struct nir_shader *vs,
const struct nir_shader *libagx,
uint64_t *outputs);
const struct nir_shader *libagx);
bool agx_nir_lower_gs(struct nir_shader *gs, const struct nir_shader *libagx,
bool rasterizer_discard, struct nir_shader **gs_count,

View File

@@ -1653,7 +1653,13 @@ agx_compile_variant(struct agx_device *dev, struct pipe_context *pctx,
NIR_PASS(_, nir, agx_nir_lower_cull_distance_vs);
NIR_PASS(_, nir, agx_nir_lower_uvs, &uvs);
} else {
NIR_PASS(_, nir, agx_nir_lower_vs_before_gs, dev->libagx, &outputs);
NIR_PASS(_, nir, agx_nir_lower_vs_before_gs, dev->libagx);
/* Turn into a compute shader now that we're free of vertexisms */
nir->info.stage = MESA_SHADER_COMPUTE;
memset(&nir->info.cs, 0, sizeof(nir->info.cs));
nir->xfb_info = NULL;
outputs = nir->info.outputs_written;
}
} else if (nir->info.stage == MESA_SHADER_TESS_CTRL) {
NIR_PASS_V(nir, agx_nir_lower_tcs, dev->libagx);