projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90f7ae2
)
implement put_tile()
author
Brian
<brian.paul@tungstengraphics.com>
Sun, 14 Oct 2007 18:32:39 +0000
(12:32 -0600)
committer
Brian
<brian.paul@tungstengraphics.com>
Sun, 14 Oct 2007 18:32:39 +0000
(12:32 -0600)
src/mesa/drivers/x11/xm_surface.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/x11/xm_surface.c
b/src/mesa/drivers/x11/xm_surface.c
index 70fa97b33953511a599bbfe000872c9f8d879003..75ad45036063960f89063cc194a687963ac25ac0 100644
(file)
--- 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;
+ }
}