summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorJack Palevich <jackpal@google.com>2010-02-02 22:50:39 -0800
committerJack Palevich <jackpal@google.com>2010-02-02 22:50:39 -0800
commit06735863719e08b44edebddcb97861f867bdc01d (patch)
tree91e438f772441a3905dd0db43b0cdc8647bdcfa2 /opengl
parent3107535d15b5b8f0d01d76fb8804cf92d8223ce0 (diff)
downloadframeworks_native-06735863719e08b44edebddcb97861f867bdc01d.zip
frameworks_native-06735863719e08b44edebddcb97861f867bdc01d.tar.gz
frameworks_native-06735863719e08b44edebddcb97861f867bdc01d.tar.bz2
Fix ETC1 texture decoding.
etc1_decode_image requires the stride argument to be in bytes, but the surface->stride field is in pixels. Convert by multiplying by pixel size.
Diffstat (limited to 'opengl')
-rw-r--r--opengl/libagl/texture.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
index 73b1db4..a1a776f 100644
--- a/opengl/libagl/texture.cpp
+++ b/opengl/libagl/texture.cpp
@@ -1152,7 +1152,7 @@ void glCompressedTexImage2D(
if (etc1_decode_image(
(const etc1_byte*)data,
(etc1_byte*)surface->data,
- width, height, 3, surface->stride) != 0) {
+ width, height, 3, surface->stride*3) != 0) {
ogles_error(c, GL_INVALID_OPERATION);
}
return;