mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
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:
parent
d3e7a7b8c8
commit
4e5ce7e759
3 changed files with 10 additions and 10 deletions
|
|
@ -1488,7 +1488,7 @@ lower_vs_before_gs(nir_builder *b, nir_intrinsic_instr *intr, void *data)
|
||||||
|
|
||||||
bool
|
bool
|
||||||
agx_nir_lower_vs_before_gs(struct nir_shader *vs,
|
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;
|
bool progress = false;
|
||||||
|
|
||||||
|
|
@ -1500,12 +1500,7 @@ agx_nir_lower_vs_before_gs(struct nir_shader *vs,
|
||||||
if (progress)
|
if (progress)
|
||||||
link_libagx(vs, libagx);
|
link_libagx(vs, libagx);
|
||||||
|
|
||||||
/* Turn into a compute shader now that we're free of vertexisms */
|
return progress;
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -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_sw_vs(struct nir_shader *s, unsigned index_size_B);
|
||||||
|
|
||||||
bool agx_nir_lower_vs_before_gs(struct nir_shader *vs,
|
bool agx_nir_lower_vs_before_gs(struct nir_shader *vs,
|
||||||
const struct nir_shader *libagx,
|
const struct nir_shader *libagx);
|
||||||
uint64_t *outputs);
|
|
||||||
|
|
||||||
bool agx_nir_lower_gs(struct nir_shader *gs, 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,
|
bool rasterizer_discard, struct nir_shader **gs_count,
|
||||||
|
|
|
||||||
|
|
@ -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_cull_distance_vs);
|
||||||
NIR_PASS(_, nir, agx_nir_lower_uvs, &uvs);
|
NIR_PASS(_, nir, agx_nir_lower_uvs, &uvs);
|
||||||
} else {
|
} 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) {
|
} else if (nir->info.stage == MESA_SHADER_TESS_CTRL) {
|
||||||
NIR_PASS_V(nir, agx_nir_lower_tcs, dev->libagx);
|
NIR_PASS_V(nir, agx_nir_lower_tcs, dev->libagx);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue