[Mesa-dev] [PATCH 1/3] gallium: Add PIPE_CAP_COMPUTE_IMAGES_SUPPORTED

Marek Olšák maraeo at gmail.com
Thu Jul 24 04:07:02 PDT 2014


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Thu, Jul 24, 2014 at 2:37 AM, Tom Stellard <thomas.stellard at amd.com> wrote:
> ---
>  src/gallium/docs/source/screen.rst            | 2 ++
>  src/gallium/drivers/radeon/r600_pipe_common.c | 7 +++++++
>  src/gallium/include/pipe/p_defines.h          | 3 ++-
>  3 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
> index ba583fe..830a1a5 100644
> --- a/src/gallium/docs/source/screen.rst
> +++ b/src/gallium/docs/source/screen.rst
> @@ -332,6 +332,8 @@ pipe_screen::get_compute_param.
>    clock in MHz. Value type: ``uint32_t``
>  * ``PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS``: Maximum number of compute units
>    Value type: ``uint32_t``
> +* ``PIPE_COMPUTE_CAP_IMAGES_SUPPORTED``: Whether images are supported
> +  non-zero means yes, zero means no. Value type: ``uint32_t``
>
>  .. _pipe_bind:
>
> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
> index 6535992..bf0585d 100644
> --- a/src/gallium/drivers/radeon/r600_pipe_common.c
> +++ b/src/gallium/drivers/radeon/r600_pipe_common.c
> @@ -519,6 +519,13 @@ static int r600_get_compute_param(struct pipe_screen *screen,
>                         *max_compute_units = MAX2(rscreen->info.max_compute_units, 1);
>                 }
>                 return sizeof(uint32_t);
> +
> +       case PIPE_COMPUTE_CAP_IMAGES_SUPPORTED:
> +               if (ret) {
> +                       uint32_t *images_supported = ret;
> +                       *images_supported = 0;
> +               }
> +               return sizeof(uint32_t);
>         }
>
>          fprintf(stderr, "unknown PIPE_COMPUTE_CAP %d\n", param);
> diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
> index d9b6e5a..43bb1f5 100644
> --- a/src/gallium/include/pipe/p_defines.h
> +++ b/src/gallium/include/pipe/p_defines.h
> @@ -650,7 +650,8 @@ enum pipe_compute_cap
>     PIPE_COMPUTE_CAP_MAX_INPUT_SIZE,
>     PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE,
>     PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCY,
> -   PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS
> +   PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS,
> +   PIPE_COMPUTE_CAP_IMAGES_SUPPORTED
>  };
>
>  /**
> --
> 1.8.1.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list