mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
agx: Avoid scratch mem with tri strip w/ adjacency
with restart unroll kernel where nir fails to optimize this away without a little help from us. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
This commit is contained in:
parent
7f9ef5b176
commit
4a4c6d1bc6
1 changed files with 8 additions and 1 deletions
|
|
@ -93,8 +93,15 @@ libagx_vertex_id_for_topology(enum mesa_prim mode, bool flatshade_first,
|
|||
even_or_first ? 3 : -2,
|
||||
};
|
||||
|
||||
/* Ensure NIR can see thru the local array */
|
||||
uint offset = 0;
|
||||
for (uint i = 1; i < 6; ++i) {
|
||||
if (i == vert)
|
||||
offset = offsets[i];
|
||||
}
|
||||
|
||||
/* Finally add to the base of the primitive */
|
||||
return (prim * 2) + offsets[vert];
|
||||
return (prim * 2) + offset;
|
||||
}
|
||||
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue