radv: enable task shaders support with NV DGC

No games are using task shaders with DGC at the moment but this is
supposed to work.

This fixes test_amplification_shader_execute_indirect from vkd3d.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29935>
This commit is contained in:
Samuel Pitoiset
2024-06-25 10:44:10 +02:00
committed by Marge Bot
parent e6aee84265
commit 88864b707a
2 changed files with 2 additions and 3 deletions

View File

@@ -11513,8 +11513,7 @@ radv_dgc_execute_ib(struct radv_cmd_buffer *cmd_buffer, const VkGeneratedCommand
{
VK_FROM_HANDLE(radv_buffer, prep_buffer, pGeneratedCommandsInfo->preprocessBuffer);
struct radv_device *device = radv_cmd_buffer_device(cmd_buffer);
const bool has_task_shader =
radv_dgc_with_task_shader(pGeneratedCommandsInfo) && false /* TODO: Enable when fully implemented */;
const bool has_task_shader = radv_dgc_with_task_shader(pGeneratedCommandsInfo);
const uint32_t cmdbuf_size = radv_get_indirect_cmdbuf_size(pGeneratedCommandsInfo);
const uint64_t ib_va =

View File

@@ -2413,7 +2413,7 @@ radv_prepare_dgc_graphics(struct radv_cmd_buffer *cmd_buffer, const VkGeneratedC
const struct radv_userdata_info *xyz_loc = radv_get_user_sgpr(task_shader, AC_UD_CS_GRID_SIZE);
const struct radv_userdata_info *draw_id_loc = radv_get_user_sgpr(task_shader, AC_UD_CS_TASK_DRAW_ID);
params->has_task_shader = 0; /* TODO: Enable when fully implemented */
params->has_task_shader = 1;
params->mesh_ring_entry_sgpr =
((mesh_shader->info.user_data_0 - SI_SH_REG_OFFSET) >> 2) + mesh_ring_entry_loc->sgpr_idx;
params->linear_dispatch_en = task_shader->info.cs.linear_taskmesh_dispatch;