mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
mesa/st: Don't modify the context draw/read buffers.
It sets the wrong values (GL_XXX_LEFT instead of GL_XXX), and no other Mesa driver does this, given that Mesa sets the right draw/read buffers provided the Mesa visual has the doublebuffer flag filled correctly which is the case. Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
eefff37060
commit
f188c0d0f4
1 changed files with 0 additions and 64 deletions
|
|
@ -403,54 +403,6 @@ st_visual_to_context_mode(const struct st_visual *visual,
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine the default draw or read buffer from a visual.
|
||||
*/
|
||||
static void
|
||||
st_visual_to_default_buffer(const struct st_visual *visual,
|
||||
GLenum *buffer, GLint *index)
|
||||
{
|
||||
enum st_attachment_type statt;
|
||||
GLenum buf;
|
||||
gl_buffer_index idx;
|
||||
|
||||
statt = visual->render_buffer;
|
||||
/* do nothing if an invalid render buffer is specified */
|
||||
if (statt == ST_ATTACHMENT_INVALID ||
|
||||
!st_visual_have_buffers(visual, 1 << statt))
|
||||
return;
|
||||
|
||||
switch (statt) {
|
||||
case ST_ATTACHMENT_FRONT_LEFT:
|
||||
buf = GL_FRONT_LEFT;
|
||||
idx = BUFFER_FRONT_LEFT;
|
||||
break;
|
||||
case ST_ATTACHMENT_BACK_LEFT:
|
||||
buf = GL_BACK_LEFT;
|
||||
idx = BUFFER_BACK_LEFT;
|
||||
break;
|
||||
case ST_ATTACHMENT_FRONT_RIGHT:
|
||||
buf = GL_FRONT_RIGHT;
|
||||
idx = BUFFER_FRONT_RIGHT;
|
||||
break;
|
||||
case ST_ATTACHMENT_BACK_RIGHT:
|
||||
buf = GL_BACK_RIGHT;
|
||||
idx = BUFFER_BACK_RIGHT;
|
||||
break;
|
||||
default:
|
||||
buf = GL_NONE;
|
||||
idx = BUFFER_COUNT;
|
||||
break;
|
||||
}
|
||||
|
||||
if (buf != GL_NONE) {
|
||||
if (buffer)
|
||||
*buffer = buf;
|
||||
if (index)
|
||||
*index = idx;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a framebuffer from a manager interface.
|
||||
*/
|
||||
|
|
@ -471,12 +423,6 @@ st_framebuffer_create(struct st_framebuffer_iface *stfbi)
|
|||
st_visual_to_context_mode(stfbi->visual, &mode);
|
||||
_mesa_initialize_window_framebuffer(&stfb->Base, &mode);
|
||||
|
||||
/* modify the draw/read buffers of the fb */
|
||||
st_visual_to_default_buffer(stfbi->visual, &stfb->Base.ColorDrawBuffer[0],
|
||||
&stfb->Base._ColorDrawBufferIndexes[0]);
|
||||
st_visual_to_default_buffer(stfbi->visual, &stfb->Base.ColorReadBuffer,
|
||||
&stfb->Base._ColorReadBufferIndex);
|
||||
|
||||
stfb->iface = stfbi;
|
||||
stfb->iface_stamp = p_atomic_read(&stfbi->stamp) - 1;
|
||||
|
||||
|
|
@ -776,16 +722,6 @@ st_api_make_current(struct st_api *stapi, struct st_context_iface *stctxi,
|
|||
if (stread != stdraw)
|
||||
st_framebuffer_validate(stread, st);
|
||||
|
||||
/* modify the draw/read buffers of the context */
|
||||
if (stdraw->iface) {
|
||||
st_visual_to_default_buffer(stdraw->iface->visual,
|
||||
&st->ctx->Color.DrawBuffer[0], NULL);
|
||||
}
|
||||
if (stread->iface) {
|
||||
st_visual_to_default_buffer(stread->iface->visual,
|
||||
&st->ctx->Pixel.ReadBuffer, NULL);
|
||||
}
|
||||
|
||||
ret = _mesa_make_current(st->ctx, &stdraw->Base, &stread->Base);
|
||||
|
||||
st->draw_stamp = stdraw->stamp - 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue