Mesa (master): mesa: Remove unused gl_config::mutableRenderBuffer

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 6 16:44:31 UTC 2021


Module: Mesa
Branch: master
Commit: 84d6ee0920b78a85698be8ec49b0f943b8bc2c1d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=84d6ee0920b78a85698be8ec49b0f943b8bc2c1d

Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Apr  5 16:12:29 2021 -0400

mesa: Remove unused gl_config::mutableRenderBuffer

This bit is only meaningful for EGL, where we in fact derive it from
whether EGL_KHR_mutable_render_buffer is enabled and don't actually look
at the DRI attribute.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10045>

---

 src/gallium/frontends/dri/dri_screen.c        |  4 ++--
 src/mesa/drivers/dri/common/utils.c           | 11 ++++-------
 src/mesa/drivers/dri/common/utils.h           |  3 +--
 src/mesa/drivers/dri/i915/intel_screen.c      |  4 ++--
 src/mesa/drivers/dri/i965/brw_screen.c        |  7 +++----
 src/mesa/drivers/dri/nouveau/nouveau_screen.c |  2 +-
 src/mesa/drivers/dri/radeon/radeon_screen.c   |  2 +-
 src/mesa/main/mtypes.h                        |  3 ---
 8 files changed, 14 insertions(+), 22 deletions(-)

diff --git a/src/gallium/frontends/dri/dri_screen.c b/src/gallium/frontends/dri/dri_screen.c
index c09dfc68a2b..c5c62e59330 100644
--- a/src/gallium/frontends/dri/dri_screen.c
+++ b/src/gallium/frontends/dri/dri_screen.c
@@ -320,7 +320,7 @@ dri_fill_in_modes(struct dri_screen *screen)
                                         depth_buffer_factor, back_buffer_modes,
                                         ARRAY_SIZE(back_buffer_modes),
                                         msaa_modes, 1,
-                                        GL_TRUE, !mixed_color_depth, GL_FALSE);
+                                        GL_TRUE, !mixed_color_depth);
          configs = driConcatConfigs(configs, new_configs);
 
          /* Multi-sample configs without an accumulation buffer. */
@@ -330,7 +330,7 @@ dri_fill_in_modes(struct dri_screen *screen)
                                            depth_buffer_factor, back_buffer_modes,
                                            ARRAY_SIZE(back_buffer_modes),
                                            msaa_modes+1, num_msaa_modes-1,
-                                           GL_FALSE, !mixed_color_depth, GL_FALSE);
+                                           GL_FALSE, !mixed_color_depth);
             configs = driConcatConfigs(configs, new_configs);
          }
       }
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 63e6bbe0567..a42f7fdc81a 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -162,9 +162,6 @@ driGetRendererString( char * buffer, const char * hardware_name,
  * \param color_depth_match Whether the color depth must match the zs depth
  *                          This forces 32-bit color to have 24-bit depth, and
  *                          16-bit color to have 16-bit depth.
- * \param mutable_render_buffer Enable __DRI_ATTRIB_MUTABLE_RENDER_BUFFER,
- *                              which translates to
- *                              EGL_MUTABLE_RENDER_BUFFER_BIT_KHR.
  *
  * \returns
  * Pointer to any array of pointers to the \c __DRIconfig structures created
@@ -178,8 +175,7 @@ driCreateConfigs(mesa_format format,
 		 unsigned num_depth_stencil_bits,
 		 const GLenum * db_modes, unsigned num_db_modes,
 		 const uint8_t * msaa_samples, unsigned num_msaa_modes,
-		 GLboolean enable_accum, GLboolean color_depth_match,
-		 GLboolean mutable_render_buffer)
+		 GLboolean enable_accum, GLboolean color_depth_match)
 {
    static const struct {
       uint32_t masks[4];
@@ -361,7 +357,6 @@ driCreateConfigs(mesa_format format,
 		    modes->samples = msaa_samples[h];
 
 		    modes->sRGBCapable = is_srgb;
-		    modes->mutableRenderBuffer = mutable_render_buffer;
 		}
 	    }
 	}
@@ -503,7 +498,9 @@ driGetConfigAttribIndex(const __DRIconfig *config,
                  __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT;
         break;
     __ATTRIB(__DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE,	sRGBCapable);
-    __ATTRIB(__DRI_ATTRIB_MUTABLE_RENDER_BUFFER,	mutableRenderBuffer);
+    case __DRI_ATTRIB_MUTABLE_RENDER_BUFFER:
+        *value = GL_FALSE;
+        break;
     __ATTRIB(__DRI_ATTRIB_RED_SHIFT,			redShift);
     __ATTRIB(__DRI_ATTRIB_GREEN_SHIFT,			greenShift);
     __ATTRIB(__DRI_ATTRIB_BLUE_SHIFT,			blueShift);
diff --git a/src/mesa/drivers/dri/common/utils.h b/src/mesa/drivers/dri/common/utils.h
index 7c9719f9f42..7be0465c261 100644
--- a/src/mesa/drivers/dri/common/utils.h
+++ b/src/mesa/drivers/dri/common/utils.h
@@ -45,8 +45,7 @@ driCreateConfigs(mesa_format format,
 		 unsigned num_depth_stencil_bits,
 		 const GLenum * db_modes, unsigned num_db_modes,
 		 const uint8_t * msaa_samples, unsigned num_msaa_modes,
-		 GLboolean enable_accum, GLboolean color_depth_match,
-		 GLboolean mutable_render_buffer);
+		 GLboolean enable_accum, GLboolean color_depth_match);
 
 __DRIconfig **driConcatConfigs(__DRIconfig **a,
 			       __DRIconfig **b);
diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c
index f13a7504ada..33ca0321722 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.c
+++ b/src/mesa/drivers/dri/i915/intel_screen.c
@@ -1066,7 +1066,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
                                      num_depth_stencil_bits,
                                      back_buffer_modes, 2,
                                      singlesample_samples, 1,
-                                     false, false, false);
+                                     false, false);
       configs = driConcatConfigs(configs, new_configs);
    }
 
@@ -1088,7 +1088,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
                                      depth_bits, stencil_bits, 1,
                                      back_buffer_modes, 1,
                                      singlesample_samples, 1,
-                                     true, false, false);
+                                     true, false);
       configs = driConcatConfigs(configs, new_configs);
    }
 
diff --git a/src/mesa/drivers/dri/i965/brw_screen.c b/src/mesa/drivers/dri/i965/brw_screen.c
index 2399eed2793..23eb5f57fce 100644
--- a/src/mesa/drivers/dri/i965/brw_screen.c
+++ b/src/mesa/drivers/dri/i965/brw_screen.c
@@ -2279,8 +2279,7 @@ brw_screen_make_configs(__DRIscreen *dri_screen)
                                      num_depth_stencil_bits,
                                      back_buffer_modes, 2,
                                      singlesample_samples, 1,
-                                     false, false,
-                                     /*mutable_render_buffer*/ true);
+                                     false, false);
       configs = driConcatConfigs(configs, new_configs);
    }
 
@@ -2313,7 +2312,7 @@ brw_screen_make_configs(__DRIscreen *dri_screen)
                                      depth_bits, stencil_bits, 1,
                                      back_buffer_modes, 1,
                                      singlesample_samples, 1,
-                                     true, false, false);
+                                     true, false);
       configs = driConcatConfigs(configs, new_configs);
    }
 
@@ -2378,7 +2377,7 @@ brw_screen_make_configs(__DRIscreen *dri_screen)
                                      back_buffer_modes, 1,
                                      multisample_samples,
                                      num_msaa_modes,
-                                     false, false, false);
+                                     false, false);
       configs = driConcatConfigs(configs, new_configs);
    }
 
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
index 447af094675..c92efcd7b20 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
@@ -79,7 +79,7 @@ nouveau_get_configs(uint32_t chipset)
 					  ARRAY_SIZE(back_buffer_modes),
 					  msaa_samples,
 					  ARRAY_SIZE(msaa_samples),
-					  GL_TRUE, chipset < 0x10, GL_FALSE);
+					  GL_TRUE, chipset < 0x10);
 		assert(config);
 
 		configs = driConcatConfigs(configs, config);
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index f34737c41c1..67b3af674e6 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -838,7 +838,7 @@ __DRIconfig **radeonInitScreen2(__DRIscreen *psp)
 				     ARRAY_SIZE(back_buffer_modes),
 				     msaa_samples_array,
 				     ARRAY_SIZE(msaa_samples_array),
-				     GL_TRUE, GL_FALSE, GL_FALSE);
+				     GL_TRUE, GL_FALSE);
       configs = driConcatConfigs(configs, new_configs);
    }
 
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 5478b9220c7..5563c26f439 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -178,9 +178,6 @@ struct gl_config
 
    /* EXT_framebuffer_sRGB */
    GLint sRGBCapable;
-
-   /* EGL_KHR_mutable_render_buffer */
-   GLuint mutableRenderBuffer; /* bool */
 };
 
 



More information about the mesa-commit mailing list