nir,ac/llvm,radv: add stream id index to nir_load_ring_gsvs_amd

For used by legacy GS to store output to different ring according
to stream id.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20158>
This commit is contained in:
Qiang Yu
2022-12-05 19:03:15 +08:00
parent 0ea589ec69
commit 9a6416b374
2 changed files with 2 additions and 2 deletions

View File

@@ -1223,7 +1223,7 @@ static LLVMValueRef radv_intrinsic_load(struct ac_shader_abi *abi, nir_intrinsic
case nir_intrinsic_load_ring_attr_amd:
return ctx->attr_ring;
case nir_intrinsic_load_ring_gsvs_amd:
return ctx->gsvs_ring[0];
return ctx->gsvs_ring[nir_intrinsic_stream_id(intrin)];
default:
return NULL;
}

View File

@@ -1373,7 +1373,7 @@ system_value("gs_vertex_offset_amd", 1, [BASE])
system_value("rasterization_samples_amd", 1)
# Descriptor where GS outputs are stored for GS copy shader to read on GFX6-9
system_value("ring_gsvs_amd", 4)
system_value("ring_gsvs_amd", 4, indices=[STREAM_ID])
# Write offset in gsvs ring for legacy GS shader
system_value("ring_gs2vs_offset_amd", 1)