implement put_tile()

This commit is contained in:
Brian
2007-10-14 12:32:39 -06:00
parent 90f7ae2370
commit a7611dce40
+12 -1
View File
@@ -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;
}
}