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

Nicolai Hähnle nhaehnle at gmail.com
Sat Oct 7 08:59:53 UTC 2017


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>
> ---
>   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 :)

Other than that,

Acked-by: Nicolai Hähnle <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;
> 


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


More information about the mesa-dev mailing list