radv: Include output patch size in TCS offchip layout.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28490>
This commit is contained in:
Timur Kristóf 2024-04-01 01:17:21 +02:00 committed by Marge Bot
parent 2a76f821af
commit 4b0b0e675c
3 changed files with 4 additions and 1 deletions

View file

@ -2691,6 +2691,7 @@ radv_emit_patch_control_points(struct radv_cmd_buffer *cmd_buffer)
unsigned tcs_offchip_layout =
SET_SGPR_FIELD(TCS_OFFCHIP_LAYOUT_PATCH_CONTROL_POINTS, d->vk.ts.patch_control_points - 1) |
SET_SGPR_FIELD(TCS_OFFCHIP_LAYOUT_OUT_PATCH_CP, tcs->info.tcs.tcs_vertices_out - 1) |
SET_SGPR_FIELD(TCS_OFFCHIP_LAYOUT_NUM_PATCHES, cmd_buffer->state.tess_num_patches - 1) |
SET_SGPR_FIELD(TCS_OFFCHIP_LAYOUT_NUM_LS_OUTPUTS, vs->info.vs.num_linked_outputs) |
SET_SGPR_FIELD(TCS_OFFCHIP_LAYOUT_NUM_HS_OUTPUTS, tcs->info.tcs.num_linked_outputs) |

View file

@ -252,6 +252,8 @@ enum radv_ud_index {
#define TCS_OFFCHIP_LAYOUT_NUM_PATCHES__MASK 0x7f
#define TCS_OFFCHIP_LAYOUT_PATCH_CONTROL_POINTS__SHIFT 12
#define TCS_OFFCHIP_LAYOUT_PATCH_CONTROL_POINTS__MASK 0x1f
#define TCS_OFFCHIP_LAYOUT_OUT_PATCH_CP__SHIFT 7
#define TCS_OFFCHIP_LAYOUT_OUT_PATCH_CP__MASK 0x1f
#define TCS_OFFCHIP_LAYOUT_NUM_LS_OUTPUTS__SHIFT 17
#define TCS_OFFCHIP_LAYOUT_NUM_LS_OUTPUTS__MASK 0x3f
#define TCS_OFFCHIP_LAYOUT_NUM_HS_OUTPUTS__SHIFT 23

View file

@ -68,7 +68,7 @@ struct radv_shader_args {
/* TCS */
/* # [0:6] = the number of tessellation patches minus one, max = 127
* # [7:11] = reserved for future use
* # [7:11] = the number of output patch control points minus one, max = 31
* # [12:16] = the number of input patch control points minus one, max = 31
* # [17:22] = the number of LS outputs, up to 32
* # [23:28] = the number of HS per-vertex outputs, up to 32