radv: use the number of VS outputs for computing the tessellation info
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 7 Aug 2023 12:32:00 +0000 (14:32 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 11 Aug 2023 07:43:58 +0000 (07:43 +0000)
When TCS isn't linked with VS, the vertex stride should be computed
from vertex outputs. This is only for shader object and shouldn't
change anything right now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24540>

src/amd/vulkan/radv_cmd_buffer.c

index eab7956..f0b2ac3 100644 (file)
@@ -2518,14 +2518,14 @@ radv_emit_patch_control_points(struct radv_cmd_buffer *cmd_buffer)
    if (cmd_buffer->state.uses_dynamic_patch_control_points) {
       /* Compute the number of patches. */
       cmd_buffer->state.tess_num_patches = get_tcs_num_patches(
-         d->vk.ts.patch_control_points, tcs->info.tcs.tcs_vertices_out, tcs->info.tcs.num_linked_inputs,
+         d->vk.ts.patch_control_points, tcs->info.tcs.tcs_vertices_out, vs->info.vs.num_linked_outputs,
          tcs->info.tcs.num_linked_outputs, tcs->info.tcs.num_linked_patch_outputs,
          pdevice->hs.tess_offchip_block_dw_size, pdevice->rad_info.gfx_level, pdevice->rad_info.family);
 
       /* Compute the LDS size. */
       cmd_buffer->state.tess_lds_size = calculate_tess_lds_size(
          pdevice->rad_info.gfx_level, d->vk.ts.patch_control_points, tcs->info.tcs.tcs_vertices_out,
-         tcs->info.tcs.num_linked_inputs, cmd_buffer->state.tess_num_patches, tcs->info.tcs.num_linked_outputs,
+         vs->info.vs.num_linked_outputs, cmd_buffer->state.tess_num_patches, tcs->info.tcs.num_linked_outputs,
          tcs->info.tcs.num_linked_patch_outputs);
    }