[Mesa-dev] [PATCH] radeonsi: add support for cull distances.

Kai Wasserbäch kai at dev.carbon-project.org
Tue Aug 23 14:46:55 UTC 2016


Hey Dave,
Dave Airlie wrote on 23.08.2016 03:28:
> From: Dave Airlie <airlied at redhat.com>
> 
> This should be all that is required for cull distances to work
> on radeonsi.

in case this is indeed enough to enable ARB_cull_distance, mind adding that to
GL3.txt and the release notes?

> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/gallium/drivers/radeonsi/si_pipe.c  | 3 ++-
>  src/gallium/drivers/radeonsi/si_state.c | 8 ++++----
>  2 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
> index 62b62db..14b0b80 100644
> --- a/src/gallium/drivers/radeonsi/si_pipe.c
> +++ b/src/gallium/drivers/radeonsi/si_pipe.c
> @@ -436,7 +436,6 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>  	case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
>  	case PIPE_CAP_VERTEXID_NOBASE:
>  	case PIPE_CAP_QUERY_BUFFER_OBJECT:
> -	case PIPE_CAP_CULL_DISTANCE:
>  	case PIPE_CAP_PRIMITIVE_RESTART_FOR_PATCHES:
>  	case PIPE_CAP_TGSI_VOTE:
>  	case PIPE_CAP_MAX_WINDOW_RECTANGLES:
> @@ -447,6 +446,8 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>  	case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
>  		return sscreen->has_draw_indirect_multi;
>  
> +	case PIPE_CAP_CULL_DISTANCE:
> +		return 1;
>  	case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
>  		return 30;

Hm, shouldn't the PIPE_CAP_CULL_DISTANCE just be moved up to the long list of
supported features with boolean caps at the beginning of si_get_param()?
(Instead of creating another "true segment"?)

Cheers,
Kai

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 630 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160823/fd70f4be/attachment.sig>


More information about the mesa-dev mailing list