[Mesa-dev] [PATCH 4/5] gallium: Add PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE

Francisco Jerez currojerez at riseup.net
Mon Sep 24 09:41:07 PDT 2012


Tom Stellard <tom at stellard.net> writes:

> From: Tom Stellard <thomas.stellard at amd.com>
>
Don't forget to add a short comment on the new cap in screen.rst.

> ---
>  src/gallium/drivers/r600/r600_pipe.c | 10 ++++++++++
>  src/gallium/include/pipe/p_defines.h |  3 ++-
>  2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
> index 658e9a9..55db78c 100644
> --- a/src/gallium/drivers/r600/r600_pipe.c
> +++ b/src/gallium/drivers/r600/r600_pipe.c
> @@ -666,6 +666,16 @@ static int r600_get_compute_param(struct pipe_screen *screen,
>  		}
>  		return sizeof(uint64_t);
>  
> +	case PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE:
> +		if (ret) {
> +			uint64_t * max_mem_alloc_size = ret;
> +			/* XXX: Not sure what value to put here.  Clover will
> +			 * default to max3(MAX_MEM_ALLOC_SIZE, MAX_GLOBAL_SIZE / 4,
> +			 * 128 * 1024 *1024), which seems reasonable.  */
> +			*max_mem_alloc_size = 0;
> +		}
> +		return sizeof(uint64_t);
> +
>  	default:
>  		fprintf(stderr, "unknown PIPE_COMPUTE_CAP %d\n", param);
>  		return 0;
> diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
> index 59c6382..db86474 100644
> --- a/src/gallium/include/pipe/p_defines.h
> +++ b/src/gallium/include/pipe/p_defines.h
> @@ -557,7 +557,8 @@ enum pipe_compute_cap
>     PIPE_COMPUTE_CAP_MAX_GLOBAL_SIZE,
>     PIPE_COMPUTE_CAP_MAX_LOCAL_SIZE,
>     PIPE_COMPUTE_CAP_MAX_PRIVATE_SIZE,
> -   PIPE_COMPUTE_CAP_MAX_INPUT_SIZE
> +   PIPE_COMPUTE_CAP_MAX_INPUT_SIZE,
> +   PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE
>  };
>  
>  /**
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120924/dccb966f/attachment.pgp>


More information about the mesa-dev mailing list