Support compressed textures with unpack buffers.
BUG=angle:792
Change-Id: I32f32422232bd4cb04c8a70005cb51482224bf3e
Reviewed-on: https://chromium-review.googlesource.com/224655
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libGLESv2/libGLESv2.cpp b/src/libGLESv2/libGLESv2.cpp
index 64503fc..0b6f22d 100644
--- a/src/libGLESv2/libGLESv2.cpp
+++ b/src/libGLESv2/libGLESv2.cpp
@@ -766,7 +766,7 @@
case GL_TEXTURE_2D:
{
gl::Texture2D *texture = context->getTexture2D();
- gl::Error error = texture->setCompressedImage(level, internalformat, width, height, imageSize, data);
+ gl::Error error = texture->setCompressedImage(level, internalformat, width, height, imageSize, context->getState().getUnpackState(), data);
if (error.isError())
{
context->recordError(error);
@@ -783,7 +783,7 @@
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
{
gl::TextureCubeMap *texture = context->getTextureCubeMap();
- gl::Error error = texture->setCompressedImage(target, level, internalformat, width, height, imageSize, data);
+ gl::Error error = texture->setCompressedImage(target, level, internalformat, width, height, imageSize, context->getState().getUnpackState(), data);
if (error.isError())
{
context->recordError(error);
@@ -836,7 +836,7 @@
case GL_TEXTURE_2D:
{
gl::Texture2D *texture = context->getTexture2D();
- gl::Error error = texture->subImageCompressed(level, xoffset, yoffset, width, height, format, imageSize, data);
+ gl::Error error = texture->subImageCompressed(level, xoffset, yoffset, width, height, format, imageSize, context->getState().getUnpackState(), data);
if (error.isError())
{
context->recordError(error);
@@ -853,7 +853,7 @@
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
{
gl::TextureCubeMap *texture = context->getTextureCubeMap();
- gl::Error error = texture->subImageCompressed(target, level, xoffset, yoffset, width, height, format, imageSize, data);
+ gl::Error error = texture->subImageCompressed(target, level, xoffset, yoffset, width, height, format, imageSize, context->getState().getUnpackState(), data);
if (error.isError())
{
context->recordError(error);
@@ -5285,7 +5285,7 @@
case GL_TEXTURE_3D:
{
gl::Texture3D *texture = context->getTexture3D();
- gl::Error error = texture->setCompressedImage(level, internalformat, width, height, depth, imageSize, data);
+ gl::Error error = texture->setCompressedImage(level, internalformat, width, height, depth, imageSize, context->getState().getUnpackState(), data);
if (error.isError())
{
context->recordError(error);
@@ -5297,7 +5297,7 @@
case GL_TEXTURE_2D_ARRAY:
{
gl::Texture2DArray *texture = context->getTexture2DArray();
- gl::Error error = texture->setCompressedImage(level, internalformat, width, height, depth, imageSize, data);
+ gl::Error error = texture->setCompressedImage(level, internalformat, width, height, depth, imageSize, context->getState().getUnpackState(), data);
if (error.isError())
{
context->recordError(error);
@@ -5361,7 +5361,7 @@
{
gl::Texture3D *texture = context->getTexture3D();
gl::Error error = texture->subImageCompressed(level, xoffset, yoffset, zoffset, width, height, depth,
- format, imageSize, data);
+ format, imageSize, context->getState().getUnpackState(), data);
if (error.isError())
{
context->recordError(error);
@@ -5374,7 +5374,7 @@
{
gl::Texture2DArray *texture = context->getTexture2DArray();
gl::Error error = texture->subImageCompressed(level, xoffset, yoffset, zoffset, width, height, depth,
- format, imageSize, data);
+ format, imageSize, context->getState().getUnpackState(), data);
if (error.isError())
{
context->recordError(error);