summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorAdam Jackson <[email protected]>2019-09-06 11:51:23 -0400
committerAdam Jackson <[email protected]>2019-09-09 14:12:57 -0400
commit78e0fa6bb265afc11e7eab35ef6145b48b056ad0 (patch)
treee2a499e0b38a8cde0e74aa55f2a17a6fe842a17b /src/mesa/drivers
parentc4990b7b19b5ea4ebec1fa4c4a94bfed33c34b9f (diff)
mesa: Eliminate gl_config::have{Accum,Depth,Stencil}Buffer
Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/common/utils.c8
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_context.c6
-rw-r--r--src/mesa/drivers/dri/swrast/swrast.c6
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c6
-rw-r--r--src/mesa/drivers/x11/xm_api.c6
5 files changed, 12 insertions, 20 deletions
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 44e4e0f3720..8621c36e988 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -369,14 +369,6 @@ driCreateConfigs(mesa_format format,
modes->samples = msaa_samples[h];
modes->sampleBuffers = modes->samples ? 1 : 0;
-
- modes->haveAccumBuffer = ((modes->accumRedBits +
- modes->accumGreenBits +
- modes->accumBlueBits +
- modes->accumAlphaBits) > 0);
- modes->haveDepthBuffer = (modes->depthBits > 0);
- modes->haveStencilBuffer = (modes->stencilBits > 0);
-
modes->bindToTextureRgb = GL_TRUE;
modes->bindToTextureRgba = GL_TRUE;
modes->bindToMipmapTexture = GL_FALSE;
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
index 8fec35237c0..40102cfa4df 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -250,11 +250,11 @@ nouveau_update_renderbuffers(__DRIcontext *dri_ctx, __DRIdrawable *draw)
attachments[i++] = __DRI_BUFFER_FRONT_LEFT;
if (fb->Visual.doubleBufferMode)
attachments[i++] = __DRI_BUFFER_BACK_LEFT;
- if (fb->Visual.haveDepthBuffer && fb->Visual.haveStencilBuffer)
+ if (fb->Visual.depthBits > 0 && fb->Visual.stencilBits > 0)
attachments[i++] = __DRI_BUFFER_DEPTH_STENCIL;
- else if (fb->Visual.haveDepthBuffer)
+ else if (fb->Visual.depthBits > 0)
attachments[i++] = __DRI_BUFFER_DEPTH;
- else if (fb->Visual.haveStencilBuffer)
+ else if (fb->Visual.stencilBits > 0)
attachments[i++] = __DRI_BUFFER_STENCIL;
buffers = screen->dri2.loader->getBuffers(draw, &draw->w, &draw->h,
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 8e8d6bd628e..2bf4f0b9fed 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -584,9 +584,9 @@ dri_create_buffer(__DRIscreen * sPriv,
/* add software renderbuffers */
_swrast_add_soft_renderbuffers(fb,
GL_FALSE, /* color */
- visual->haveDepthBuffer,
- visual->haveStencilBuffer,
- visual->haveAccumBuffer,
+ visual->depthBits > 0,
+ visual->stencilBits > 0,
+ visual->accumRedBits > 0,
GL_FALSE, /* alpha */
GL_FALSE /* aux bufs */);
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index a065161b89e..5a3099af984 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -864,9 +864,9 @@ OSMesaCreateContextAttribs(const int *attribList, OSMesaContext sharelist)
*/
_swrast_add_soft_renderbuffers(osmesa->gl_buffer,
GL_FALSE, /* color */
- osmesa->gl_visual->haveDepthBuffer,
- osmesa->gl_visual->haveStencilBuffer,
- osmesa->gl_visual->haveAccumBuffer,
+ osmesa->gl_visual->depthBits > 0,
+ osmesa->gl_visual->stencilBits > 0,
+ osmesa->gl_visual->accumRedBits > 0,
GL_FALSE, /* alpha */
GL_FALSE /* aux */ );
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index 6857789a011..63936ac3e16 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -338,9 +338,9 @@ create_xmesa_buffer(XMesaDrawable d, BufferType type,
*/
_swrast_add_soft_renderbuffers(&b->mesa_buffer,
GL_FALSE, /* color */
- vis->mesa_visual.haveDepthBuffer,
- vis->mesa_visual.haveStencilBuffer,
- vis->mesa_visual.haveAccumBuffer,
+ vis->mesa_visual.depthBits > 0,
+ vis->mesa_visual.stencilBits > 0,
+ vis->mesa_visual.accumRedBits > 0,
GL_FALSE, /* software alpha buffer */
vis->mesa_visual.numAuxBuffers > 0 );