diff options
author | Adam Jackson <[email protected]> | 2019-09-06 11:51:23 -0400 |
---|---|---|
committer | Adam Jackson <[email protected]> | 2019-09-09 14:12:57 -0400 |
commit | 78e0fa6bb265afc11e7eab35ef6145b48b056ad0 (patch) | |
tree | e2a499e0b38a8cde0e74aa55f2a17a6fe842a17b /src/mesa/main | |
parent | c4990b7b19b5ea4ebec1fa4c4a94bfed33c34b9f (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/main')
-rw-r--r-- | src/mesa/main/accum.c | 2 | ||||
-rw-r--r-- | src/mesa/main/clear.c | 6 | ||||
-rw-r--r-- | src/mesa/main/context.c | 4 | ||||
-rw-r--r-- | src/mesa/main/framebuffer.c | 3 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 4 |
5 files changed, 4 insertions, 15 deletions
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c index a0a206bea67..89ae31556d3 100644 --- a/src/mesa/main/accum.c +++ b/src/mesa/main/accum.c @@ -468,7 +468,7 @@ _mesa_Accum( GLenum op, GLfloat value ) return; } - if (ctx->DrawBuffer->Visual.haveAccumBuffer == 0) { + if (ctx->DrawBuffer->Visual.accumRedBits == 0) { _mesa_error(ctx, GL_INVALID_OPERATION, "glAccum(no accum buffer)"); return; } diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c index 6beff9ed842..9221c7287a3 100644 --- a/src/mesa/main/clear.c +++ b/src/mesa/main/clear.c @@ -203,17 +203,17 @@ clear(struct gl_context *ctx, GLbitfield mask, bool no_error) } if ((mask & GL_DEPTH_BUFFER_BIT) - && ctx->DrawBuffer->Visual.haveDepthBuffer) { + && ctx->DrawBuffer->Visual.depthBits > 0) { bufferMask |= BUFFER_BIT_DEPTH; } if ((mask & GL_STENCIL_BUFFER_BIT) - && ctx->DrawBuffer->Visual.haveStencilBuffer) { + && ctx->DrawBuffer->Visual.stencilBits > 0) { bufferMask |= BUFFER_BIT_STENCIL; } if ((mask & GL_ACCUM_BUFFER_BIT) - && ctx->DrawBuffer->Visual.haveAccumBuffer) { + && ctx->DrawBuffer->Visual.accumRedBits > 0) { bufferMask |= BUFFER_BIT_ACCUM; } diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 0dd83e564b1..ee5eee32948 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -305,10 +305,6 @@ _mesa_initialize_visual( struct gl_config *vis, vis->accumBlueBits = accumBlueBits; vis->accumAlphaBits = accumAlphaBits; - vis->haveAccumBuffer = accumRedBits > 0; - vis->haveDepthBuffer = depthBits > 0; - vis->haveStencilBuffer = stencilBits > 0; - vis->numAuxBuffers = 0; vis->level = 0; vis->sampleBuffers = numSamples > 0 ? 1 : 0; diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index 96efc0a4b54..727831e3d97 100644 --- a/src/mesa/main/framebuffer.c +++ b/src/mesa/main/framebuffer.c @@ -482,7 +482,6 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx, const struct gl_renderbuffer *rb = fb->Attachment[BUFFER_DEPTH].Renderbuffer; const mesa_format fmt = rb->Format; - fb->Visual.haveDepthBuffer = GL_TRUE; fb->Visual.depthBits = _mesa_get_format_bits(fmt, GL_DEPTH_BITS); } @@ -490,7 +489,6 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx, const struct gl_renderbuffer *rb = fb->Attachment[BUFFER_STENCIL].Renderbuffer; const mesa_format fmt = rb->Format; - fb->Visual.haveStencilBuffer = GL_TRUE; fb->Visual.stencilBits = _mesa_get_format_bits(fmt, GL_STENCIL_BITS); } @@ -498,7 +496,6 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx, const struct gl_renderbuffer *rb = fb->Attachment[BUFFER_ACCUM].Renderbuffer; const mesa_format fmt = rb->Format; - fb->Visual.haveAccumBuffer = GL_TRUE; fb->Visual.accumRedBits = _mesa_get_format_bits(fmt, GL_RED_BITS); fb->Visual.accumGreenBits = _mesa_get_format_bits(fmt, GL_GREEN_BITS); fb->Visual.accumBlueBits = _mesa_get_format_bits(fmt, GL_BLUE_BITS); diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 5c633938f37..af5b60fcf5a 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -164,10 +164,6 @@ struct gl_config GLuint doubleBufferMode; GLuint stereoMode; - GLboolean haveAccumBuffer; - GLboolean haveDepthBuffer; - GLboolean haveStencilBuffer; - GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */ GLuint redMask, greenMask, blueMask, alphaMask; GLint redShift, greenShift, blueShift, alphaShift; |