summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-10-14 12:32:39 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-10-14 12:32:39 -0600
commita7611dce40e532f6c768ed7011725fcfb6424883 (patch)
tree50d445a42340b7de839c0db4fc187669f4e3e693 /src/mesa/drivers
parent90f7ae2370630c45acb9287465806e5fcac44033 (diff)
implement put_tile()
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/x11/xm_surface.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/drivers/x11/xm_surface.c b/src/mesa/drivers/x11/xm_surface.c
index 70fa97b339..75ad450360 100644
--- a/src/mesa/drivers/x11/xm_surface.c
+++ b/src/mesa/drivers/x11/xm_surface.c
@@ -192,7 +192,18 @@ static void
put_tile(struct pipe_surface *ps,
GLuint x, GLuint y, GLuint w, GLuint h, const GLfloat *p)
{
- assert(0);
+ struct xmesa_renderbuffer *xrb = xmesa_rb((struct softpipe_surface *) ps);
+ GLubyte tmp[MAX_WIDTH * 4];
+ GLuint i, j;
+ GET_CURRENT_CONTEXT(ctx);
+ FLIP(y);
+ for (i = 0; i < h; i++) {
+ for (j = 0; j < w * 4; j++) {
+ CLAMPED_FLOAT_TO_UBYTE(tmp[j], p[j]);
+ }
+ xrb->St.Base.PutRow(ctx, &xrb->St.Base, w, x, y - i, tmp, NULL);
+ p += w * 4;
+ }
}