mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-29 05:10:23 +01:00
ac/nir/ngg: gs use u_foreach_bit64 to loop all output slots
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19697>
This commit is contained in:
parent
13b75594d7
commit
0cb5ea512f
1 changed files with 2 additions and 5 deletions
|
|
@ -2559,7 +2559,7 @@ lower_ngg_gs_emit_vertex_with_counter(nir_builder *b, nir_intrinsic_instr *intri
|
|||
nir_ssa_def *current_vtx_per_prim = intrin->src[1].ssa;
|
||||
nir_ssa_def *gs_emit_vtx_addr = ngg_gs_emit_vertex_addr(b, gs_emit_vtx_idx, s);
|
||||
|
||||
for (unsigned slot = 0; slot < VARYING_SLOT_MAX; ++slot) {
|
||||
u_foreach_bit64(slot, b->shader->info.outputs_written) {
|
||||
unsigned packed_location = util_bitcount64((b->shader->info.outputs_written & BITFIELD64_MASK(slot)));
|
||||
gs_output_info *info = &s->output_info[slot];
|
||||
|
||||
|
|
@ -2742,10 +2742,7 @@ ngg_gs_export_vertices(nir_builder *b, nir_ssa_def *max_num_out_vtx, nir_ssa_def
|
|||
unsigned num_outputs = 0;
|
||||
vs_output outputs[64];
|
||||
|
||||
for (unsigned slot = 0; slot < VARYING_SLOT_MAX; ++slot) {
|
||||
if (!(b->shader->info.outputs_written & BITFIELD64_BIT(slot)))
|
||||
continue;
|
||||
|
||||
u_foreach_bit64(slot, b->shader->info.outputs_written) {
|
||||
gs_output_info *info = &s->output_info[slot];
|
||||
unsigned mask = gs_output_component_mask_with_stream(info, 0);
|
||||
if (!mask)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue