diff options
author | Brian <[email protected]> | 2007-07-11 09:56:46 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-07-11 09:56:46 -0600 |
commit | 300e97081e7e752c0ff9133149d15935baac7a46 (patch) | |
tree | b2cfe8d8986eabfc87f85cd5fb9a3550f9535933 /src/mesa/drivers | |
parent | d6aa360eddec0463f3563eff07b06c5d60037826 (diff) |
need to clamp floats to [0,1] in write functions
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/x11/xm_surface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/x11/xm_surface.c b/src/mesa/drivers/x11/xm_surface.c index 2bef5e6b9e6..8ae5c248f43 100644 --- a/src/mesa/drivers/x11/xm_surface.c +++ b/src/mesa/drivers/x11/xm_surface.c @@ -122,7 +122,7 @@ write_quad_f(struct softpipe_surface *gs, GLint x, GLint y, GLuint i; GET_CURRENT_CONTEXT(ctx); for (i = 0; i < 16; i++) { - temp[i] = FLOAT_TO_UBYTE(src[i]); + UNCLAMPED_FLOAT_TO_UBYTE(temp[i], src[i]); } xrb->Base.PutRow(ctx, &xrb->Base, 2, x, y, temp, NULL); xrb->Base.PutRow(ctx, &xrb->Base, 2, x, y + 1, temp + 8, NULL); @@ -140,7 +140,7 @@ write_quad_f_swz(struct softpipe_surface *gs, GLint x, GLint y, GET_CURRENT_CONTEXT(ctx); for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { - temp[j * 4 + i] = FLOAT_TO_UBYTE(src[i * 4 + j]); + UNCLAMPED_FLOAT_TO_UBYTE(temp[j * 4 + i], src[i * 4 + j]); } } xrb->Base.PutRow(ctx, &xrb->Base, 2, x, y, temp, NULL); |