summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2007-12-20 08:19:42 -0800
committerEric Anholt <[email protected]>2007-12-20 08:19:42 -0800
commitfcd1e9dad6949e02380593a166432dbac311c80e (patch)
tree85d8909857c67c21def6beb5933eaf6de6ec1d5a /src
parent2761cfce462af4fee0d67068c09f7f188677e7cf (diff)
[i915] Move meta_draw_quad into the vtbl with other meta operations.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i915/intel_context.h8
-rw-r--r--src/mesa/drivers/dri/i915/intel_pixel_copy.c14
-rw-r--r--src/mesa/drivers/dri/i915/intel_pixel_draw.c14
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c7
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.h15
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffers.c30
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c1
7 files changed, 42 insertions, 47 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_context.h b/src/mesa/drivers/dri/i915/intel_context.h
index 6f0051ed8b9..25486ed001b 100644
--- a/src/mesa/drivers/dri/i915/intel_context.h
+++ b/src/mesa/drivers/dri/i915/intel_context.h
@@ -112,6 +112,14 @@ struct intel_context
struct intel_region * draw_region,
struct intel_region * depth_region);
+ void (*meta_draw_quad)(struct intel_context *intel,
+ GLfloat x0, GLfloat x1,
+ GLfloat y0, GLfloat y1,
+ GLfloat z,
+ GLuint color, /* ARGB32 */
+ GLfloat s0, GLfloat s1,
+ GLfloat t0, GLfloat t1);
+
void (*meta_color_mask) (struct intel_context * intel, GLboolean);
void (*meta_stencil_replace) (struct intel_context * intel,
diff --git a/src/mesa/drivers/dri/i915/intel_pixel_copy.c b/src/mesa/drivers/dri/i915/intel_pixel_copy.c
index 0bda2d863f3..c453097e55e 100644
--- a/src/mesa/drivers/dri/i915/intel_pixel_copy.c
+++ b/src/mesa/drivers/dri/i915/intel_pixel_copy.c
@@ -219,13 +219,13 @@ do_texture_copypixels(GLcontext * ctx,
/* Just use the regular cliprect mechanism... Does this need to
* even hold the lock???
*/
- intel_meta_draw_quad(intel,
- dstx,
- dstx + width * ctx->Pixel.ZoomX,
- dPriv->h - (dsty + height * ctx->Pixel.ZoomY),
- dPriv->h - (dsty), 0, /* XXX: what z value? */
- 0x00ff00ff,
- srcx, srcx + width, srcy, srcy + height);
+ intel->vtbl.meta_draw_quad(intel,
+ dstx,
+ dstx + width * ctx->Pixel.ZoomX,
+ dPriv->h - (dsty + height * ctx->Pixel.ZoomY),
+ dPriv->h - (dsty), 0, /* XXX: what z value? */
+ 0x00ff00ff,
+ srcx, srcx + width, srcy, srcy + height);
out:
intel->vtbl.leave_meta_state(intel);
diff --git a/src/mesa/drivers/dri/i915/intel_pixel_draw.c b/src/mesa/drivers/dri/i915/intel_pixel_draw.c
index 0fea9a1d01a..566f884be0c 100644
--- a/src/mesa/drivers/dri/i915/intel_pixel_draw.c
+++ b/src/mesa/drivers/dri/i915/intel_pixel_draw.c
@@ -170,13 +170,13 @@ do_texture_drawpixels(GLcontext * ctx,
* incorrect coordinate space. Does this even need to hold the
* lock???
*/
- intel_meta_draw_quad(intel,
- dstx, dstx + width * ctx->Pixel.ZoomX,
- dPriv->h - (y + height * ctx->Pixel.ZoomY),
- dPriv->h - (y),
- -ctx->Current.RasterPos[2] * .5,
- 0x00ff00ff,
- srcx, srcx + width, srcy + height, srcy);
+ intel->vtbl.meta_draw_quad(intel,
+ dstx, dstx + width * ctx->Pixel.ZoomX,
+ dPriv->h - (y + height * ctx->Pixel.ZoomY),
+ dPriv->h - (y),
+ -ctx->Current.RasterPos[2] * .5,
+ 0x00ff00ff,
+ srcx, srcx + width, srcy + height, srcy);
out:
intel->vtbl.leave_meta_state(intel);
intel_batchbuffer_flush(intel->batch);
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index 474113cd632..61b0bb3fd31 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -1066,7 +1066,7 @@ union fi
/**********************************************************************/
/* Used only with the metaops callbacks. */
/**********************************************************************/
-void
+static void
intel_meta_draw_poly(struct intel_context *intel,
GLuint n,
GLfloat xy[][2],
@@ -1101,7 +1101,7 @@ intel_meta_draw_poly(struct intel_context *intel,
UNLOCK_HARDWARE(intel);
}
-void
+static void
intel_meta_draw_quad(struct intel_context *intel,
GLfloat x0, GLfloat x1,
GLfloat y0, GLfloat y1,
@@ -1143,6 +1143,7 @@ intel_meta_draw_quad(struct intel_context *intel,
void
intelInitTriFuncs(GLcontext * ctx)
{
+ struct intel_context *intel = intel_context(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
static int firsttime = 1;
@@ -1159,4 +1160,6 @@ intelInitTriFuncs(GLcontext * ctx)
tnl->Driver.Render.BuildVertices = _tnl_build_vertices;
tnl->Driver.Render.CopyPV = _tnl_copy_pv;
tnl->Driver.Render.Interp = _tnl_interp;
+
+ intel->vtbl.meta_draw_quad = intel_meta_draw_quad;
}
diff --git a/src/mesa/drivers/dri/i915/intel_tris.h b/src/mesa/drivers/dri/i915/intel_tris.h
index b7bae8cd3bc..021e5c64500 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.h
+++ b/src/mesa/drivers/dri/i915/intel_tris.h
@@ -51,19 +51,4 @@ extern void intelWrapInlinePrimitive(struct intel_context *intel);
GLuint *intelExtendInlinePrimitive(struct intel_context *intel,
GLuint dwords);
-
-void intel_meta_draw_quad(struct intel_context *intel,
- GLfloat x0, GLfloat x1,
- GLfloat y0, GLfloat y1,
- GLfloat z,
- GLuint color,
- GLfloat s0, GLfloat s1, GLfloat t0, GLfloat t1);
-
-void intel_meta_draw_poly(struct intel_context *intel,
- GLuint n,
- GLfloat xy[][2],
- GLfloat z, GLuint color, GLfloat tex[][2]);
-
-
-
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c
index 98928955102..098c3e34511 100644
--- a/src/mesa/drivers/dri/intel/intel_buffers.c
+++ b/src/mesa/drivers/dri/intel/intel_buffers.c
@@ -31,7 +31,6 @@
#include "intel_buffers.h"
#include "intel_depthstencil.h"
#include "intel_fbo.h"
-#include "intel_tris.h"
#include "intel_regions.h"
#include "intel_batchbuffer.h"
#include "intel_reg.h"
@@ -420,13 +419,14 @@ intelClearWithTris(struct intel_context *intel, GLbitfield mask)
else
intel->vtbl.meta_no_depth_write(intel);
- intel_meta_draw_quad(intel,
- fb->_Xmin,
- fb->_Xmax,
- fb->_Ymin,
- fb->_Ymax,
- intel->ctx.Depth.Clear, intel->ClearColor8888,
- 0, 0, 0, 0); /* texcoords */
+ intel->vtbl.meta_draw_quad(intel,
+ fb->_Xmin,
+ fb->_Xmax,
+ fb->_Ymin,
+ fb->_Ymax,
+ intel->ctx.Depth.Clear,
+ intel->ClearColor8888,
+ 0, 0, 0, 0); /* texcoords */
mask &= ~(BUFFER_BIT_BACK_LEFT | BUFFER_BIT_STENCIL | BUFFER_BIT_DEPTH);
}
@@ -448,13 +448,13 @@ intelClearWithTris(struct intel_context *intel, GLbitfield mask)
/* XXX: Using INTEL_BATCH_NO_CLIPRECTS here is dangerous as the
* drawing origin may not be correctly emitted.
*/
- intel_meta_draw_quad(intel,
- fb->_Xmin,
- fb->_Xmax,
- fb->_Ymin,
- fb->_Ymax,
- 0, intel->ClearColor8888,
- 0, 0, 0, 0); /* texcoords */
+ intel->vtbl.meta_draw_quad(intel,
+ fb->_Xmin,
+ fb->_Xmax,
+ fb->_Ymin,
+ fb->_Ymax,
+ 0, intel->ClearColor8888,
+ 0, 0, 0, 0); /* texcoords */
mask &= ~bufBit;
}
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index e1f62bd70ef..b6490815485 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -41,7 +41,6 @@
#include "intel_buffers.h"
#include "intel_tex.h"
#include "intel_span.h"
-#include "intel_tris.h"
#include "intel_ioctl.h"
#include "intel_fbo.h"