mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
asahi: use load_instance_id in gs lowering
it will lower differently in the prepass vs the rast shader Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
This commit is contained in:
parent
3641a37e8f
commit
141e084f55
1 changed files with 5 additions and 4 deletions
|
|
@ -205,10 +205,11 @@ lower_gs_inputs(nir_builder *b, nir_intrinsic_instr *intr, void *key)
|
|||
/* The unrolled vertex ID uses the input_vertices, which differs from what
|
||||
* our load_num_vertices will return (vertices vs primitives).
|
||||
*/
|
||||
nir_def *unrolled = nir_iadd(
|
||||
b,
|
||||
nir_imul(b, load_instance_id(b), load_geometry_param(b, input_vertices)),
|
||||
vertex);
|
||||
nir_def *unrolled =
|
||||
nir_iadd(b,
|
||||
nir_imul(b, nir_load_instance_id(b),
|
||||
load_geometry_param(b, input_vertices)),
|
||||
vertex);
|
||||
|
||||
/* Calculate the address of the input given the unrolled vertex ID */
|
||||
nir_def *addr = libagx_vertex_output_address(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue