[Mesa-dev] [PATCH] st/mesa: Record shader access qualifiers for images

Marek Olšák maraeo at gmail.com
Fri Oct 19 22:04:45 UTC 2018


On Mon, Oct 15, 2018 at 6:35 PM Kenneth Graunke <kenneth at whitecape.org>
wrote:

> From: Jason Ekstrand <jason.ekstrand at intel.com>
>
> They're not required to be the same as the access flag on the image
> unit.  For hardware that does shader image lowering based on the
> qualifier (Intel), it may be required for state setup.
> ---
>  src/gallium/include/pipe/p_state.h     |  1 +
>  src/mesa/state_tracker/st_atom_image.c | 27 ++++++++++++++++++++++----
>  src/mesa/state_tracker/st_cb_texture.c |  2 +-
>  src/mesa/state_tracker/st_texture.c    |  2 +-
>  src/mesa/state_tracker/st_texture.h    |  5 +++--
>  5 files changed, 29 insertions(+), 8 deletions(-)
>
> diff --git a/src/gallium/include/pipe/p_state.h
> b/src/gallium/include/pipe/p_state.h
> index a58d91fb3dd..331417b1d7f 100644
> --- a/src/gallium/include/pipe/p_state.h
> +++ b/src/gallium/include/pipe/p_state.h
> @@ -485,6 +485,7 @@ struct pipe_image_view
>     struct pipe_resource *resource; /**< resource into which this is a
> view  */
>     enum pipe_format format;      /**< typed PIPE_FORMAT_x */
>     unsigned access;              /**< PIPE_IMAGE_ACCESS_x */
> +   unsigned shader_access;       /**< PIPE_IMAGE_ACCESS_x */
>

Can you use uint16_t for both access masks? Other than that:

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

Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181019/54951dfa/attachment.html>


More information about the mesa-dev mailing list