[Mesa-dev] [PATCH] gallium: add support for layered rendering

Roland Scheidegger sroland at vmware.com
Fri May 31 17:42:20 PDT 2013


Am 01.06.2013 01:22, schrieb Christoph Bumiller:
> 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 ?

Actually now that you mention GS I think we could probably get rid of
the cap bit entirely and just depend on the PIPE_SHADER_GEOMETRY query
to expose this, as it's pretty much tied to it anyway?

Roland


More information about the mesa-dev mailing list