Replaced remaining uses of old texture conversion functions in gl objects.
TRAC #22972
Signed-off-by: Jamie Madill
Signed-off-by: Nicolas Capens
Author: Geoff Lang
git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2325 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index b249811..c9b2b6b 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -12,6 +12,7 @@
#include "libGLESv2/main.h"
#include "libGLESv2/utilities.h"
+#include "libGLESv2/formatutils.h"
#include "libGLESv2/Buffer.h"
#include "libGLESv2/Fence.h"
#include "libGLESv2/Framebuffer.h"
@@ -2108,7 +2109,10 @@
return gl::error(GL_INVALID_OPERATION);
}
- GLsizei outputPitch = ComputeRowPitch(width, ConvertSizedInternalFormat(format, type), getPackAlignment());
+ GLint sizedInternalFormat = IsSizedInternalFormat(format, mClientVersion) ? format
+ : GetSizedInternalFormat(format, type, mClientVersion);
+
+ GLsizei outputPitch = GetRowPitch(sizedInternalFormat, type, mClientVersion, width, getPackAlignment());
// sized query sanity check
if (bufSize)
{
@@ -2165,7 +2169,7 @@
return;
}
- if (GetStencilSize(depthStencil->getActualFormat()) > 0)
+ if (gl::GetStencilBits(depthStencil->getActualFormat(), mClientVersion) > 0)
{
finalMask |= GL_STENCIL_BUFFER_BIT;
}
@@ -2584,8 +2588,8 @@
return gl::error(GL_INVALID_OPERATION, false);
}
- *format = gl::ExtractFormat(renderbuffer->getActualFormat());
- *type = gl::ExtractType(renderbuffer->getActualFormat());
+ *format = gl::GetFormat(renderbuffer->getActualFormat(), mClientVersion);
+ *type = gl::GetType(renderbuffer->getActualFormat(), mClientVersion);
return true;
}