[Mesa-dev] [PATCH] mesa: Implement ARB_shader_viewport_layer_array for i965

Kenneth Graunke kenneth at whitecape.org
Mon Sep 19 22:13:23 UTC 2016


On Friday, September 9, 2016 4:14:55 PM PDT Dylan Baker wrote:
> This extension is a combination of AMD_vertex_shader_viewport_index and
> AMD_vertex_shader_layer, making it rather trivial to implement.
> 
> For gallium I *think* this needs a new cap because of the addition of
> support in tessellation evaluation shaders, and since I don't have any
> hardware to test it on, I've left that for someone else to wire up.
> 
> Since this requires GL 4.1, this is only available on gen8+.

You've actually enabled this on Gen6+, by virtue of:

> diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
> index 0f28546..6573bc2 100644
> --- a/src/mesa/drivers/dri/i965/intel_extensions.c
> +++ b/src/mesa/drivers/dri/i965/intel_extensions.c
> @@ -330,6 +330,7 @@ intelInitExtensions(struct gl_context *ctx)
>         */
>        if (ctx->API == API_OPENGL_CORE) {
>           ctx->Extensions.ARB_shader_subroutine = true;
> +         ctx->Extensions.ARB_shader_viewport_layer_array = true;
>           ctx->Extensions.ARB_viewport_array = true;
>           ctx->Extensions.AMD_vertex_shader_viewport_index = true;
>        }

   ^^^ this is in a Gen6+ and core only block.

I agree with Ilia that this is the right thing to do - it makes sense
to expose it where AMD_vertex_shader_viewport_index is already exposed.

I'd just drop that sentence from your commit message.

> diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
> index 75cdcb8..38636b4 100644
> --- a/src/mesa/main/extensions_table.h
> +++ b/src/mesa/main/extensions_table.h
> @@ -115,6 +115,7 @@ EXT(ARB_shader_storage_buffer_object        , ARB_shader_storage_buffer_object
>  EXT(ARB_shader_subroutine                   , ARB_shader_subroutine                  ,  x , GLC,  x ,  x , 2010)
>  EXT(ARB_shader_texture_image_samples        , ARB_shader_texture_image_samples       , GLL, GLC,  x ,  x , 2014)
>  EXT(ARB_shader_texture_lod                  , ARB_shader_texture_lod                 , GLL, GLC,  x ,  x , 2009)
> +EXT(ARB_shader_viewport_layer_array         , ARB_shader_viewport_layer_array        , GLL, GLC,  x ,  x , 2015)
>  EXT(ARB_shading_language_100                , dummy_true                             , GLL,  x ,  x ,  x , 2003)
>  EXT(ARB_shading_language_420pack            , ARB_shading_language_420pack           , GLL, GLC,  x ,  x , 2011)
>  EXT(ARB_shading_language_packing            , ARB_shading_language_packing           , GLL, GLC,  x ,  x , 2011)

As Ilia mentioned, please drop "GLL", changing it to " x ".

Otherwise, this is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160919/2ae44fee/attachment.sig>


More information about the mesa-dev mailing list