Fixed some warnings on GCC
Mozilla has recently made using NULL as integer an error (via
-Werror=conversion-null GCC flag), which caused ANGLE to no longer compile on
mingw in Mozilla tree. The ones that may not be obvious are removal of some <0
checks. They are not needed because they were done on unsigned types.
Author: Jacek Caban
http://codereview.appspot.com/6679049
(With changes to apply to dx11proto branch)
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1464 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index 57f572e..67d32bc 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -1517,7 +1517,7 @@
break;
case GL_TEXTURE_BINDING_2D:
{
- if (mState.activeSampler < 0 || mState.activeSampler > getMaximumCombinedTextureImageUnits() - 1)
+ if (mState.activeSampler > getMaximumCombinedTextureImageUnits() - 1)
{
error(GL_INVALID_OPERATION);
return false;
@@ -1528,7 +1528,7 @@
break;
case GL_TEXTURE_BINDING_CUBE_MAP:
{
- if (mState.activeSampler < 0 || mState.activeSampler > getMaximumCombinedTextureImageUnits() - 1)
+ if (mState.activeSampler > getMaximumCombinedTextureImageUnits() - 1)
{
error(GL_INVALID_OPERATION);
return false;
@@ -2366,7 +2366,7 @@
applyShaders();
applyTextures();
- if (!getCurrentProgramBinary()->validateSamplers(false))
+ if (!getCurrentProgramBinary()->validateSamplers(NULL))
{
return error(GL_INVALID_OPERATION);
}