[Mesa-dev] [PATCH v2 3/3] mesa/st: enable ARB_fragment_layer_viewport

Ilia Mirkin imirkin at alum.mit.edu
Mon Jun 23 07:43:40 PDT 2014


On Mon, Jun 23, 2014 at 9:51 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> On Mon, Jun 23, 2014 at 9:39 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>> If multiple viewports are supported, that implies the presence of a GS
>> and layered rendering, so we can enable ARB_fragment_layer_viewport as
>> well.
>>
>> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
>> ---
>>
>> Untested on r600, but nv50/nvc0/llvmpipe seem to pass basic testing.
>
> Grr... actually llvmpipe fails for viewport, but works for layer.

But... it draws all black instead of red, which means it's probably
either my or llvmpipe's understanding of default viewport state that's
wrong. I assumed that by default viewports were initialized s.t. they
would "Just Work" without having to be touched. Or... it's not
clamping the viewport index properly. Will investigate later.

If someone with r600g could test this series out with the 2 piglit
tests I sent to piglit@, that'd be great
(http://patchwork.freedesktop.org/patch/28375/ -- no actual deps on
chrisf's series if you run them directly via shader_runner.)

>
>>
>>  docs/GL3.txt                           | 2 +-
>>  docs/relnotes/10.3.html                | 1 +
>>  src/mesa/state_tracker/st_extensions.c | 1 +
>>  3 files changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/docs/GL3.txt b/docs/GL3.txt
>> index 47165fe..ab90997 100644
>> --- a/docs/GL3.txt
>> +++ b/docs/GL3.txt
>> @@ -161,7 +161,7 @@ GL 4.3:
>>    GL_ARB_copy_image                                    not started
>>    GL_KHR_debug                                         DONE (all drivers)
>>    GL_ARB_explicit_uniform_location                     DONE (all drivers that support GLSL)
>> -  GL_ARB_fragment_layer_viewport                       not started
>> +  GL_ARB_fragment_layer_viewport                       DONE (nv50, nvc0, r600)
>>    GL_ARB_framebuffer_no_attachments                    not started
>>    GL_ARB_internalformat_query2                         not started
>>    GL_ARB_invalidate_subdata                            DONE (all drivers)
>> diff --git a/docs/relnotes/10.3.html b/docs/relnotes/10.3.html
>> index ecc8580..99e0311 100644
>> --- a/docs/relnotes/10.3.html
>> +++ b/docs/relnotes/10.3.html
>> @@ -53,6 +53,7 @@ Note: some of the new features are only available with certain drivers.
>>  <li>GL_ARB_texture_query_levels on nv50, nvc0, llvmpipe, r600, radeonsi, softpipe</li>
>>  <li>GL_ARB_texture_query_lod on radeonsi</li>
>>  <li>GL_ARB_viewport_array on nvc0</li>
>> +<li>GL_ARB_fragment_layer_viewport on nv50, nvc0, llvmpipe, r600</li>
>>  </ul>
>>
>>
>> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
>> index e938046..8cd6aa3 100644
>> --- a/src/mesa/state_tracker/st_extensions.c
>> +++ b/src/mesa/state_tracker/st_extensions.c
>> @@ -809,6 +809,7 @@ void st_init_extensions(struct st_context *st)
>>           ctx->Const.ViewportBounds.Min = -16384.0;
>>           ctx->Const.ViewportBounds.Max = 16384.0;
>>           ctx->Extensions.ARB_viewport_array = GL_TRUE;
>> +         ctx->Extensions.ARB_fragment_layer_viewport = GL_TRUE;
>>        }
>>     }
>>     if (ctx->Const.MaxProgramTextureGatherComponents > 0)
>> --
>> 1.8.5.5
>>


More information about the mesa-dev mailing list