[Mesa-dev] [PATCH] gallium: add support for layered rendering
Christoph Bumiller
e0425955 at student.tuwien.ac.at
Fri May 31 16:22:40 PDT 2013
On 01.06.2013 01:02, Alex Deucher wrote:
> On Fri, May 31, 2013 at 6:54 PM, Roland Scheidegger <sroland at vmware.com> wrote:
>> Am 31.05.2013 23:43, schrieb sroland at vmware.com:
>>> From: Roland Scheidegger <sroland at 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 :-).
> FWIW, I prefer PIPE_CAP_LAYERED_RENDERING as well. Other colors:
>
> PIPE_CAP_RENDER_TARGET_INDEX
> PIPE_CAP_RENDER_TARGET_ARRAY_INDEX
> PIPE_CAP_RENDER_TARGET_LAYERS
Or PIPE_CAP_GS_LAYER_SELECTION to make it clear that the driver doesn't
support GL_AMD_vertex_shader_layer ?
> Alex
>
>> 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 at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> 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