projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78a6e05
)
_mesa_swizzle_ubyte_image: Only use single swizzle_copy call when strides match.
author
Michel Dänzer
<michel@tungstengraphics.com>
Thu, 14 Dec 2006 09:01:43 +0000
(10:01 +0100)
committer
Michel Dänzer
<michel@tungstengraphics.com>
Thu, 14 Dec 2006 10:01:38 +0000
(11:01 +0100)
This fixes texture data corruption with glTexSubimage (and probably glTexImage
under some circumstances) with the texstore swizzle path.
src/mesa/main/texstore.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/texstore.c
b/src/mesa/main/texstore.c
index 89563842c25b8db870ab26b5a631ceb72cf52e79..87f8fa7a0d457ce0f6b19ccd79fb3a4b15f0a07a 100644
(file)
--- a/
src/mesa/main/texstore.c
+++ b/
src/mesa/main/texstore.c
@@
-808,7
+808,8
@@
_mesa_swizzle_ubyte_image(GLcontext *ctx,
/* _mesa_printf("map %d %d %d %d\n", map[0], map[1], map[2], map[3]); */
- if (srcRowStride == srcWidth * srcComponents &&
+ if (srcRowStride == dstRowStride &&
+ srcRowStride == srcWidth * srcComponents &&
dimensions < 3) {
/* 1 and 2D images only */
GLubyte *dstImage = (GLubyte *) dstAddr