Correct subImage uses of texture type -> target.

Texture "types" are the same as texture "targets" except for cube maps.
Cube map targets specify a single face. Cube map types specify a whole
cube map. The subImage functions should take a target instead of a
type. We were using both in different places. This CL corrects all uses
in subImage calls to "target". It also adds a helper for getting a
target texture from a target. And clarifies the naming of the texture
query methods.

Bug: angleproject:3356
Change-Id: I06eb5c5666eec9b8934becf2ba57a066d5cdabde
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558672
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Jamie Madill 2019-04-08 16:26:51 -04:00 коммит произвёл Commit Bot
Родитель e29b61e6db
Коммит cfc73cc1af
13 изменённых файлов: 107 добавлений и 101 удалений

Просмотреть файл

@ -55,10 +55,10 @@
"target": "TextureTarget"
},
"glCompressedTexSubImage3D": {
"target": "TextureType"
"target": "TextureTarget"
},
"glCompressedTexSubImage3DRobustANGLE": {
"target": "TextureType"
"target": "TextureTarget"
},
"glCopyTexImage2D": {
"target": "TextureTarget"
@ -73,7 +73,7 @@
"target": "TextureTarget"
},
"glCopyTexSubImage3D": {
"target": "TextureType"
"target": "TextureTarget"
},
"glCopySubTexture3DANGLE": {
"destTarget": "TextureTarget"
@ -466,10 +466,10 @@
"target": "TextureTarget"
},
"glTexSubImage3D": {
"target": "TextureType"
"target": "TextureTarget"
},
"glTexSubImage3DRobustANGLE": {
"target": "TextureType"
"target": "TextureTarget"
},
"glUnmapBuffer": {
"target": "BufferBinding"

Просмотреть файл

@ -92,7 +92,7 @@
"GL/EGL entry points:scripts/egl_angle_ext.xml":
"745534010f31fbe8e1a1fcddce15ed2d",
"GL/EGL entry points:scripts/entry_point_packed_gl_enums.json":
"a161bca02b89f244c56cc2702581e805",
"9bc20d81551055da0fb453ccf3f52f60",
"GL/EGL entry points:scripts/generate_entry_points.py":
"7bd73a78c638334a114ed027d49cb6df",
"GL/EGL entry points:scripts/gl.xml":
@ -110,9 +110,9 @@
"GL/EGL entry points:src/libANGLE/validationES31_autogen.h":
"22ef241ea5b79a6abe6589f1afcc80a2",
"GL/EGL entry points:src/libANGLE/validationES3_autogen.h":
"210f732f87ac6a184bde4d4d1e548f70",
"345af98379909661060556c7ffaef7c0",
"GL/EGL entry points:src/libANGLE/validationESEXT_autogen.h":
"aec7b57a43322eb9f3959dc12e474058",
"4585c928c60468b4a1909f31ce502daf",
"GL/EGL entry points:src/libGLESv2/entry_points_enum_autogen.h":
"c023a19637be195551e04642f489eb24",
"GL/EGL entry points:src/libGLESv2/entry_points_gles_1_0_autogen.cpp":
@ -124,7 +124,7 @@
"GL/EGL entry points:src/libGLESv2/entry_points_gles_2_0_autogen.h":
"3bbaf1cf42fba5d675e5b54cd1d14df7",
"GL/EGL entry points:src/libGLESv2/entry_points_gles_3_0_autogen.cpp":
"555b6fa72e56b5d6a531b744e5dd0607",
"86234d9b1a412ba827131adf931453c1",
"GL/EGL entry points:src/libGLESv2/entry_points_gles_3_0_autogen.h":
"395f6978219abd5182bbe80cc367e40c",
"GL/EGL entry points:src/libGLESv2/entry_points_gles_3_1_autogen.cpp":
@ -132,7 +132,7 @@
"GL/EGL entry points:src/libGLESv2/entry_points_gles_3_1_autogen.h":
"043d09a964c740067bf4279e0b544aed",
"GL/EGL entry points:src/libGLESv2/entry_points_gles_ext_autogen.cpp":
"41608a3051395e280509f4dffca55659",
"6f0d4c01e04b65800e4a800327581a26",
"GL/EGL entry points:src/libGLESv2/entry_points_gles_ext_autogen.h":
"1daa12e804ae05ed40176d18eb895e84",
"GL/EGL entry points:src/libGLESv2/libGLESv2_autogen.cpp":

Просмотреть файл

@ -38,8 +38,7 @@ TextureType TextureTargetToType(TextureTarget target)
return TextureType::_2DMultisampleArray;
case TextureTarget::_3D:
return TextureType::_3D;
default:
UNREACHABLE();
case TextureTarget::InvalidEnum:
return TextureType::InvalidEnum;
}
}

Просмотреть файл

@ -1325,12 +1325,17 @@ Query *Context::getQuery(GLuint handle) const
return mQueryMap.query(handle);
}
Texture *Context::getTargetTexture(TextureType type) const
Texture *Context::getTextureByType(TextureType type) const
{
ASSERT(ValidTextureTarget(this, type) || ValidTextureExternalTarget(this, type));
return mState.getTargetTexture(type);
}
Texture *Context::getTextureByTarget(TextureTarget target) const
{
return getTextureByType(TextureTargetToType(target));
}
Texture *Context::getSamplerTexture(unsigned int sampler, TextureType type) const
{
return mState.getSamplerTexture(sampler, type);
@ -2031,7 +2036,7 @@ void Context::getRenderbufferParameterivRobust(GLenum target,
void Context::getTexParameterfv(TextureType target, GLenum pname, GLfloat *params)
{
const Texture *const texture = getTargetTexture(target);
const Texture *const texture = getTextureByType(target);
QueryTexParameterfv(texture, pname, params);
}
@ -2046,19 +2051,19 @@ void Context::getTexParameterfvRobust(TextureType target,
void Context::getTexParameteriv(TextureType target, GLenum pname, GLint *params)
{
const Texture *const texture = getTargetTexture(target);
const Texture *const texture = getTextureByType(target);
QueryTexParameteriv(texture, pname, params);
}
void Context::getTexParameterIiv(TextureType target, GLenum pname, GLint *params)
{
const Texture *const texture = getTargetTexture(target);
const Texture *const texture = getTextureByType(target);
QueryTexParameterIiv(texture, pname, params);
}
void Context::getTexParameterIuiv(TextureType target, GLenum pname, GLuint *params)
{
const Texture *const texture = getTargetTexture(target);
const Texture *const texture = getTextureByType(target);
QueryTexParameterIuiv(texture, pname, params);
}
@ -2091,7 +2096,7 @@ void Context::getTexParameterIuivRobust(TextureType target,
void Context::getTexLevelParameteriv(TextureTarget target, GLint level, GLenum pname, GLint *params)
{
Texture *texture = getTargetTexture(TextureTargetToType(target));
Texture *texture = getTextureByTarget(target);
QueryTexLevelParameteriv(texture, target, level, pname, params);
}
@ -2110,7 +2115,7 @@ void Context::getTexLevelParameterfv(TextureTarget target,
GLenum pname,
GLfloat *params)
{
Texture *texture = getTargetTexture(TextureTargetToType(target));
Texture *texture = getTextureByTarget(target);
QueryTexLevelParameterfv(texture, target, level, pname, params);
}
@ -2126,13 +2131,13 @@ void Context::getTexLevelParameterfvRobust(TextureTarget target,
void Context::texParameterf(TextureType target, GLenum pname, GLfloat param)
{
Texture *const texture = getTargetTexture(target);
Texture *const texture = getTextureByType(target);
SetTexParameterf(this, texture, pname, param);
}
void Context::texParameterfv(TextureType target, GLenum pname, const GLfloat *params)
{
Texture *const texture = getTargetTexture(target);
Texture *const texture = getTextureByType(target);
SetTexParameterfv(this, texture, pname, params);
}
@ -2146,25 +2151,25 @@ void Context::texParameterfvRobust(TextureType target,
void Context::texParameteri(TextureType target, GLenum pname, GLint param)
{
Texture *const texture = getTargetTexture(target);
Texture *const texture = getTextureByType(target);
SetTexParameteri(this, texture, pname, param);
}
void Context::texParameteriv(TextureType target, GLenum pname, const GLint *params)
{
Texture *const texture = getTargetTexture(target);
Texture *const texture = getTextureByType(target);
SetTexParameteriv(this, texture, pname, params);
}
void Context::texParameterIiv(TextureType target, GLenum pname, const GLint *params)
{
Texture *const texture = getTargetTexture(target);
Texture *const texture = getTextureByType(target);
SetTexParameterIiv(this, texture, pname, params);
}
void Context::texParameterIuiv(TextureType target, GLenum pname, const GLuint *params)
{
Texture *const texture = getTargetTexture(target);
Texture *const texture = getTextureByType(target);
SetTexParameterIuiv(this, texture, pname, params);
}
@ -3702,7 +3707,7 @@ void Context::copyTexImage2D(TextureTarget target,
Rectangle sourceArea(x, y, width, height);
Framebuffer *framebuffer = mState.getReadFramebuffer();
Texture *texture = getTargetTexture(TextureTargetToType(target));
Texture *texture = getTextureByTarget(target);
ANGLE_CONTEXT_TRY(
texture->copyImage(this, target, level, sourceArea, internalformat, framebuffer));
}
@ -3730,11 +3735,11 @@ void Context::copyTexSubImage2D(TextureTarget target,
ImageIndex index = ImageIndex::MakeFromTarget(target, level);
Framebuffer *framebuffer = mState.getReadFramebuffer();
Texture *texture = getTargetTexture(TextureTargetToType(target));
Texture *texture = getTextureByTarget(target);
ANGLE_CONTEXT_TRY(texture->copySubImage(this, index, destOffset, sourceArea, framebuffer));
}
void Context::copyTexSubImage3D(TextureType target,
void Context::copyTexSubImage3D(TextureTarget target,
GLint level,
GLint xoffset,
GLint yoffset,
@ -3755,10 +3760,10 @@ void Context::copyTexSubImage3D(TextureType target,
Offset destOffset(xoffset, yoffset, zoffset);
Rectangle sourceArea(x, y, width, height);
ImageIndex index = ImageIndex::MakeFromType(target, level, zoffset);
ImageIndex index = ImageIndex::MakeFromType(TextureTargetToType(target), level, zoffset);
Framebuffer *framebuffer = mState.getReadFramebuffer();
Texture *texture = getTargetTexture(target);
Texture *texture = getTextureByTarget(target);
ANGLE_CONTEXT_TRY(texture->copySubImage(this, index, destOffset, sourceArea, framebuffer));
}
@ -3997,7 +4002,7 @@ void Context::texImage2D(TextureTarget target,
ANGLE_CONTEXT_TRY(syncStateForTexImage());
Extents size(width, height, 1);
Texture *texture = getTargetTexture(TextureTargetToType(target));
Texture *texture = getTextureByTarget(target);
ANGLE_CONTEXT_TRY(texture->setImage(this, mState.getUnpackState(), target, level,
internalformat, size, format, type,
static_cast<const uint8_t *>(pixels)));
@ -4031,7 +4036,7 @@ void Context::texImage3D(TextureType target,
ANGLE_CONTEXT_TRY(syncStateForTexImage());
Extents size(width, height, depth);
Texture *texture = getTargetTexture(target);
Texture *texture = getTextureByType(target);
ANGLE_CONTEXT_TRY(texture->setImage(this, mState.getUnpackState(),
NonCubeTextureTypeToTarget(target), level, internalformat,
size, format, type, static_cast<const uint8_t *>(pixels)));
@ -4071,7 +4076,7 @@ void Context::texSubImage2D(TextureTarget target,
ANGLE_CONTEXT_TRY(syncStateForTexImage());
Box area(xoffset, yoffset, 0, width, height, 1);
Texture *texture = getTargetTexture(TextureTargetToType(target));
Texture *texture = getTextureByTarget(target);
gl::Buffer *unpackBuffer = mState.getTargetBuffer(gl::BufferBinding::PixelUnpack);
@ -4094,7 +4099,7 @@ void Context::texSubImage2DRobust(TextureTarget target,
texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
}
void Context::texSubImage3D(TextureType target,
void Context::texSubImage3D(TextureTarget target,
GLint level,
GLint xoffset,
GLint yoffset,
@ -4115,16 +4120,16 @@ void Context::texSubImage3D(TextureType target,
ANGLE_CONTEXT_TRY(syncStateForTexImage());
Box area(xoffset, yoffset, zoffset, width, height, depth);
Texture *texture = getTargetTexture(target);
Texture *texture = getTextureByTarget(target);
gl::Buffer *unpackBuffer = mState.getTargetBuffer(gl::BufferBinding::PixelUnpack);
ANGLE_CONTEXT_TRY(texture->setSubImage(this, mState.getUnpackState(), unpackBuffer,
NonCubeTextureTypeToTarget(target), level, area, format,
type, static_cast<const uint8_t *>(pixels)));
ANGLE_CONTEXT_TRY(texture->setSubImage(this, mState.getUnpackState(), unpackBuffer, target,
level, area, format, type,
static_cast<const uint8_t *>(pixels)));
}
void Context::texSubImage3DRobust(TextureType target,
void Context::texSubImage3DRobust(TextureTarget target,
GLint level,
GLint xoffset,
GLint yoffset,
@ -4153,7 +4158,7 @@ void Context::compressedTexImage2D(TextureTarget target,
ANGLE_CONTEXT_TRY(syncStateForTexImage());
Extents size(width, height, 1);
Texture *texture = getTargetTexture(TextureTargetToType(target));
Texture *texture = getTextureByTarget(target);
ANGLE_CONTEXT_TRY(texture->setCompressedImage(this, mState.getUnpackState(), target, level,
internalformat, size, imageSize,
static_cast<const uint8_t *>(data)));
@ -4185,7 +4190,7 @@ void Context::compressedTexImage3D(TextureType target,
ANGLE_CONTEXT_TRY(syncStateForTexImage());
Extents size(width, height, depth);
Texture *texture = getTargetTexture(target);
Texture *texture = getTextureByType(target);
ANGLE_CONTEXT_TRY(texture->setCompressedImage(
this, mState.getUnpackState(), NonCubeTextureTypeToTarget(target), level, internalformat,
size, imageSize, static_cast<const uint8_t *>(data)));
@ -4219,7 +4224,7 @@ void Context::compressedTexSubImage2D(TextureTarget target,
ANGLE_CONTEXT_TRY(syncStateForTexImage());
Box area(xoffset, yoffset, 0, width, height, 1);
Texture *texture = getTargetTexture(TextureTargetToType(target));
Texture *texture = getTextureByTarget(target);
ANGLE_CONTEXT_TRY(texture->setCompressedSubImage(this, mState.getUnpackState(), target, level,
area, format, imageSize,
static_cast<const uint8_t *>(data)));
@ -4240,7 +4245,7 @@ void Context::compressedTexSubImage2DRobust(TextureTarget target,
data);
}
void Context::compressedTexSubImage3D(TextureType target,
void Context::compressedTexSubImage3D(TextureTarget target,
GLint level,
GLint xoffset,
GLint yoffset,
@ -4261,13 +4266,13 @@ void Context::compressedTexSubImage3D(TextureType target,
ANGLE_CONTEXT_TRY(syncStateForTexImage());
Box area(xoffset, yoffset, zoffset, width, height, depth);
Texture *texture = getTargetTexture(target);
ANGLE_CONTEXT_TRY(texture->setCompressedSubImage(
this, mState.getUnpackState(), NonCubeTextureTypeToTarget(target), level, area, format,
imageSize, static_cast<const uint8_t *>(data)));
Texture *texture = getTextureByTarget(target);
ANGLE_CONTEXT_TRY(texture->setCompressedSubImage(this, mState.getUnpackState(), target, level,
area, format, imageSize,
static_cast<const uint8_t *>(data)));
}
void Context::compressedTexSubImage3DRobust(TextureType target,
void Context::compressedTexSubImage3DRobust(TextureTarget target,
GLint level,
GLint xoffset,
GLint yoffset,
@ -4286,7 +4291,7 @@ void Context::compressedTexSubImage3DRobust(TextureType target,
void Context::generateMipmap(TextureType target)
{
Texture *texture = getTargetTexture(target);
Texture *texture = getTextureByType(target);
ANGLE_CONTEXT_TRY(texture->generateMipmap(this));
}
@ -5159,7 +5164,7 @@ void Context::texStorage2DMultisample(TextureType target,
GLboolean fixedsamplelocations)
{
Extents size(width, height, 1);
Texture *texture = getTargetTexture(target);
Texture *texture = getTextureByType(target);
ANGLE_CONTEXT_TRY(texture->setStorageMultisample(this, target, samples, internalformat, size,
ConvertToBool(fixedsamplelocations)));
}
@ -5173,7 +5178,7 @@ void Context::texStorage3DMultisample(TextureType target,
GLboolean fixedsamplelocations)
{
Extents size(width, height, depth);
Texture *texture = getTargetTexture(target);
Texture *texture = getTextureByType(target);
ANGLE_CONTEXT_TRY(texture->setStorageMultisample(this, target, samples, internalformat, size,
ConvertToBool(fixedsamplelocations)));
}
@ -5293,7 +5298,7 @@ void Context::texStorage2D(TextureType target,
GLsizei height)
{
Extents size(width, height, 1);
Texture *texture = getTargetTexture(target);
Texture *texture = getTextureByType(target);
ANGLE_CONTEXT_TRY(texture->setStorage(this, target, levels, internalFormat, size));
}
@ -5305,7 +5310,7 @@ void Context::texStorage3D(TextureType target,
GLsizei depth)
{
Extents size(width, height, depth);
Texture *texture = getTargetTexture(target);
Texture *texture = getTextureByType(target);
ANGLE_CONTEXT_TRY(texture->setStorage(this, target, levels, internalFormat, size));
}
@ -7263,7 +7268,7 @@ void Context::importSemaphoreFd(GLuint semaphore, GLenum handleType, GLint fd)
void Context::eGLImageTargetTexture2D(TextureType target, GLeglImageOES image)
{
Texture *texture = getTargetTexture(target);
Texture *texture = getTextureByType(target);
egl::Image *imageObject = static_cast<egl::Image *>(image);
ANGLE_CONTEXT_TRY(texture->setEGLImageTarget(this, target, imageObject));
}

Просмотреть файл

@ -669,7 +669,8 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl
GLchar *label) const;
void getObjectPtrLabel(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label) const;
Texture *getTargetTexture(TextureType type) const;
Texture *getTextureByType(TextureType type) const;
Texture *getTextureByTarget(TextureTarget target) const;
Texture *getSamplerTexture(unsigned int sampler, TextureType type) const;
Compiler *getCompiler() const;
@ -921,7 +922,7 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl
GLsizei width,
GLsizei height);
void copyTexSubImage3D(TextureType target,
void copyTexSubImage3D(TextureTarget target,
GLint level,
GLint xoffset,
GLint yoffset,
@ -1032,7 +1033,7 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl
GLenum type,
GLsizei bufSize,
const void *pixels);
void texSubImage3D(TextureType target,
void texSubImage3D(TextureTarget target,
GLint level,
GLint xoffset,
GLint yoffset,
@ -1043,7 +1044,7 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl
GLenum format,
GLenum type,
const void *pixels);
void texSubImage3DRobust(TextureType target,
void texSubImage3DRobust(TextureTarget target,
GLint level,
GLint xoffset,
GLint yoffset,
@ -1110,7 +1111,7 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl
GLsizei imageSize,
GLsizei dataSize,
const GLvoid *data);
void compressedTexSubImage3D(TextureType target,
void compressedTexSubImage3D(TextureTarget target,
GLint level,
GLint xoffset,
GLint yoffset,
@ -1121,7 +1122,7 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl
GLenum format,
GLsizei imageSize,
const void *data);
void compressedTexSubImage3DRobust(TextureType target,
void compressedTexSubImage3DRobust(TextureTarget target,
GLint level,
GLint xoffset,
GLint yoffset,

Просмотреть файл

@ -2956,7 +2956,7 @@ Error ValidateBindTexImage(const Display *display,
if (context)
{
gl::TextureType type = egl_gl::EGLTextureTargetToTextureType(surface->getTextureTarget());
*textureObject = context->getTargetTexture(type);
*textureObject = context->getTextureByType(type);
ASSERT(*textureObject != nullptr);
if ((*textureObject)->getImmutableFormat())

Просмотреть файл

@ -5100,7 +5100,7 @@ bool ValidateGetTexParameterBase(Context *context,
return false;
}
if (context->getTargetTexture(target) == nullptr)
if (context->getTextureByType(target) == nullptr)
{
// Should only be possible for external textures
context->validationError(GL_INVALID_ENUM, kTextureNotBound);
@ -5559,7 +5559,7 @@ bool ValidateTexParameterBase(Context *context,
return false;
}
if (context->getTargetTexture(target) == nullptr)
if (context->getTextureByType(target) == nullptr)
{
// Should only be possible for external textures
context->validationError(GL_INVALID_ENUM, kTextureNotBound);
@ -6262,7 +6262,7 @@ bool ValidateTexStorageMultisample(Context *context,
return false;
}
Texture *texture = context->getTargetTexture(target);
Texture *texture = context->getTextureByType(target);
if (!texture || texture->id() == 0)
{
context->validationError(GL_INVALID_OPERATION, kZeroBoundToTarget);
@ -6319,7 +6319,7 @@ bool ValidateGetTexLevelParameterBase(Context *context,
return false;
}
if (context->getTargetTexture(type) == nullptr)
if (context->getTextureByType(type) == nullptr)
{
context->validationError(GL_INVALID_ENUM, kTextureNotBound);
return false;

Просмотреть файл

@ -1203,7 +1203,7 @@ bool ValidateES2TexImageParameters(Context *context,
return false;
}
gl::Texture *texture = context->getTargetTexture(texType);
gl::Texture *texture = context->getTextureByType(texType);
if (!texture)
{
context->validationError(GL_INVALID_OPERATION, kBufferNotBound);
@ -1905,7 +1905,7 @@ bool ValidateES2TexStorageParameters(Context *context,
break;
}
gl::Texture *texture = context->getTargetTexture(target);
gl::Texture *texture = context->getTextureByType(target);
if (!texture || texture->id() == 0)
{
context->validationError(GL_INVALID_OPERATION, kMissingTexture);
@ -6225,7 +6225,7 @@ bool ValidateGenerateMipmap(Context *context, TextureType target)
return false;
}
Texture *texture = context->getTargetTexture(target);
Texture *texture = context->getTextureByType(target);
if (texture == nullptr)
{

Просмотреть файл

@ -431,7 +431,7 @@ bool ValidateES3TexImageParametersBase(Context *context,
return false;
}
gl::Texture *texture = context->getTargetTexture(texType);
gl::Texture *texture = context->getTextureByType(texType);
if (!texture)
{
context->validationError(GL_INVALID_OPERATION, kMissingTexture);
@ -1125,7 +1125,7 @@ bool ValidateES3TexStorageParametersBase(Context *context,
return false;
}
gl::Texture *texture = context->getTargetTexture(target);
gl::Texture *texture = context->getTextureByType(target);
if (!texture || texture->id() == 0)
{
context->validationError(GL_INVALID_OPERATION, kMissingTexture);
@ -1995,7 +1995,7 @@ bool ValidateDrawBuffers(Context *context, GLsizei n, const GLenum *bufs)
}
bool ValidateCopyTexSubImage3D(Context *context,
TextureType target,
TextureTarget target,
GLint level,
GLint xoffset,
GLint yoffset,
@ -2011,8 +2011,9 @@ bool ValidateCopyTexSubImage3D(Context *context,
return false;
}
return ValidateES3CopyTexImage3DParameters(context, target, level, GL_NONE, true, xoffset,
yoffset, zoffset, x, y, width, height, 0);
return ValidateES3CopyTexImage3DParameters(context, TextureTargetToType(target), level, GL_NONE,
true, xoffset, yoffset, zoffset, x, y, width, height,
0);
}
bool ValidateCopyTexture3DANGLE(Context *context,
@ -2219,7 +2220,7 @@ bool ValidateTexImage3DRobustANGLE(Context *context,
}
bool ValidateTexSubImage3D(Context *context,
TextureType target,
TextureTarget target,
GLint level,
GLint xoffset,
GLint yoffset,
@ -2237,13 +2238,13 @@ bool ValidateTexSubImage3D(Context *context,
return false;
}
return ValidateES3TexImage3DParameters(context, target, level, GL_NONE, false, true, xoffset,
yoffset, zoffset, width, height, depth, 0, format, type,
-1, pixels);
return ValidateES3TexImage3DParameters(context, TextureTargetToType(target), level, GL_NONE,
false, true, xoffset, yoffset, zoffset, width, height,
depth, 0, format, type, -1, pixels);
}
bool ValidateTexSubImage3DRobustANGLE(Context *context,
TextureType target,
TextureTarget target,
GLint level,
GLint xoffset,
GLint yoffset,
@ -2267,13 +2268,13 @@ bool ValidateTexSubImage3DRobustANGLE(Context *context,
return false;
}
return ValidateES3TexImage3DParameters(context, target, level, GL_NONE, false, true, xoffset,
yoffset, zoffset, width, height, depth, 0, format, type,
bufSize, pixels);
return ValidateES3TexImage3DParameters(context, TextureTargetToType(target), level, GL_NONE,
false, true, xoffset, yoffset, zoffset, width, height,
depth, 0, format, type, bufSize, pixels);
}
bool ValidateCompressedTexSubImage3D(Context *context,
TextureType target,
TextureTarget target,
GLint level,
GLint xoffset,
GLint yoffset,
@ -2311,9 +2312,9 @@ bool ValidateCompressedTexSubImage3D(Context *context,
return false;
}
if (!ValidateES3TexImage3DParameters(context, target, level, GL_NONE, true, true, xoffset,
yoffset, zoffset, width, height, depth, 0, format, GL_NONE,
-1, data))
if (!ValidateES3TexImage3DParameters(context, TextureTargetToType(target), level, GL_NONE, true,
true, xoffset, yoffset, zoffset, width, height, depth, 0,
format, GL_NONE, -1, data))
{
return false;
}
@ -2328,7 +2329,7 @@ bool ValidateCompressedTexSubImage3D(Context *context,
}
bool ValidateCompressedTexSubImage3DRobustANGLE(Context *context,
TextureType target,
TextureTarget target,
GLint level,
GLint xoffset,
GLint yoffset,

Просмотреть файл

@ -63,7 +63,7 @@ bool ValidateCompressedTexImage3D(Context *context,
GLsizei imageSize,
const void *data);
bool ValidateCompressedTexSubImage3D(Context *context,
TextureType targetPacked,
TextureTarget targetPacked,
GLint level,
GLint xoffset,
GLint yoffset,
@ -81,7 +81,7 @@ bool ValidateCopyBufferSubData(Context *context,
GLintptr writeOffset,
GLsizeiptr size);
bool ValidateCopyTexSubImage3D(Context *context,
TextureType targetPacked,
TextureTarget targetPacked,
GLint level,
GLint xoffset,
GLint yoffset,
@ -269,7 +269,7 @@ bool ValidateTexStorage3D(Context *context,
GLsizei height,
GLsizei depth);
bool ValidateTexSubImage3D(Context *context,
TextureType targetPacked,
TextureTarget targetPacked,
GLint level,
GLint xoffset,
GLint yoffset,

Просмотреть файл

@ -277,7 +277,7 @@ bool ValidateTexImage3DRobustANGLE(Context *context,
GLsizei bufSize,
const void *pixels);
bool ValidateTexSubImage3DRobustANGLE(Context *context,
TextureType targetPacked,
TextureTarget targetPacked,
GLint level,
GLint xoffset,
GLint yoffset,
@ -322,7 +322,7 @@ bool ValidateCompressedTexImage3DRobustANGLE(Context *context,
GLsizei dataSize,
const GLvoid *data);
bool ValidateCompressedTexSubImage3DRobustANGLE(Context *context,
TextureType targetPacked,
TextureTarget targetPacked,
GLint level,
GLint xoffset,
GLint yoffset,

Просмотреть файл

@ -303,7 +303,7 @@ void GL_APIENTRY CompressedTexSubImage3D(GLenum target,
Context *context = GetValidGlobalContext();
if (context)
{
TextureType targetPacked = FromGLenum<TextureType>(target);
TextureTarget targetPacked = FromGLenum<TextureTarget>(target);
if (context->skipValidation() ||
ValidateCompressedTexSubImage3D(context, targetPacked, level, xoffset, yoffset, zoffset,
width, height, depth, format, imageSize, data))
@ -361,7 +361,7 @@ void GL_APIENTRY CopyTexSubImage3D(GLenum target,
Context *context = GetValidGlobalContext();
if (context)
{
TextureType targetPacked = FromGLenum<TextureType>(target);
TextureTarget targetPacked = FromGLenum<TextureTarget>(target);
if (context->skipValidation() ||
ValidateCopyTexSubImage3D(context, targetPacked, level, xoffset, yoffset, zoffset, x, y,
width, height))
@ -1544,7 +1544,7 @@ void GL_APIENTRY TexSubImage3D(GLenum target,
Context *context = GetValidGlobalContext();
if (context)
{
TextureType targetPacked = FromGLenum<TextureType>(target);
TextureTarget targetPacked = FromGLenum<TextureTarget>(target);
if (context->skipValidation() ||
ValidateTexSubImage3D(context, targetPacked, level, xoffset, yoffset, zoffset, width,
height, depth, format, type, pixels))

Просмотреть файл

@ -959,7 +959,7 @@ void GL_APIENTRY TexSubImage3DRobustANGLE(GLenum target,
Context *context = GetValidGlobalContext();
if (context)
{
TextureType targetPacked = FromGLenum<TextureType>(target);
TextureTarget targetPacked = FromGLenum<TextureTarget>(target);
if (context->skipValidation() ||
ValidateTexSubImage3DRobustANGLE(context, targetPacked, level, xoffset, yoffset,
zoffset, width, height, depth, format, type, bufSize,
@ -1093,7 +1093,7 @@ void GL_APIENTRY CompressedTexSubImage3DRobustANGLE(GLenum target,
Context *context = GetValidGlobalContext();
if (context)
{
TextureType targetPacked = FromGLenum<TextureType>(target);
TextureTarget targetPacked = FromGLenum<TextureTarget>(target);
if (context->skipValidation() ||
ValidateCompressedTexSubImage3DRobustANGLE(context, targetPacked, level, xoffset,
yoffset, zoffset, width, height, depth,
@ -6462,7 +6462,7 @@ void GL_APIENTRY CompressedTexSubImage3DContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
TextureType targetPacked = FromGLenum<TextureType>(target);
TextureTarget targetPacked = FromGLenum<TextureTarget>(target);
if (context->skipValidation() ||
ValidateCompressedTexSubImage3D(context, targetPacked, level, xoffset, yoffset, zoffset,
width, height, depth, format, imageSize, data))
@ -6585,7 +6585,7 @@ void GL_APIENTRY CopyTexSubImage3DContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
TextureType targetPacked = FromGLenum<TextureType>(target);
TextureTarget targetPacked = FromGLenum<TextureTarget>(target);
if (context->skipValidation() ||
ValidateCopyTexSubImage3D(context, targetPacked, level, xoffset, yoffset, zoffset, x, y,
width, height))
@ -14867,7 +14867,7 @@ void GL_APIENTRY TexSubImage3DContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
TextureType targetPacked = FromGLenum<TextureType>(target);
TextureTarget targetPacked = FromGLenum<TextureTarget>(target);
if (context->skipValidation() ||
ValidateTexSubImage3D(context, targetPacked, level, xoffset, yoffset, zoffset, width,
height, depth, format, type, pixels))
@ -17558,7 +17558,7 @@ void GL_APIENTRY TexSubImage3DRobustANGLEContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
TextureType targetPacked = FromGLenum<TextureType>(target);
TextureTarget targetPacked = FromGLenum<TextureTarget>(target);
if (context->skipValidation() ||
ValidateTexSubImage3DRobustANGLE(context, targetPacked, level, xoffset, yoffset,
zoffset, width, height, depth, format, type, bufSize,
@ -17700,7 +17700,7 @@ void GL_APIENTRY CompressedTexSubImage3DRobustANGLEContextANGLE(GLeglContext ctx
if (context)
{
ASSERT(context == GetValidGlobalContext());
TextureType targetPacked = FromGLenum<TextureType>(target);
TextureTarget targetPacked = FromGLenum<TextureTarget>(target);
if (context->skipValidation() ||
ValidateCompressedTexSubImage3DRobustANGLE(context, targetPacked, level, xoffset,
yoffset, zoffset, width, height, depth,