mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
i915tex: Fix triple buffering after recent Mesa core changes.
Remove superfluous _mesa_resize_framebuffer call which is now harmful because it causes the third renderbuffer to have width/height 0, so Mesa refuses to render to it. In the long term, it would be nice to remove the hack in intel_alloc_window_storage in favour of a proper Mesa interface for flipping between more than two colour buffers.
This commit is contained in:
parent
77544d7b7d
commit
9b42100c04
1 changed files with 22 additions and 0 deletions
|
|
@ -349,6 +349,28 @@ intelWindowMoved(struct intel_context *intel)
|
|||
|
||||
/* Update Mesa's notion of window size */
|
||||
driUpdateFramebufferSize(ctx, dPriv);
|
||||
|
||||
/* Update size of third renderbuffer */
|
||||
if (intel_fb->pf_num_pages == 3) {
|
||||
struct gl_renderbuffer *rb = &intel_fb->color_rb[(intel_fb->pf_current_page
|
||||
+ 2) % 3]->Base;
|
||||
|
||||
/* only resize if size is changing */
|
||||
if (rb->Width != intel_fb->Base.Width ||
|
||||
rb->Height != intel_fb->Base.Height) {
|
||||
/* could just as well pass rb->_ActualFormat here */
|
||||
if (rb->AllocStorage(ctx, rb, rb->InternalFormat,
|
||||
intel_fb->Base.Width, intel_fb->Base.Height)) {
|
||||
ASSERT(rb->Width == intel_fb->Base.Width);
|
||||
ASSERT(rb->Height == intel_fb->Base.Height);
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "Resizing framebuffer");
|
||||
/* no return */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
intel_fb->Base.Initialized = GL_TRUE; /* XXX remove someday */
|
||||
|
||||
/* Update hardware scissor */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue