Commit 10d4026b by Corentin Wallez Committed by Commit Bot

Fix compilation error on 32-bit systems

a99ed554 introduced explicit template instantiations that tunred out to be the same on 32-bit CPUs because GLenum and size_t are the same type. BUG=angleproject:2165 Change-Id: I85fafeff1996cb457f2b718e177944fc6aca50bf Reviewed-on: https://chromium-review.googlesource.com/699839 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent cb62d86f
...@@ -83,8 +83,6 @@ template GLuint CastFromGLintStateValue<GLuint, GLenum>(GLenum pname, GLenum val ...@@ -83,8 +83,6 @@ template GLuint CastFromGLintStateValue<GLuint, GLenum>(GLenum pname, GLenum val
template GLfloat CastFromGLintStateValue<GLfloat, bool>(GLenum pname, bool value); template GLfloat CastFromGLintStateValue<GLfloat, bool>(GLenum pname, bool value);
template GLuint CastFromGLintStateValue<GLuint, bool>(GLenum pname, bool value); template GLuint CastFromGLintStateValue<GLuint, bool>(GLenum pname, bool value);
template GLint CastFromGLintStateValue<GLint, bool>(GLenum pname, bool value); template GLint CastFromGLintStateValue<GLint, bool>(GLenum pname, bool value);
template GLfloat CastFromGLintStateValue<GLfloat, size_t>(GLenum pname, size_t value);
template GLint CastFromGLintStateValue<GLint, size_t>(GLenum pname, size_t value);
template <typename QueryT, typename NativeT> template <typename QueryT, typename NativeT>
QueryT CastFromStateValue(GLenum pname, NativeT value) QueryT CastFromStateValue(GLenum pname, NativeT value)
......
...@@ -89,13 +89,16 @@ void QueryTexLevelParameterBase(const Texture *texture, ...@@ -89,13 +89,16 @@ void QueryTexLevelParameterBase(const Texture *texture,
pname, info->internalFormat ? info->internalFormat : GL_RGBA); pname, info->internalFormat ? info->internalFormat : GL_RGBA);
break; break;
case GL_TEXTURE_WIDTH: case GL_TEXTURE_WIDTH:
*params = CastFromGLintStateValue<ParamType>(pname, texture->getWidth(target, level)); *params = CastFromGLintStateValue<ParamType>(
pname, static_cast<uint32_t>(texture->getWidth(target, level)));
break; break;
case GL_TEXTURE_HEIGHT: case GL_TEXTURE_HEIGHT:
*params = CastFromGLintStateValue<ParamType>(pname, texture->getHeight(target, level)); *params = CastFromGLintStateValue<ParamType>(
pname, static_cast<uint32_t>(texture->getHeight(target, level)));
break; break;
case GL_TEXTURE_DEPTH: case GL_TEXTURE_DEPTH:
*params = CastFromGLintStateValue<ParamType>(pname, texture->getDepth(target, level)); *params = CastFromGLintStateValue<ParamType>(
pname, static_cast<uint32_t>(texture->getDepth(target, level)));
break; break;
case GL_TEXTURE_SAMPLES: case GL_TEXTURE_SAMPLES:
*params = CastFromStateValue<ParamType>(pname, texture->getSamples(target, level)); *params = CastFromStateValue<ParamType>(pname, texture->getSamples(target, level));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment