[Mesa-dev] [PATCH 07/17] gallium: add indirect compute parameters to pipe_grid_info

Ilia Mirkin imirkin at alum.mit.edu
Mon Jan 25 06:28:32 PST 2016


On Sun, Jan 24, 2016 at 4:09 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> Like indirect draw, we need to store a resource and an offset that
> needs to be 4 byte aligned. When indirect is used, the size of the
> grid (in blocks) is stored with three 32-bit integers.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/gallium/include/pipe/p_state.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
> index b5bc45a..47f0cfd 100644
> --- a/src/gallium/include/pipe/p_state.h
> +++ b/src/gallium/include/pipe/p_state.h
> @@ -704,6 +704,18 @@ struct pipe_grid_info
>      * Determine the layout of the grid (in block units) to be used.
>      */
>     uint grid[3];
> +
> +   /* Indirect compute parameters resource: If not NULL, most values are taken

s/most values/block sizes/

> +    * from this buffer instead, which is laid out as follows:
> +    *
> +    *  struct {
> +    *     uint32_t num_blocks_x;
> +    *     uint32_t num_blocks_y;
> +    *     uint32_t num_blocks_z;
> +    *  };
> +    */
> +   struct pipe_resource *indirect;
> +   unsigned indirect_offset; /**< must be 4 byte aligned */
>  };
>
>  /**
> --
> 2.6.4
>
> _______________________________________________
> 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