[Mesa-dev] [PATCH 1/4] r600: add PIPE_SHADER_IR_NATIVE to supported shaders for cs

Pierre Moreau pierre.morrow at free.fr
Fri Feb 9 10:36:23 UTC 2018


On 2018-02-09 — 12:06, Timothy Arceri wrote:
> ---
>  src/gallium/drivers/r600/r600_pipe.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
> index 6c021e568d..719ab349ef 100644
> --- a/src/gallium/drivers/r600/r600_pipe.c
> +++ b/src/gallium/drivers/r600/r600_pipe.c
> @@ -600,10 +600,15 @@ static int r600_get_shader_param(struct pipe_screen* pscreen,
>  		} else {
>  			return PIPE_SHADER_IR_TGSI;
>  		}
> -	case PIPE_SHADER_CAP_SUPPORTED_IRS:
> +		return PIPE_SHADER_IR_TGSI;

This line is dead code and can be safely removed, as both the if-block and the
else-block return a value already; it should be part of patch 03 instead. With
that addressed, this patch is

Acked-by: Pierre Moreau <pierre.morrow at free.fr>

> +	case PIPE_SHADER_CAP_SUPPORTED_IRS: {
> +		int ir = 0;
> +		if (shader == PIPE_SHADER_COMPUTE)
> +			ir = 1 << PIPE_SHADER_IR_NATIVE;
>  		if (rscreen->b.family >= CHIP_CEDAR)
> -			return (1 << PIPE_SHADER_IR_TGSI);
> -		return 0;
> +			ir |= 1 << PIPE_SHADER_IR_TGSI;
> +		return ir;
> +	}
>  	case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED:
>  		if (rscreen->b.family == CHIP_ARUBA ||
>  		    rscreen->b.family == CHIP_CAYMAN ||
> -- 
> 2.14.3
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180209/79bc01a2/attachment-0001.sig>


More information about the mesa-dev mailing list