[Mesa-dev] [PATCH] radv: allow launching waves out-of-order for compute

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Sat Oct 7 11:53:39 UTC 2017


Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

if you remove the (same as Vulkan) bit.

On Fri, Oct 6, 2017 at 4:03 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> Ported from RadeonSI, and -pro seems to enable it as well.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/amd/vulkan/radv_cmd_buffer.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
> index d9243beae5..c641534fc9 100644
> --- a/src/amd/vulkan/radv_cmd_buffer.c
> +++ b/src/amd/vulkan/radv_cmd_buffer.c
> @@ -3198,7 +3198,16 @@ radv_emit_dispatch_packets(struct radv_cmd_buffer *cmd_buffer,
>                 }
>         } else {
>                 unsigned blocks[3] = { info->blocks[0], info->blocks[1], info->blocks[2] };
> -               unsigned dispatch_initiator = S_00B800_COMPUTE_SHADER_EN(1);
> +               unsigned dispatch_initiator = S_00B800_COMPUTE_SHADER_EN(1) |
> +                                             S_00B800_FORCE_START_AT_000(1);
> +
> +               if (cmd_buffer->device->physical_device->rad_info.chip_class >= CIK) {
> +                       /* If the KMD allows it (there is a KMD hw register for
> +                        * it), allow launching waves out-of-order. (same as
> +                        * Vulkan)
> +                        */
> +                       dispatch_initiator |= S_00B800_ORDER_MODE(1);
> +               }
>
>                 if (info->unaligned) {
>                         unsigned *cs_block_size = compute_shader->info.cs.block_size;
> --
> 2.14.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list