aco: Implement tessellation control shader input/output.
Tessellation control shaders can have per-vertex inputs, and both per-vertex and per-patch outputs. TCS can not only store, but also load their outputs. The TCS outputs are stored in RING_HS_TESS_OFFCHIP in VMEM, which is where the TES reads them from. Additionally, the are also stored in LDS to make sure they can be loaded fast when read by the TCS. Tessellation factors are always just stored in LDS. At the end of the shader, the first shader invocation reads these from LDS and writes them to RING_HS_TESS_FACTOR in VMEM, and additionally to RING_HS_TESS_OFFCHIP when they are read by the Tessellation Evaluation Shader. This implementation matches the memory layouts used by radv_nir_to_llvm. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964>
This commit is contained in:
@@ -311,8 +311,10 @@ void init_context(isel_context *ctx, nir_shader *shader)
|
||||
case nir_intrinsic_load_sample_id:
|
||||
case nir_intrinsic_load_sample_mask_in:
|
||||
case nir_intrinsic_load_input:
|
||||
case nir_intrinsic_load_output:
|
||||
case nir_intrinsic_load_input_vertex:
|
||||
case nir_intrinsic_load_per_vertex_input:
|
||||
case nir_intrinsic_load_per_vertex_output:
|
||||
case nir_intrinsic_load_vertex_id:
|
||||
case nir_intrinsic_load_vertex_id_zero_base:
|
||||
case nir_intrinsic_load_barycentric_sample:
|
||||
|
||||
Reference in New Issue
Block a user