mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
ac/nir/ngg: Carve out ngg_gs_process_out_vertex.
This is the part of the code that processes things related to a single vertex, mainly loading the outputs from LDS and performing some adjustments on them. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
This commit is contained in:
parent
4f8ee9b045
commit
213759d2b6
1 changed files with 10 additions and 3 deletions
|
|
@ -2340,10 +2340,8 @@ ngg_gs_export_primitives(nir_builder *b, nir_def *max_num_out_prims, nir_def *ti
|
|||
}
|
||||
|
||||
static void
|
||||
ngg_gs_export_vertices(nir_builder *b, nir_def *max_num_out_vtx, nir_def *tid_in_tg,
|
||||
nir_def *out_vtx_lds_addr, lower_ngg_gs_state *s)
|
||||
ngg_gs_process_out_vertex(nir_builder *b, nir_def *out_vtx_lds_addr, lower_ngg_gs_state *s)
|
||||
{
|
||||
nir_if *if_vtx_export_thread = nir_push_if(b, nir_ilt(b, tid_in_tg, max_num_out_vtx));
|
||||
nir_def *exported_out_vtx_lds_addr = out_vtx_lds_addr;
|
||||
|
||||
if (!s->output_compile_time_known) {
|
||||
|
|
@ -2408,6 +2406,15 @@ ngg_gs_export_vertices(nir_builder *b, nir_def *max_num_out_vtx, nir_def *tid_in
|
|||
|
||||
/* This should be after streamout and before exports. */
|
||||
ac_nir_clamp_vertex_color_outputs(b, &s->out);
|
||||
}
|
||||
|
||||
static void
|
||||
ngg_gs_export_vertices(nir_builder *b, nir_def *max_num_out_vtx, nir_def *tid_in_tg,
|
||||
nir_def *out_vtx_lds_addr, lower_ngg_gs_state *s)
|
||||
{
|
||||
nir_if *if_vtx_export_thread = nir_push_if(b, nir_ilt(b, tid_in_tg, max_num_out_vtx));
|
||||
|
||||
ngg_gs_process_out_vertex(b, out_vtx_lds_addr, s);
|
||||
|
||||
uint64_t export_outputs = b->shader->info.outputs_written | VARYING_BIT_POS;
|
||||
if (s->options->kill_pointsize)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue