Use TextureID in place of GLuint handles.
Bug: angleproject:3611
Change-Id: Ie6156e8732b3ca4dc6c4439c059a5481a4dfd250
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1738753
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index 33e5834..2c9ae97 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -2428,7 +2428,7 @@
return true;
case GL_TEXTURE:
- if (context->getTexture(name) == nullptr)
+ if (context->getTexture({name}) == nullptr)
{
context->validationError(GL_INVALID_VALUE, kInvalidTextureName);
return false;
@@ -3433,7 +3433,7 @@
GLuint numBufferBarriers,
const BufferID *buffers,
GLuint numTextureBarriers,
- const GLuint *textures,
+ const TextureID *textures,
const GLenum *dstLayouts)
{
if (!context->getExtensions().semaphore)
@@ -3459,7 +3459,7 @@
GLuint numBufferBarriers,
const BufferID *buffers,
GLuint numTextureBarriers,
- const GLuint *textures,
+ const TextureID *textures,
const GLenum *srcLayouts)
{
if (!context->getExtensions().semaphore)
@@ -4396,10 +4396,10 @@
}
bool ValidateCopyTextureCHROMIUM(Context *context,
- GLuint sourceId,
+ TextureID sourceId,
GLint sourceLevel,
TextureTarget destTarget,
- GLuint destId,
+ TextureID destId,
GLint destLevel,
GLint internalFormat,
GLenum destType,
@@ -4498,10 +4498,10 @@
}
bool ValidateCopySubTextureCHROMIUM(Context *context,
- GLuint sourceId,
+ TextureID sourceId,
GLint sourceLevel,
TextureTarget destTarget,
- GLuint destId,
+ TextureID destId,
GLint destLevel,
GLint xoffset,
GLint yoffset,
@@ -4630,7 +4630,7 @@
return true;
}
-bool ValidateCompressedCopyTextureCHROMIUM(Context *context, GLuint sourceId, GLuint destId)
+bool ValidateCompressedCopyTextureCHROMIUM(Context *context, TextureID sourceId, TextureID destId)
{
if (!context->getExtensions().copyCompressedTexture)
{
@@ -5731,7 +5731,7 @@
return true;
}
-bool ValidateIsTexture(Context *context, GLuint texture)
+bool ValidateIsTexture(Context *context, TextureID texture)
{
return true;
}
@@ -6235,7 +6235,7 @@
return ValidateGenOrDelete(context, n);
}
-bool ValidateDeleteTextures(Context *context, GLint n, const GLuint *)
+bool ValidateDeleteTextures(Context *context, GLint n, const TextureID *textures)
{
return ValidateGenOrDelete(context, n);
}
@@ -6299,7 +6299,7 @@
GLenum target,
GLenum attachment,
TextureTarget textarget,
- GLuint texture,
+ TextureID texture,
GLint level)
{
// Attachments are required to be bound to level 0 without ES3 or the GL_OES_fbo_render_mipmap
@@ -6316,7 +6316,7 @@
return false;
}
- if (texture != 0)
+ if (texture.value != 0)
{
gl::Texture *tex = context->getTexture(texture);
ASSERT(tex);
@@ -6411,7 +6411,7 @@
GLenum target,
GLenum attachment,
TextureTarget textargetPacked,
- GLuint texture,
+ TextureID texture,
GLint level,
GLint zoffset)
{
@@ -6438,7 +6438,7 @@
return false;
}
- if (texture != 0)
+ if (texture.value != 0)
{
gl::Texture *tex = context->getTexture(texture);
ASSERT(tex);
@@ -6491,7 +6491,7 @@
return ValidateGenOrDelete(context, n);
}
-bool ValidateGenTextures(Context *context, GLint n, GLuint *)
+bool ValidateGenTextures(Context *context, GLint n, TextureID *textures)
{
return ValidateGenOrDelete(context, n);
}