mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-21 13:00:22 +01:00
init accum buffer fields in _mesa_update_framebuffer_visual()
This commit is contained in:
parent
25847f2b5b
commit
02aa5fba03
1 changed files with 14 additions and 1 deletions
|
|
@ -427,7 +427,8 @@ _mesa_update_draw_buffer_bounds(GLcontext *ctx)
|
|||
* etc. are satisfied by the fields of ctx->DrawBuffer->Visual. These can
|
||||
* change depending on the renderbuffer bindings. This function updates
|
||||
* the given framebuffer's Visual from the current renderbuffer bindings.
|
||||
* This is only intended for user-created framebuffers.
|
||||
*
|
||||
* This may apply to user-created framebuffers or window system framebuffers.
|
||||
*
|
||||
* Also note: ctx->DrawBuffer->Visual.depthBits might not equal
|
||||
* ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer.DepthBits.
|
||||
|
|
@ -483,6 +484,18 @@ _mesa_update_framebuffer_visual(struct gl_framebuffer *fb)
|
|||
= fb->Attachment[BUFFER_STENCIL].Renderbuffer->StencilBits;
|
||||
}
|
||||
|
||||
if (fb->Attachment[BUFFER_ACCUM].Renderbuffer) {
|
||||
fb->Visual.haveAccumBuffer = GL_TRUE;
|
||||
fb->Visual.accumRedBits
|
||||
= fb->Attachment[BUFFER_DEPTH].Renderbuffer->RedBits;
|
||||
fb->Visual.accumGreenBits
|
||||
= fb->Attachment[BUFFER_DEPTH].Renderbuffer->GreenBits;
|
||||
fb->Visual.accumBlueBits
|
||||
= fb->Attachment[BUFFER_DEPTH].Renderbuffer->BlueBits;
|
||||
fb->Visual.accumAlphaBits
|
||||
= fb->Attachment[BUFFER_DEPTH].Renderbuffer->AlphaBits;
|
||||
}
|
||||
|
||||
compute_depth_max(fb);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue