"Kristian H. Kristensen" <hoegsb...@gmail.com> writes:

> This new pipe cap and the new nr_samples field in pipe_surface lets a
> state tracker bind a render target with a different sample count than
> the resource. This allows for implementing
> EXT_multisampled_render_to_texture and
> EXT_multisampled_render_to_texture2.
>
> Signed-off-by: Kristian H. Kristensen <hoegsb...@chromium.org>

> diff --git a/src/gallium/docs/source/screen.rst 
> b/src/gallium/docs/source/screen.rst
> index 0abd164494c..cf2ce33b87f 100644
> --- a/src/gallium/docs/source/screen.rst
> +++ b/src/gallium/docs/source/screen.rst
> @@ -477,6 +477,9 @@ subpixel precision bias in bits during conservative 
> rasterization.
>    0 means no limit.
>  * ``PIPE_CAP_MAX_VERTEX_ELEMENT_SRC_OFFSET``: The maximum supported value for
>    of pipe_vertex_element::src_offset.
> +* ``PIPE_CAP_SURFACEA_SAMPLE_COUNT_TEXTURE``: Whether the driver
> +  supports pipe_surface overrides of resource nr_samples. If set, will
> +  enable EXT_multisampled_render_to_texture.

s/SURFACEA/SURFACE/

>  
>  .. _pipe_capf:
>  
> diff --git a/src/gallium/include/pipe/p_defines.h 
> b/src/gallium/include/pipe/p_defines.h
> index e99895d30d8..6d96f1ccb5b 100644
> --- a/src/gallium/include/pipe/p_defines.h
> +++ b/src/gallium/include/pipe/p_defines.h
> @@ -832,6 +832,7 @@ enum pipe_cap
>     PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTER_BUFFERS,
>     PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET,
>     PIPE_CAP_MAX_VERTEX_ELEMENT_SRC_OFFSET,
> +   PIPE_CAP_SURFACE_SAMPLE_COUNT,
>  };
>  
>  /**
> diff --git a/src/gallium/include/pipe/p_state.h 
> b/src/gallium/include/pipe/p_state.h
> index fd670345aad..89cffb15bd8 100644
> --- a/src/gallium/include/pipe/p_state.h
> +++ b/src/gallium/include/pipe/p_state.h
> @@ -443,6 +443,12 @@ struct pipe_surface
>     uint16_t width;               /**< logical width in pixels */
>     uint16_t height;              /**< logical height in pixels */
>  
> +   /** Number of samples for the surface.  This can be different from the
> +    * resource nr_samples when the resource is bound using
> +    * FramebufferTexture2DMultisampleEXT.
> +    */
> +   unsigned nr_samples:8;

Don't you mean:

/**
 * Number of samples for the surface.  This will be 0 if rendering
 * should use the resource's nr_samples, or another value if the resource
 * is bound using FramebufferTexture2DMultisampleEXT
 */

Other than that, 1-3 are:

Reviewed-by: Eric Anholt <e...@anholt.net>

Attachment: signature.asc
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to