[Mesa-dev] [PATCH v2] mesa/es3.1: Expose GL_ARB_framebuffer_no_attachments to GLES 3.1
Lofstedt, Marta
marta.lofstedt at intel.com
Fri Aug 28 04:42:30 PDT 2015
> -----Original Message-----
> From: mesa-dev [mailto:mesa-dev-bounces at lists.freedesktop.org] On
> Behalf Of Ilia Mirkin
> Sent: Thursday, August 27, 2015 11:51 PM
> To: Marta Lofstedt
> Cc: mesa-dev at lists.freedesktop.org
> Subject: Re: [Mesa-dev] [PATCH v2] mesa/es3.1: Expose
> GL_ARB_framebuffer_no_attachments to GLES 3.1
>
> On Thu, Aug 27, 2015 at 3:17 AM, Marta Lofstedt
> <marta.lofstedt at linux.intel.com> wrote:
> > From: Marta Lofstedt <marta.lofstedt at intel.com>
> >
> > V2: Conform to new standard for exposing enums for OpenGL ES 3.1.
> >
> > Signed-off-by: Marta Lofstedt <marta.lofstedt at intel.com>
>
> Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
>
Thanks for the review.
> While this patch is fine, it appears that ES3.1 doesn't have
> GL_FRAMEBUFFER_DEFAULT_LAYERS, although ES3.2 does. I'm guessing it
> comes in via OES_geometry_shader (which mesa does not expose right
> now).
Yes, I have noted that. I believe there are more geometry shader enums that need to be handled once we start enabling GLES 3.2.
BR,
/Marta
>
> Please look over the spec for any other differences.
>
> -ilia
>
> > ---
> > src/mapi/glapi/gen/ARB_framebuffer_no_attachments.xml | 4 ++--
> > src/mapi/glapi/gen/apiexec.py | 4 ++--
> > src/mesa/main/get_hash_params.py | 8 +++++---
> > src/mesa/main/tests/dispatch_sanity.cpp | 6 ++----
> > src/mesa/main/version.c | 2 +-
> > 5 files changed, 12 insertions(+), 12 deletions(-)
> >
> > diff --git a/src/mapi/glapi/gen/ARB_framebuffer_no_attachments.xml
> > b/src/mapi/glapi/gen/ARB_framebuffer_no_attachments.xml
> > index 59839a0..55ad764 100644
> > --- a/src/mapi/glapi/gen/ARB_framebuffer_no_attachments.xml
> > +++ b/src/mapi/glapi/gen/ARB_framebuffer_no_attachments.xml
> > @@ -15,13 +15,13 @@
> > <enum name="MAX_FRAMEBUFFER_LAYERS" value="0x9317"
> />
> > <enum name="MAX_FRAMEBUFFER_SAMPLES"
> value="0x9318" />
> >
> > - <function name="FramebufferParameteri">
> > + <function name="FramebufferParameteri" es2="3.1">
> > <param name="target" type="GLenum"/>
> > <param name="pname" type="GLenum"/>
> > <param name="param" type="GLint" />
> > </function>
> >
> > - <function name="GetFramebufferParameteriv">
> > + <function name="GetFramebufferParameteriv" es2="3.1">
> > <param name="target" type="GLenum" />
> > <param name="pname" type="GLenum" />
> > <param name="params" type="GLint *" output="true" /> diff
> > --git a/src/mapi/glapi/gen/apiexec.py b/src/mapi/glapi/gen/apiexec.py
> > index 3a0eb18..58ec08b 100644
> > --- a/src/mapi/glapi/gen/apiexec.py
> > +++ b/src/mapi/glapi/gen/apiexec.py
> > @@ -151,8 +151,8 @@ functions = {
> >
> > # OpenGL 4.3 / GL_ARB_framebuffer_no_attachments. Mesa can
> expose the
> > # extension with OpenGL 3.0.
> > - "FramebufferParameteri": exec_info(compatibility=30, core=31),
> > - "GetFramebufferParameteri": exec_info(compatibility=30, core=31),
> > + "FramebufferParameteri": exec_info(compatibility=30, core=31,
> es2=31),
> > + "GetFramebufferParameteri": exec_info(compatibility=30, core=31,
> > + es2=31),
> >
> > # OpenGL 4.5 / GL_ARB_direct_state_access. Mesa can expose the
> extension
> > # with core profile.
> > diff --git a/src/mesa/main/get_hash_params.py
> > b/src/mesa/main/get_hash_params.py
> > index 517c391..ddebade 100644
> > --- a/src/mesa/main/get_hash_params.py
> > +++ b/src/mesa/main/get_hash_params.py
> > @@ -450,6 +450,11 @@ descriptor=[
> >
> > # GL_ARB_explicit_uniform_location / GLES 3.1
> > [ "MAX_UNIFORM_LOCATIONS",
> > "CONTEXT_INT(Const.MaxUserAssignableUniformLocations),
> > extra_ARB_explicit_uniform_location_es31" ],
> > +
> > +# GL_ARB_framebuffer_no_attachments / GLES 3.1
> > + ["MAX_FRAMEBUFFER_WIDTH",
> "CONTEXT_INT(Const.MaxFramebufferWidth),
> > +extra_ARB_framebuffer_no_attachments"],
> > + ["MAX_FRAMEBUFFER_HEIGHT",
> > +"CONTEXT_INT(Const.MaxFramebufferHeight),
> > +extra_ARB_framebuffer_no_attachments"],
> > + ["MAX_FRAMEBUFFER_SAMPLES",
> > +"CONTEXT_INT(Const.MaxFramebufferSamples),
> > +extra_ARB_framebuffer_no_attachments"],
> > ]},
> >
> > # Enums in OpenGL Core profile and ES 3.1 @@ -811,10 +816,7 @@
> > descriptor=[
> > [ "MAX_GEOMETRY_IMAGE_UNIFORMS",
> >
> "CONTEXT_INT(Const.Program[MESA_SHADER_GEOMETRY].MaxImageUnif
> orms),
> > extra_ARB_shader_image_load_store_and_geometry_shader"],
> >
> > # GL_ARB_framebuffer_no_attachments
> > - ["MAX_FRAMEBUFFER_WIDTH",
> "CONTEXT_INT(Const.MaxFramebufferWidth),
> > extra_ARB_framebuffer_no_attachments"],
> > - ["MAX_FRAMEBUFFER_HEIGHT",
> "CONTEXT_INT(Const.MaxFramebufferHeight),
> extra_ARB_framebuffer_no_attachments"],
> > ["MAX_FRAMEBUFFER_LAYERS",
> > "CONTEXT_INT(Const.MaxFramebufferLayers),
> > extra_ARB_framebuffer_no_attachments"],
> > - ["MAX_FRAMEBUFFER_SAMPLES",
> > "CONTEXT_INT(Const.MaxFramebufferSamples),
> > extra_ARB_framebuffer_no_attachments"],
> >
> > # GL_EXT_polygon_offset_clamp
> > [ "POLYGON_OFFSET_CLAMP_EXT",
> "CONTEXT_FLOAT(Polygon.OffsetClamp),
> > extra_EXT_polygon_offset_clamp" ], diff --git
> > a/src/mesa/main/tests/dispatch_sanity.cpp
> > b/src/mesa/main/tests/dispatch_sanity.cpp
> > index 59107eb..b9a760f 100644
> > --- a/src/mesa/main/tests/dispatch_sanity.cpp
> > +++ b/src/mesa/main/tests/dispatch_sanity.cpp
> > @@ -2405,10 +2405,8 @@ const struct function
> gles31_functions_possible[] = {
> > { "glDrawArraysIndirect", 31, -1 },
> > { "glDrawElementsIndirect", 31, -1 },
> >
> > - // FINISHME: These two functions have not been implemented yet.
> They come
> > - // FINISHME: from the ARB_framebuffer_no_attachments extension.
> > - // { "glFramebufferParameteri", 31, -1 },
> > - // { "glGetFramebufferParameteriv", 31, -1 },
> > + { "glFramebufferParameteri", 31, -1 },
> > + { "glGetFramebufferParameteriv", 31, -1 },
> >
> > { "glGetProgramInterfaceiv", 31, -1 },
> > { "glGetProgramResourceIndex", 31, -1 }, diff --git
> > a/src/mesa/main/version.c b/src/mesa/main/version.c index
> > fd7ae53..d3e902e 100644
> > --- a/src/mesa/main/version.c
> > +++ b/src/mesa/main/version.c
> > @@ -450,7 +450,7 @@ compute_version_es2(const struct gl_extensions
> *extensions)
> > extensions->ARB_arrays_of_arrays &&
> > extensions->ARB_compute_shader &&
> > extensions->ARB_draw_indirect &&
> > - false /*extensions->ARB_framebuffer_no_attachments*/
> &&
> > + extensions->ARB_framebuffer_no_attachments
> > + &&
> > extensions->ARB_shader_atomic_counters &&
> > extensions->ARB_shader_image_load_store &&
> > false /*extensions->ARB_shader_image_size*/
> > &&
> > --
> > 1.9.1
> >
> > _______________________________________________
> > 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