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

Nicolai Hähnle nhaehnle at gmail.com
Mon Oct 9 13:44:50 UTC 2017


At least for async compute, this is gated by 
HQD_PQ_CONTROL.UNORD_DISPATCH, which the kernel doesn't set. Presumably 
because it can increase scheduling latency between queues. I don't know 
if it applies to compute shaders launched via the graphics queue. In any 
case, turning the bit on from the user space driver should never hurt.

Cheers,
Nicolai

On 09.10.2017 11:43, Dave Airlie wrote:
> 
> Do we know if Linux kernel driver enables this?
> 
> Dave.
> 
> On 9 Oct. 2017 6:04 pm, "Samuel Pitoiset" <samuel.pitoiset at gmail.com 
> <mailto:samuel.pitoiset at gmail.com>> wrote:
> 
> 
> 
>     On 10/07/2017 10:59 AM, Nicolai Hähnle wrote:
> 
>         On 06.10.2017 16:03, Samuel Pitoiset wrote:
> 
>             Ported from RadeonSI, and -pro seems to enable it as well.
> 
>             Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com
>             <mailto: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)
> 
> 
>         The comment in parenthesis seems a bit like the driver is having
>         an identity crisis :)
> 
> 
>     Ah right :) I will remove that.
> 
> 
>         Other than that,
> 
>         Acked-by: Nicolai Hähnle <nicolai.haehnle at amd.com
>         <mailto:nicolai.haehnle at amd.com>>
> 
>             +             */
>             +            dispatch_initiator |= S_00B800_ORDER_MODE(1);
>             +        }
>                        if (info->unaligned) {
>                            unsigned *cs_block_size =
>             compute_shader->info.cs.block_size;
> 
> 
> 
>     _______________________________________________
>     mesa-dev mailing list
>     mesa-dev at lists.freedesktop.org <mailto:mesa-dev at lists.freedesktop.org>
>     https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>     <https://lists.freedesktop.org/mailman/listinfo/mesa-dev>
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list