On Fri 15 Jun 2018, Fritz Koenig wrote: > On Tue, Jun 12, 2018 at 12:28 PM Chad Versace <chadvers...@chromium.org> > wrote: > > > > On Thu 07 Jun 2018, Fritz Koenig wrote:
> > > --- a/src/mesa/main/extensions_table.h > > > +++ b/src/mesa/main/extensions_table.h > > > @@ -322,6 +322,7 @@ EXT(KHR_texture_compression_astc_hdr , > > > KHR_texture_compression_astc_hdr > > > EXT(KHR_texture_compression_astc_ldr , > > > KHR_texture_compression_astc_ldr , GLL, GLC, x , ES2, 2012) > > > EXT(KHR_texture_compression_astc_sliced_3d , > > > KHR_texture_compression_astc_sliced_3d , GLL, GLC, x , ES2, 2015) > > > > > > +EXT(MESA_framebuffer_flip_y , MESA_framebuffer_flip_y > > > , x, x, x , ES2, 2018) > > > > Since the extension requires GLES 3.1, this row should have s/ES2/31/. > > > > I don't see the option for an ES31 extension, only ES2 in that file. It's non-obvious, but placing a literal 31 in that column does the right thing. Search the table, and you will find entries in this column with literal values 30 and 31 in addition to ES2. A little bit of poorly documented tribal knowledge... In the taxonomy of OpenGL (and ES) contexts, there currently exist four top-level branches. It took multiple years of API specification experiments, some good and other mistakes, to create the top-level taxonomy. Surprisingly, old man GLX is the only API to get this correct, in extension GLX_EXT_create_context_es2_profile. (GLX got it right probably because GLX_EXT_create_context_es2_profile was the last extension to be written in the group of "context taxonomy" extensions, and so was written after everyone learned from the past mistakes). The term used by GLX_EXT_create_context_es2_profile for this hiearchy in the taxonomy is "profile". Here are the 4: ES1 := { OpenGL ES x.y where x = 1 } = { OpenGL ES 1.0 , OpenGL ES 1.1, , and minor variants of which no one remembers the name } ES2 := { OpenGL ES x.y where 2 <= x <= 3 } CORE := { OpenGL x.y where x.y >= 3.2 and glGetIntegerv(GL_CONTEXT_PROFILE_MASK) contains GL_CONTEXT_PROFILE_CORE_BIT } COMPATIBILITY := { OpenGL x.y where x.y <= 3.0 or (x.y >= 3.2 and glGetIntegerv(GL_CONTEXT_PROFILE_MASK) contains GL_CONTEXT_PROFILE_COMPATIBILITY_BIT) } That's why the file defines no token for ES31. It's a subclass of ES2. The file defines ES2 = 0, and x = ~0. When Mesa examines this table in reponse glGetString(GL_EXTENSIONS), it scans the column for the current context's profile. For each row it compares (context_version >= column_value). That's why inserting 31 in the column magically works. Instead of the macro ES2, we could equivalently insert 20 into the column, or even 0, since no context versions < 2.0 exist in the ES2 class. (In fact, ES2 is 0). _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev