[Mesa-dev] [PATCH 2/8] glapi: define AMD_framebuffer_multisample_advanced and add its functions

Marek Olšák maraeo at gmail.com
Wed Aug 1 23:25:58 UTC 2018


From: Marek Olšák <marek.olsak at amd.com>

---
 src/mapi/glapi/gen/gl_API.xml | 27 +++++++++++++++++++++++++++
 src/mesa/main/fbobject.c      | 22 ++++++++++++++++++++++
 src/mesa/main/fbobject.h      | 10 ++++++++++
 3 files changed, 59 insertions(+)

diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 49807e1ea52..81e4ac08cce 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -13028,20 +13028,47 @@
 <xi:include href="EXT_window_rectangles.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
 <!-- 520. GL_EXT_shader_framebuffer_fetch -->
 <category name="GL_EXT_shader_framebuffer_fetch" number="520">
     <enum name="FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT" value="0x8A52"/>
     <function name="FramebufferFetchBarrierEXT" es2="2.0"/>
 </category>
 
 <!-- Unnumbered extensions sorted by name. -->
 
+<category name="GL_AMD_framebuffer_multisample_advanced">
+    <enum name="RENDERBUFFER_STORAGE_SAMPLES_AMD"          value="0x91B2"/>
+    <enum name="MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD"         value="0x91B3"/>
+    <enum name="MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD" value="0x91B4"/>
+    <enum name="MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD" value="0x91B5"/>
+    <enum name="NUM_SUPPORTED_MULTISAMPLE_MODES_AMD"       value="0x91B6"/>
+    <enum name="SUPPORTED_MULTISAMPLE_MODES_AMD"           value="0x91B7"/>
+
+    <function name="RenderbufferStorageMultisampleAdvancedAMD" es2="2.0">
+        <param name="target" type="GLenum"/>
+        <param name="samples" type="GLsizei"/>
+        <param name="storageSamples" type="GLsizei"/>
+        <param name="internalformat" type="GLenum"/>
+        <param name="width" type="GLsizei"/>
+        <param name="height" type="GLsizei"/>
+    </function>
+
+    <function name="NamedRenderbufferStorageMultisampleAdvancedAMD" es2="2.0">
+       <param name="renderbuffer" type="GLuint" />
+       <param name="samples" type="GLsizei" />
+       <param name="storageSamples" type="GLsizei"/>
+       <param name="internalformat" type="GLenum" />
+       <param name="width" type="GLsizei" />
+       <param name="height" type="GLsizei" />
+    </function>
+</category>
+
 <category name="GL_ATI_blend_equation_separate">
     <function name="BlendEquationSeparateATI" alias="BlendEquationSeparate">
         <param name="modeRGB" type="GLenum"/>
         <param name="modeA" type="GLenum"/>
     </function>
 </category>
 
 <category name="GL_ATI_separate_stencil">
     <enum name="STENCIL_BACK_FUNC_ATI"     count="1"  value="0x8800">
         <size name="Get" mode="get"/>
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index edafdd011aa..f63902c9dd4 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -2485,20 +2485,31 @@ void GLAPIENTRY
 _mesa_RenderbufferStorageMultisample(GLenum target, GLsizei samples,
                                      GLenum internalFormat,
                                      GLsizei width, GLsizei height)
 {
    renderbuffer_storage_target(target, internalFormat, width, height,
                                samples, samples,
                                "glRenderbufferStorageMultisample");
 }
 
 
+void GLAPIENTRY
+_mesa_RenderbufferStorageMultisampleAdvancedAMD(
+      GLenum target, GLsizei samples, GLsizei storageSamples,
+      GLenum internalFormat, GLsizei width, GLsizei height)
+{
+   renderbuffer_storage_target(target, internalFormat, width, height,
+                               samples, storageSamples,
+                               "glRenderbufferStorageMultisampleAdvancedAMD");
+}
+
+
 /**
  * OpenGL ES version of glRenderBufferStorage.
  */
 void GLAPIENTRY
 _es_RenderbufferStorageEXT(GLenum target, GLenum internalFormat,
                            GLsizei width, GLsizei height)
 {
    switch (internalFormat) {
    case GL_RGB565:
       /* XXX this confuses GL_RENDERBUFFER_INTERNAL_FORMAT_OES */
@@ -2529,20 +2540,31 @@ void GLAPIENTRY
 _mesa_NamedRenderbufferStorageMultisample(GLuint renderbuffer, GLsizei samples,
                                           GLenum internalformat,
                                           GLsizei width, GLsizei height)
 {
    renderbuffer_storage_named(renderbuffer, internalformat, width, height,
                               samples, samples,
                               "glNamedRenderbufferStorageMultisample");
 }
 
 
+void GLAPIENTRY
+_mesa_NamedRenderbufferStorageMultisampleAdvancedAMD(
+      GLuint renderbuffer, GLsizei samples, GLsizei storageSamples,
+      GLenum internalformat, GLsizei width, GLsizei height)
+{
+   renderbuffer_storage_named(renderbuffer, internalformat, width, height,
+                              samples, storageSamples,
+                              "glNamedRenderbufferStorageMultisampleAdvancedAMD");
+}
+
+
 static void
 get_render_buffer_parameteriv(struct gl_context *ctx,
                               struct gl_renderbuffer *rb, GLenum pname,
                               GLint *params, const char *func)
 {
    /* No need to flush here since we're just quering state which is
     * not effected by rendering.
     */
 
    switch (pname) {
diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h
index 0299781b1e5..5cd3c60297f 100644
--- a/src/mesa/main/fbobject.h
+++ b/src/mesa/main/fbobject.h
@@ -166,33 +166,43 @@ _mesa_CreateRenderbuffers(GLsizei n, GLuint *renderbuffers);
 
 extern void GLAPIENTRY
 _mesa_RenderbufferStorage(GLenum target, GLenum internalformat,
                              GLsizei width, GLsizei height);
 
 extern void GLAPIENTRY
 _mesa_RenderbufferStorageMultisample(GLenum target, GLsizei samples,
                                      GLenum internalformat,
                                      GLsizei width, GLsizei height);
 
+extern void GLAPIENTRY
+_mesa_RenderbufferStorageMultisampleAdvancedAMD(
+      GLenum target, GLsizei samples, GLsizei storageSamples,
+      GLenum internalFormat, GLsizei width, GLsizei height);
+
 extern void GLAPIENTRY
 _es_RenderbufferStorageEXT(GLenum target, GLenum internalFormat,
 			   GLsizei width, GLsizei height);
 
 extern void GLAPIENTRY
 _mesa_NamedRenderbufferStorage(GLuint renderbuffer, GLenum internalformat,
                                GLsizei width, GLsizei height);
 
 extern void GLAPIENTRY
 _mesa_NamedRenderbufferStorageMultisample(GLuint renderbuffer, GLsizei samples,
                                           GLenum internalformat,
                                           GLsizei width, GLsizei height);
 
+extern void GLAPIENTRY
+_mesa_NamedRenderbufferStorageMultisampleAdvancedAMD(
+      GLuint renderbuffer, GLsizei samples, GLsizei storageSamples,
+      GLenum internalformat, GLsizei width, GLsizei height);
+
 extern void GLAPIENTRY
 _mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
 
 extern void GLAPIENTRY
 _mesa_GetRenderbufferParameteriv(GLenum target, GLenum pname,
                                     GLint *params);
 
 void GLAPIENTRY
 _mesa_GetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname,
                                       GLint *params);
-- 
2.17.1



More information about the mesa-dev mailing list