Am 31.05.2013 23:43, schrieb srol...@vmware.com:
> From: Roland Scheidegger <srol...@vmware.com>
> 
> Since pipe_surface already has all the necessary fields no interface
> changes are necessary except adding a new shader semantic value
> (TGSI_SEMANTIC_LAYER), though add a pipe capability bit for it as well.
> (Note that what GL knows as "gl_Layer" variable d3d10 is naming
> "RENDER_TARGET_ARRAY_INDEX")
> ---
>  src/gallium/docs/source/screen.rst         |    2 ++
>  src/gallium/include/pipe/p_defines.h       |    3 ++-
>  src/gallium/include/pipe/p_shader_tokens.h |    3 ++-
>  3 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/src/gallium/docs/source/screen.rst 
> b/src/gallium/docs/source/screen.rst
> index 683080c..b74b237 100644
> --- a/src/gallium/docs/source/screen.rst
> +++ b/src/gallium/docs/source/screen.rst
> @@ -168,6 +168,8 @@ The integer capabilities:
>    since they are linked) a driver can support. Returning 0 is equivalent
>    to returning 1 because every driver has to support at least a single
>    viewport/scissor combination.  
> +* ``PIPE_CAP_LAYERED_RENDERING``: Whether rendering to multiple layers is
> +  supported using layer selection by the TGSI_SEMANTIC_LAYER shader variable.
>  
>  
>  .. _pipe_capf:
> diff --git a/src/gallium/include/pipe/p_defines.h 
> b/src/gallium/include/pipe/p_defines.h
> index 8af1a84..c359a9e 100644
> --- a/src/gallium/include/pipe/p_defines.h
> +++ b/src/gallium/include/pipe/p_defines.h
> @@ -508,7 +508,8 @@ enum pipe_cap {
>     PIPE_CAP_QUERY_PIPELINE_STATISTICS = 81,
>     PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK = 82,
>     PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE = 83,
> -   PIPE_CAP_MAX_VIEWPORTS = 84
> +   PIPE_CAP_MAX_VIEWPORTS = 84,
> +   PIPE_CAP_MULTIPLE_LAYERS = 85
>  };
Actually I don't think is a good name, PIPE_CAP_LAYERED_RENDERING might
be better?
I'm open to just about any suggestion though :-).

Roland


>  
>  #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)
> diff --git a/src/gallium/include/pipe/p_shader_tokens.h 
> b/src/gallium/include/pipe/p_shader_tokens.h
> index b33cf1d..c984d50 100644
> --- a/src/gallium/include/pipe/p_shader_tokens.h
> +++ b/src/gallium/include/pipe/p_shader_tokens.h
> @@ -165,7 +165,8 @@ struct tgsi_declaration_interp
>  #define TGSI_SEMANTIC_TEXCOORD   19 /**< texture or sprite coordinates */
>  #define TGSI_SEMANTIC_PCOORD     20 /**< point sprite coordinate */
>  #define TGSI_SEMANTIC_VIEWPORT_INDEX 21 /**< viewport index */
> -#define TGSI_SEMANTIC_COUNT      22 /**< number of semantic values */
> +#define TGSI_SEMANTIC_LAYER      22 /**< layer (rendertarget index) */
> +#define TGSI_SEMANTIC_COUNT      23 /**< number of semantic values */
>  
>  struct tgsi_declaration_semantic
>  {
> 
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to