diff options
author | Brian Paul <[email protected]> | 2006-10-13 16:34:25 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-10-13 16:34:25 +0000 |
commit | 176501dfff14b5bec78af2b3487207d42c26d37a (patch) | |
tree | b114ed316d67c6da4c460b130edc0643b90e8000 /src/mesa/main/texstore.c | |
parent | 8a9b5518fb946462fe55a62c1da1cab94d6d12cc (diff) |
In _mesa_pack_rgba_span_float() we don't need to make a temporary copy of
incoming colors when applying pixel transfer ops. In all cases, the
caller either indicates there's no pixel transfer ops, or the incoming
colors are coming from temporary storage already and can be safely
modified.
Diffstat (limited to 'src/mesa/main/texstore.c')
-rw-r--r-- | src/mesa/main/texstore.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 72ff73ef054..2a34cfba5a3 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -398,7 +398,7 @@ make_temp_float_image(GLcontext *ctx, GLuint dims, GLfloat *dst = tempImage + img * (convWidth * convHeight * 4); for (row = 0; row < convHeight; row++) { _mesa_pack_rgba_span_float(ctx, convWidth, - (const GLfloat (*)[4]) src, + (GLfloat (*)[4]) src, logicalBaseFormat, GL_FLOAT, dst, &ctx->DefaultPacking, postConvTransferOps); @@ -3607,10 +3607,9 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level, for (col = 0; col < width; col++) { (*texImage->FetchTexelf)(texImage, col, row, img, rgba[col]); } - _mesa_pack_rgba_span_float(ctx, width, - (const GLfloat (*)[4]) rgba, - format, type, dest, &ctx->Pack, - 0 /* no image transfer */); + _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba, + format, type, dest, + &ctx->Pack, 0x0 /*image xfer ops*/); } /* format */ } /* row */ } /* img */ |