mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
check swrast->NewState in Draw/CopyPixels functions
This commit is contained in:
parent
4a3110fb21
commit
74466be8cb
1 changed files with 9 additions and 0 deletions
|
|
@ -790,6 +790,9 @@ xmesa_DrawPixels_8R8G8B( GLcontext *ctx,
|
|||
ASSERT(xmesa->xm_visual->dithered_pf == PF_8R8G8B);
|
||||
ASSERT(xmesa->xm_visual->undithered_pf == PF_8R8G8B);
|
||||
|
||||
if (swrast->NewState)
|
||||
_swrast_validate_derived( ctx );
|
||||
|
||||
if (buffer && /* buffer != 0 means it's a Window or Pixmap */
|
||||
format == GL_BGRA &&
|
||||
type == GL_UNSIGNED_BYTE &&
|
||||
|
|
@ -861,6 +864,9 @@ xmesa_DrawPixels_5R6G5B( GLcontext *ctx,
|
|||
ASSERT(gc);
|
||||
ASSERT(xmesa->xm_visual->undithered_pf == PF_5R6G5B);
|
||||
|
||||
if (swrast->NewState)
|
||||
_swrast_validate_derived( ctx );
|
||||
|
||||
if (buffer && /* buffer != 0 means it's a Window or Pixmap */
|
||||
format == GL_RGB &&
|
||||
type == GL_UNSIGNED_SHORT_5_6_5 &&
|
||||
|
|
@ -930,6 +936,9 @@ xmesa_CopyPixels( GLcontext *ctx,
|
|||
ASSERT(dpy);
|
||||
ASSERT(gc);
|
||||
|
||||
if (swrast->NewState)
|
||||
_swrast_validate_derived( ctx );
|
||||
|
||||
if (ctx->Color.DrawBuffer == GL_FRONT &&
|
||||
ctx->Pixel.ReadBuffer == GL_FRONT &&
|
||||
drawBuffer && /* buffer != 0 means it's a Window or Pixmap */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue