glapi: fixup EXT_multisampled_render_to_texture dispatch
authorKristian H. Kristensen <hoegsberg@gmail.com>
Mon, 10 Dec 2018 18:14:34 +0000 (18:14 +0000)
committerKristian H. Kristensen <hoegsberg@chromium.org>
Mon, 10 Dec 2018 23:09:07 +0000 (15:09 -0800)
There's a few missing and convoluted bits:

 - FramebufferTexture2DMultisampleEXT
Missing sanity check, should be desktop="false"

 - RenderbufferStorageMultisampleEXT
Missing sanity check, is aliased to RenderbufferStorageMultisample.
Thus it's set only when desktop GL or GLES2 v3.0+, while the extension
is GLES2 2.0+.

If we flip the aliasing we'll break indirect GLX, so loosen the version
to 2.0. Not perfect, yet this is the most sane thing I could think of.

v2: [Emil] Fixup RenderbufferStorageMultisampleEXT, commmit message

Cc: Kristian H. Kristensen <hoegsberg@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108974
Fixes: 1b331ae505e ("mesa: Add core support for EXT_multisampled_render_to_texture{,2}")
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
src/mapi/glapi/gen/ARB_framebuffer_object.xml
src/mapi/glapi/gen/EXT_multisampled_render_to_texture.xml
src/mapi/glapi/gen/es_EXT.xml
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/tests/dispatch_sanity.cpp

index bd0793c8ece0e38c1983d20259425b55a5ae11b8..295175c88161db0848b7c297e49acc887d9b557b 100644 (file)
        <glx rop="4318"/>
     </function>
 
-    <function name="RenderbufferStorageMultisample" es2="3.0">
+<!--
+    The EXT aliasee, as part of EXT_multisampled_render_to_texture can
+    work on GLES 2.0. While the entry point below is only set when
+    gl || (gles && version > 3.0)
+
+    As such, the entrypoint will be noop, and calling it will do nothing.
+    Workaround that by loosening the version to 2.0.
+ -->
+    <function name="RenderbufferStorageMultisample" es2="2.0">
         <param name="target" type="GLenum"/>
         <param name="samples" type="GLsizei"/>
         <param name="internalformat" type="GLenum"/>
index 555b008bd33fec49d7b298e4b5c30e955dfd978a..d76ecd47d0e820b4ec359b9821f8f2b12ac06357 100644 (file)
@@ -20,7 +20,7 @@
     </function>
 -->
 
-    <function name="FramebufferTexture2DMultisampleEXT" es2="2.0">
+    <function name="FramebufferTexture2DMultisampleEXT" es2="2.0" desktop="false">
         <param name="target" type="GLenum"/>
         <param name="attachment" type="GLenum"/>
         <param name="textarget" type="GLenum"/>
index bbc4a1a11187b009dd1a968a989a149577844832..917fed62f98cd1130c26ed4c27540b294e54cd22 100644 (file)
     <enum name="RG8_EXT"                                  value="0x822B"/>
 </category>
 
+<xi:include href="EXT_multisampled_render_to_texture.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 <!-- 111. GL_ANGLE_texture_compression_dxt -->
 <category name="GL_ANGLE_texture_compression_dxt" number="111">
     <enum name="COMPRESSED_RGBA_S3TC_DXT3_ANGLE"        value="0x83F2"/>
index f1def8090deb2a651461fba8b64c7aff039f43b6..f4d0808f13b9da654d1597f0e74dff259e3bda73 100644 (file)
 
 <xi:include href="ARB_robustness.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
-<xi:include href="EXT_multisampled_render_to_texture.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-
 <xi:include href="ARB_base_instance.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
 <category name="GL_ARB_transform_feedback_instanced" number="109">
index fb2acfbdeeadc5fc8c7815b35c982995a73cdb19..307639a4a4e7bff7187ae39872d59d31bf42e193 100644 (file)
@@ -2236,6 +2236,10 @@ const struct function gles2_functions_possible[] = {
    /* GL_NV_conservative_raster_pre_snap_triangles */
    { "glConservativeRasterParameteriNV", 20, -1 },
 
+   /* GL_EXT_multisampled_render_to_texture */
+   { "glRenderbufferStorageMultisampleEXT", 20, -1 },
+   { "glFramebufferTexture2DMultisampleEXT", 20, -1 },
+
    { NULL, 0, -1 }
 };
 
@@ -2330,7 +2334,7 @@ const struct function gles3_functions_possible[] = {
    // glProgramParameteri aliases glProgramParameteriEXT in GLES 2
    // We check for the aliased -NV version in GLES 2
    // { "glReadBuffer", 30, -1 },
-   { "glRenderbufferStorageMultisample", 30, -1 },
+   // glRenderbufferStorageMultisample aliases glRenderbufferStorageMultisampleEXT in GLES 2
    { "glResumeTransformFeedback", 30, -1 },
    { "glSamplerParameterf", 30, -1 },
    { "glSamplerParameterfv", 30, -1 },