summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2011-10-28 15:40:01 -0400
committerKristian Høgsberg <[email protected]>2011-11-02 11:16:00 -0400
commitd24b81e0e0f4109f3256dc45b0adc5ffd59fb749 (patch)
tree69e94f5deef4656cda82c35d71212c6b74a589fc /src/mesa
parent24002daf011bf05d7d088602dc32e60da1755f44 (diff)
dri: Remove cliprect information from __DRIdrawable
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c17
-rw-r--r--src/mesa/drivers/dri/common/dri_util.h28
-rw-r--r--src/mesa/drivers/dri/common/spantmp_common.h11
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c15
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.c12
-rw-r--r--src/mesa/drivers/dri/r200/r200_swtcl.c3
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.c15
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.c12
8 files changed, 18 insertions, 95 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 945c85c06a6..6d78f82ce39 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -175,14 +175,8 @@ dri2CreateNewDrawable(__DRIscreen *screen,
pdraw->pStamp = NULL;
pdraw->lastStamp = 0;
pdraw->index = 0;
- pdraw->x = 0;
- pdraw->y = 0;
pdraw->w = 0;
pdraw->h = 0;
- pdraw->numClipRects = 0;
- pdraw->numBackClipRects = 0;
- pdraw->pClipRects = NULL;
- pdraw->pBackClipRects = NULL;
pdraw->vblSeq = 0;
pdraw->vblFlags = 0;
@@ -201,9 +195,6 @@ dri2CreateNewDrawable(__DRIscreen *screen,
*/
pdraw->swap_interval = (unsigned)-1;
- pdraw->pClipRects = &pdraw->dri2.clipRect;
- pdraw->pBackClipRects = &pdraw->dri2.clipRect;
-
pdraw->pStamp = &pdraw->dri2.stamp;
*pdraw->pStamp = pdraw->lastStamp + 1;
@@ -277,14 +268,6 @@ static void dri_put_drawable(__DRIdrawable *pdp)
psp = pdp->driScreenPriv;
(*psp->DriverAPI.DestroyBuffer)(pdp);
- if (pdp->pClipRects && pdp->pClipRects != &pdp->dri2.clipRect) {
- free(pdp->pClipRects);
- pdp->pClipRects = NULL;
- }
- if (pdp->pBackClipRects && pdp->pClipRects != &pdp->dri2.clipRect) {
- free(pdp->pBackClipRects);
- pdp->pBackClipRects = NULL;
- }
free(pdp);
}
}
diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h
index 817d77d9f7a..e4dc623d4d6 100644
--- a/src/mesa/drivers/dri/common/dri_util.h
+++ b/src/mesa/drivers/dri/common/dri_util.h
@@ -218,32 +218,7 @@ struct __DRIdrawableRec {
*/
unsigned int lastStamp;
- /**
- * \name Drawable
- *
- * Drawable information used in software fallbacks.
- */
- /*@{*/
- int x;
- int y;
- int w;
- int h;
- int numClipRects;
- drm_clip_rect_t *pClipRects;
- /*@}*/
-
- /**
- * \name Back and depthbuffer
- *
- * Information about the back and depthbuffer where different from above.
- */
- /*@{*/
- int backX;
- int backY;
- int backClipRectType;
- int numBackClipRects;
- drm_clip_rect_t *pBackClipRects;
- /*@}*/
+ int w, h;
/**
* \name Vertical blank tracking information
@@ -289,7 +264,6 @@ struct __DRIdrawableRec {
struct {
unsigned int stamp;
- drm_clip_rect_t clipRect;
} dri2;
};
diff --git a/src/mesa/drivers/dri/common/spantmp_common.h b/src/mesa/drivers/dri/common/spantmp_common.h
index a4509a569d5..8916e7b0ca3 100644
--- a/src/mesa/drivers/dri/common/spantmp_common.h
+++ b/src/mesa/drivers/dri/common/spantmp_common.h
@@ -49,17 +49,14 @@
#ifndef HW_CLIPLOOP
#define HW_CLIPLOOP() \
do { \
- int _nc = dPriv->numClipRects; \
- while ( _nc-- ) { \
- int minx = dPriv->pClipRects[_nc].x1 - dPriv->x; \
- int miny = dPriv->pClipRects[_nc].y1 - dPriv->y; \
- int maxx = dPriv->pClipRects[_nc].x2 - dPriv->x; \
- int maxy = dPriv->pClipRects[_nc].y2 - dPriv->y;
+ int minx = 0; \
+ int miny = 0; \
+ int maxx = dPriv->w; \
+ int maxy = dPriv->h;
#endif
#ifndef HW_ENDCLIPLOOP
#define HW_ENDCLIPLOOP() \
- } \
} while (0)
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 501b00d8ab2..6190396205c 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -311,21 +311,6 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
if (buffers == NULL)
return;
- drawable->x = 0;
- drawable->y = 0;
- drawable->backX = 0;
- drawable->backY = 0;
- drawable->numClipRects = 1;
- drawable->pClipRects[0].x1 = 0;
- drawable->pClipRects[0].y1 = 0;
- drawable->pClipRects[0].x2 = drawable->w;
- drawable->pClipRects[0].y2 = drawable->h;
- drawable->numBackClipRects = 1;
- drawable->pBackClipRects[0].x1 = 0;
- drawable->pBackClipRects[0].y1 = 0;
- drawable->pBackClipRects[0].x2 = drawable->w;
- drawable->pBackClipRects[0].y2 = drawable->h;
-
for (i = 0; i < count; i++) {
switch (buffers[i].attachment) {
case __DRI_BUFFER_FRONT_LEFT:
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index 7f9bc2d9edd..49f66fb6f46 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -1570,8 +1570,8 @@ void r200UpdateWindow( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
- GLfloat xoffset = dPriv ? (GLfloat) dPriv->x : 0;
- GLfloat yoffset = dPriv ? (GLfloat) dPriv->y + dPriv->h : 0;
+ GLfloat xoffset = 0;
+ GLfloat yoffset = dPriv ? (GLfloat) dPriv->h : 0;
const GLfloat *v = ctx->Viewport._WindowMap.m;
const GLboolean render_to_fbo = (ctx->DrawBuffer ? (ctx->DrawBuffer->Name != 0) : 0);
const GLfloat depthScale = 1.0F / ctx->DrawBuffer->_DepthMaxF;
@@ -1650,8 +1650,8 @@ void r200UpdateViewportOffset( struct gl_context *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
- GLfloat xoffset = (GLfloat)dPriv->x;
- GLfloat yoffset = (GLfloat)dPriv->y + dPriv->h;
+ GLfloat xoffset = (GLfloat)0;
+ GLfloat yoffset = (GLfloat)dPriv->h;
const GLfloat *v = ctx->Viewport._WindowMap.m;
float_ui32_type tx;
@@ -1679,8 +1679,8 @@ void r200UpdateViewportOffset( struct gl_context *ctx )
R200_STIPPLE_Y_OFFSET_MASK);
/* add magic offsets, then invert */
- stx = 31 - ((dPriv->x - 1) & R200_STIPPLE_COORD_MASK);
- sty = 31 - ((dPriv->y + dPriv->h - 1)
+ stx = 31 - ((-1) & R200_STIPPLE_COORD_MASK);
+ sty = 31 - ((dPriv->h - 1)
& R200_STIPPLE_COORD_MASK);
m |= ((stx << R200_STIPPLE_X_OFFSET_SHIFT) |
diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c
index 62034eb0e45..303d3fbe459 100644
--- a/src/mesa/drivers/dri/r200/r200_swtcl.c
+++ b/src/mesa/drivers/dri/r200/r200_swtcl.c
@@ -850,8 +850,7 @@ r200PointsBitmap( struct gl_context *ctx, GLint px, GLint py,
/* Update window height
*/
- h = radeon_get_drawable(&rmesa->radeon)->h + radeon_get_drawable(&rmesa->radeon)->y;
- px += radeon_get_drawable(&rmesa->radeon)->x;
+ h = radeon_get_drawable(&rmesa->radeon)->h;
/* Clipping handled by existing mechansims in r200_ioctl.c?
*/
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c
index e47e655ec2e..437f780c2f1 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
@@ -538,21 +538,6 @@ radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable,
if (buffers == NULL)
return;
- /* set one cliprect to cover the whole drawable */
- drawable->x = 0;
- drawable->y = 0;
- drawable->backX = 0;
- drawable->backY = 0;
- drawable->numClipRects = 1;
- drawable->pClipRects[0].x1 = 0;
- drawable->pClipRects[0].y1 = 0;
- drawable->pClipRects[0].x2 = drawable->w;
- drawable->pClipRects[0].y2 = drawable->h;
- drawable->numBackClipRects = 1;
- drawable->pBackClipRects[0].x1 = 0;
- drawable->pBackClipRects[0].y1 = 0;
- drawable->pBackClipRects[0].x2 = drawable->w;
- drawable->pBackClipRects[0].y2 = drawable->h;
for (i = 0; i < count; i++) {
switch (buffers[i].attachment) {
case __DRI_BUFFER_FRONT_LEFT:
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index a025a8d665d..a207940e526 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -1376,8 +1376,8 @@ void radeonUpdateWindow( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
- GLfloat xoffset = dPriv ? (GLfloat) dPriv->x : 0;
- GLfloat yoffset = dPriv ? (GLfloat) dPriv->y + dPriv->h : 0;
+ GLfloat xoffset = 0.0;
+ GLfloat yoffset = dPriv ? (GLfloat) dPriv->h : 0;
const GLfloat *v = ctx->Viewport._WindowMap.m;
const GLboolean render_to_fbo = (ctx->DrawBuffer ? (ctx->DrawBuffer->Name != 0) : 0);
const GLfloat depthScale = 1.0F / ctx->DrawBuffer->_DepthMaxF;
@@ -1431,8 +1431,8 @@ void radeonUpdateViewportOffset( struct gl_context *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
__DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
- GLfloat xoffset = (GLfloat)dPriv->x;
- GLfloat yoffset = (GLfloat)dPriv->y + dPriv->h;
+ GLfloat xoffset = 0.0;
+ GLfloat yoffset = (GLfloat)dPriv->h;
const GLfloat *v = ctx->Viewport._WindowMap.m;
float_ui32_type tx;
@@ -1460,8 +1460,8 @@ void radeonUpdateViewportOffset( struct gl_context *ctx )
RADEON_STIPPLE_Y_OFFSET_MASK);
/* add magic offsets, then invert */
- stx = 31 - ((dPriv->x - 1) & RADEON_STIPPLE_COORD_MASK);
- sty = 31 - ((dPriv->y + dPriv->h - 1)
+ stx = 31 - ((-1) & RADEON_STIPPLE_COORD_MASK);
+ sty = 31 - ((dPriv->h - 1)
& RADEON_STIPPLE_COORD_MASK);
m |= ((stx << RADEON_STIPPLE_X_OFFSET_SHIFT) |