mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
Fix bug #8799.
Properly resize bith the drawable and the readable in mgaUpdateRects. Eliminate the use of the deprecated GetBufferSize interface. Bump driver date.
This commit is contained in:
parent
86a465412d
commit
b14bae8466
2 changed files with 8 additions and 22 deletions
|
|
@ -41,7 +41,7 @@
|
|||
#include "mga_xmesa.h"
|
||||
#include "utils.h"
|
||||
|
||||
#define DRIVER_DATE "20050609"
|
||||
#define DRIVER_DATE "20061030"
|
||||
|
||||
|
||||
/***************************************
|
||||
|
|
@ -74,24 +74,7 @@ static const GLubyte *mgaGetString( GLcontext *ctx, GLenum name )
|
|||
}
|
||||
|
||||
|
||||
static void mgaBufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
|
||||
|
||||
/* Need to lock to make sure the driDrawable is uptodate. This
|
||||
* information is used to resize Mesa's software buffers, so it has
|
||||
* to be correct.
|
||||
*/
|
||||
LOCK_HARDWARE( mmesa );
|
||||
*width = mmesa->driDrawable->w;
|
||||
*height = mmesa->driDrawable->h;
|
||||
UNLOCK_HARDWARE( mmesa );
|
||||
}
|
||||
|
||||
|
||||
void mgaInitDriverFuncs( struct dd_function_table *functions )
|
||||
{
|
||||
functions->GetBufferSize = mgaBufferSize;
|
||||
functions->GetString = mgaGetString;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -774,13 +774,18 @@ static void mga_set_cliprects(mgaContextPtr mmesa)
|
|||
|
||||
void mgaUpdateRects( mgaContextPtr mmesa, GLuint buffers )
|
||||
{
|
||||
__DRIdrawablePrivate *driDrawable = mmesa->driDrawable;
|
||||
__DRIdrawablePrivate *const driDrawable = mmesa->driDrawable;
|
||||
__DRIdrawablePrivate *const driReadable = mmesa->driReadable;
|
||||
drm_mga_sarea_t *sarea = mmesa->sarea;
|
||||
|
||||
|
||||
DRI_VALIDATE_DRAWABLE_INFO(mmesa->driScreen, driDrawable);
|
||||
mmesa->dirty_cliprects = 0;
|
||||
|
||||
driUpdateFramebufferSize(mmesa->glCtx, driDrawable);
|
||||
if (driDrawable != driReadable) {
|
||||
driUpdateFramebufferSize(mmesa->glCtx, driReadable);
|
||||
}
|
||||
|
||||
mga_set_cliprects(mmesa);
|
||||
|
||||
sarea->req_drawable = driDrawable->draw;
|
||||
|
|
@ -788,8 +793,6 @@ void mgaUpdateRects( mgaContextPtr mmesa, GLuint buffers )
|
|||
|
||||
mgaUpdateClipping( mmesa->glCtx );
|
||||
mgaCalcViewport( mmesa->glCtx );
|
||||
|
||||
mmesa->dirty |= MGA_UPLOAD_CLIPRECTS;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue