[Mesa-dev] [PATCH 09/17] mesa: Expose MAX_GEOMETRY_{INPUT, OUTPUT}_COMPONENTS on OpenGL 3.2

Ian Romanick idr at freedesktop.org
Wed Sep 11 14:07:20 PDT 2013


On 09/11/2013 03:58 PM, Paul Berry wrote:
> On 10 September 2013 12:10, Ian Romanick <idr at freedesktop.org
> <mailto:idr at freedesktop.org>> wrote:
> 
>     From: Ian Romanick <ian.d.romanick at intel.com
>     <mailto:ian.d.romanick at intel.com>>
> 
>     Signed-off-by: Ian Romanick <ian.d.romanick at intel.com
>     <mailto:ian.d.romanick at intel.com>>
>     Cc: Paul Berry <stereotype441 at gmail.com
>     <mailto:stereotype441 at gmail.com>>
>     ---
>      src/mesa/main/get_hash_params.py | 4 +++-
>      1 file changed, 3 insertions(+), 1 deletion(-)
> 
>     diff --git a/src/mesa/main/get_hash_params.py
>     b/src/mesa/main/get_hash_params.py
>     index 1384134..6681123 100644
>     --- a/src/mesa/main/get_hash_params.py
>     +++ b/src/mesa/main/get_hash_params.py
>     @@ -329,9 +329,11 @@ descriptor=[
>        [ "MAJOR_VERSION", "LOC_CUSTOM, TYPE_INT, 0, extra_gl30_es3" ],
>        [ "MINOR_VERSION", "LOC_CUSTOM, TYPE_INT, 0, extra_gl30_es3" ],
> 
>     -  # GL 3.0 / GLES3
>     +  # GL 3.2 / GLES3
>        [ "MAX_VERTEX_OUTPUT_COMPONENTS",
>     "CONTEXT_INT(Const.VertexProgram.MaxOutputComponents),
>     extra_gl32_es3" ],
>        [ "MAX_FRAGMENT_INPUT_COMPONENTS",
>     "CONTEXT_INT(Const.FragmentProgram.MaxInputComponents),
>     extra_gl32_es3" ],
>     +  [ "MAX_GEOMETRY_INPUT_COMPONENTS",
>     "CONTEXT_INT(Const.GeometryProgram.MaxInputComponents),
>     extra_version_32" ],
>     +  [ "MAX_GEOMETRY_OUTPUT_COMPONENTS",
>     "CONTEXT_INT(Const.GeometryProgram.MaxOutputComponents),
>     extra_version_32" ],
> 
> 
> It troubles me to see geometry-shader-related constants under a comment
> that says "GLES3".  Maybe make a section for "GL 3.2 / GLES3" for
> MAX_VERTEX_OUTPUT_COMPONENTS and MAX_FRAGMENT_INPUT_COMPONENTS and a
> section "GL 3.2" for MAX_GEOMETRY_{INPUT,OUTPUT}_COMPONENTS?

That's fair.  I can split those out under a "# GL 3.2" header.

> Also, was the old "GL 3.0" comment just bogus?  It might be worth
> explaining that in the commit message.  It would have saved me a bunch
> of spec digging :)

Yes.  The MAX_VERTEX_OUTPUT_COMPONENTS and MAX_FRAGMENT_INPUT_COMPONENTS
queries were added in OpenGL 3.2 (with geometry shaders) and OpenGL ES 3.0.

> In any case, the patch is:
> 
> Reviewed-by: Paul Berry <stereotype441 at gmail.com
> <mailto:stereotype441 at gmail.com>>
>  
> 
> 
>      # GL_ARB_ES3_compatibility
>        [ "MAX_ELEMENT_INDEX", "CONTEXT_INT64(Const.MaxElementIndex),
>     extra_ARB_ES3_compatibility_api_es3"],
>     --
>     1.8.1.4



More information about the mesa-dev mailing list