[Mesa-dev] [PATCH 2/4] gallium: add sufficient draw interface to allow new indirect features

Marek Olšák maraeo at gmail.com
Fri Jan 1 03:51:12 PST 2016


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

On Thu, Dec 31, 2015 at 8:55 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> This makes it possible to support indirect multidraws as well as having
> the number of such draws to come from a separate GPU resource.
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>  src/gallium/include/pipe/p_state.h | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
> index 8463363..2e4d283 100644
> --- a/src/gallium/include/pipe/p_state.h
> +++ b/src/gallium/include/pipe/p_state.h
> @@ -620,7 +620,7 @@ struct pipe_draw_info
>      */
>     struct pipe_stream_output_target *count_from_stream_output;
>
> -   /* Indirect parameters resource: If not NULL, most values are taken
> +   /* Indirect draw parameters resource: If not NULL, most values are taken
>      * from this buffer instead, which is laid out as follows:
>      *
>      * if indexed is TRUE:
> @@ -641,6 +641,15 @@ struct pipe_draw_info
>      */
>     struct pipe_resource *indirect;
>     unsigned indirect_offset; /**< must be 4 byte aligned */
> +   unsigned indirect_stride; /**< must be 4 byte aligned */
> +   unsigned indirect_count; /**< number of indirect draws */
> +
> +   /* Indirect draw count resource: If not NULL, contains a 32-bit value which
> +    * is to be used as the real indirect_count. In that case indirect_count
> +    * becomes the maximum possible value.
> +    */
> +   struct pipe_resource *indirect_params;
> +   unsigned indirect_params_offset; /**< must be 4 byte aligned */
>  };
>
>
> --
> 2.4.10
>
> _______________________________________________
> 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