Commit 43da7c4a by Jamie Madill Committed by Commit Bot

Remove excess gl:: prefixing in validationES.cpp.

Refactor only. Bug: angleproject:2747 Change-Id: I0ef7186daec54cd867ec2816f86f7205d836fd91 Reviewed-on: https://chromium-review.googlesource.com/1158609 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 1bd4bfb0
...@@ -83,7 +83,7 @@ bool ValidateDrawClientAttribs(Context *context) ...@@ -83,7 +83,7 @@ bool ValidateDrawClientAttribs(Context *context)
{ {
ASSERT(context->getStateCache().hasAnyEnabledClientAttrib()); ASSERT(context->getStateCache().hasAnyEnabledClientAttrib());
const gl::State &state = context->getGLState(); const State &state = context->getGLState();
if (context->getExtensions().webglCompatibility || !state.areClientArraysEnabled()) if (context->getExtensions().webglCompatibility || !state.areClientArraysEnabled())
{ {
...@@ -773,7 +773,7 @@ bool ValidMipLevel(const Context *context, TextureType type, GLint level) ...@@ -773,7 +773,7 @@ bool ValidMipLevel(const Context *context, TextureType type, GLint level)
UNREACHABLE(); UNREACHABLE();
} }
return level <= gl::log2(static_cast<int>(maxDimension)) && level >= 0; return level <= log2(static_cast<int>(maxDimension)) && level >= 0;
} }
bool ValidImageSizeParameters(Context *context, bool ValidImageSizeParameters(Context *context,
...@@ -794,7 +794,7 @@ bool ValidImageSizeParameters(Context *context, ...@@ -794,7 +794,7 @@ bool ValidImageSizeParameters(Context *context,
bool hasNPOTSupport = bool hasNPOTSupport =
context->getExtensions().textureNPOT || context->getClientVersion() >= Version(3, 0); context->getExtensions().textureNPOT || context->getClientVersion() >= Version(3, 0);
if (!isSubImage && !hasNPOTSupport && if (!isSubImage && !hasNPOTSupport &&
(level != 0 && (!gl::isPow2(width) || !gl::isPow2(height) || !gl::isPow2(depth)))) (level != 0 && (!isPow2(width) || !isPow2(height) || !isPow2(depth))))
{ {
ANGLE_VALIDATION_ERR(context, InvalidValue(), TextureNotPow2); ANGLE_VALIDATION_ERR(context, InvalidValue(), TextureNotPow2);
return false; return false;
...@@ -821,7 +821,7 @@ bool ValidCompressedImageSize(const Context *context, ...@@ -821,7 +821,7 @@ bool ValidCompressedImageSize(const Context *context,
GLsizei width, GLsizei width,
GLsizei height) GLsizei height)
{ {
const gl::InternalFormat &formatInfo = gl::GetSizedInternalFormatInfo(internalFormat); const InternalFormat &formatInfo = GetSizedInternalFormatInfo(internalFormat);
if (!formatInfo.compressed) if (!formatInfo.compressed)
{ {
return false; return false;
...@@ -860,7 +860,7 @@ bool ValidCompressedSubImageSize(const Context *context, ...@@ -860,7 +860,7 @@ bool ValidCompressedSubImageSize(const Context *context,
size_t textureWidth, size_t textureWidth,
size_t textureHeight) size_t textureHeight)
{ {
const gl::InternalFormat &formatInfo = gl::GetSizedInternalFormatInfo(internalFormat); const InternalFormat &formatInfo = GetSizedInternalFormatInfo(internalFormat);
if (!formatInfo.compressed) if (!formatInfo.compressed)
{ {
return false; return false;
...@@ -905,8 +905,7 @@ bool ValidImageDataSize(Context *context, ...@@ -905,8 +905,7 @@ bool ValidImageDataSize(Context *context,
const void *pixels, const void *pixels,
GLsizei imageSize) GLsizei imageSize)
{ {
gl::Buffer *pixelUnpackBuffer = Buffer *pixelUnpackBuffer = context->getGLState().getTargetBuffer(BufferBinding::PixelUnpack);
context->getGLState().getTargetBuffer(BufferBinding::PixelUnpack);
if (pixelUnpackBuffer == nullptr && imageSize < 0) if (pixelUnpackBuffer == nullptr && imageSize < 0)
{ {
// Checks are not required // Checks are not required
...@@ -915,9 +914,9 @@ bool ValidImageDataSize(Context *context, ...@@ -915,9 +914,9 @@ bool ValidImageDataSize(Context *context,
// ...the data would be unpacked from the buffer object such that the memory reads required // ...the data would be unpacked from the buffer object such that the memory reads required
// would exceed the data store size. // would exceed the data store size.
const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(format, type); const InternalFormat &formatInfo = GetInternalFormatInfo(format, type);
ASSERT(formatInfo.internalFormat != GL_NONE); ASSERT(formatInfo.internalFormat != GL_NONE);
const gl::Extents size(width, height, depth); const Extents size(width, height, depth);
const auto &unpack = context->getGLState().getUnpackState(); const auto &unpack = context->getGLState().getUnpackState();
bool targetIs3D = texType == TextureType::_3D || texType == TextureType::_2DArray; bool targetIs3D = texType == TextureType::_3D || texType == TextureType::_2DArray;
...@@ -1079,7 +1078,7 @@ Shader *GetValidShader(Context *context, GLuint id) ...@@ -1079,7 +1078,7 @@ Shader *GetValidShader(Context *context, GLuint id)
return validShader; return validShader;
} }
bool ValidateAttachmentTarget(gl::Context *context, GLenum attachment) bool ValidateAttachmentTarget(Context *context, GLenum attachment)
{ {
if (attachment >= GL_COLOR_ATTACHMENT1_EXT && attachment <= GL_COLOR_ATTACHMENT15_EXT) if (attachment >= GL_COLOR_ATTACHMENT1_EXT && attachment <= GL_COLOR_ATTACHMENT15_EXT)
{ {
...@@ -1159,7 +1158,7 @@ bool ValidateRenderbufferStorageParametersBase(Context *context, ...@@ -1159,7 +1158,7 @@ bool ValidateRenderbufferStorageParametersBase(Context *context,
// ANGLE_framebuffer_multisample does not explicitly state that the internal format must be // ANGLE_framebuffer_multisample does not explicitly state that the internal format must be
// sized but it does state that the format must be in the ES2.0 spec table 4.5 which contains // sized but it does state that the format must be in the ES2.0 spec table 4.5 which contains
// only sized internal formats. // only sized internal formats.
const gl::InternalFormat &formatInfo = gl::GetSizedInternalFormatInfo(convertedInternalFormat); const InternalFormat &formatInfo = GetSizedInternalFormatInfo(convertedInternalFormat);
if (formatInfo.internalFormat == GL_NONE) if (formatInfo.internalFormat == GL_NONE)
{ {
ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidRenderbufferInternalFormat); ANGLE_VALIDATION_ERR(context, InvalidEnum(), InvalidRenderbufferInternalFormat);
...@@ -1182,7 +1181,7 @@ bool ValidateRenderbufferStorageParametersBase(Context *context, ...@@ -1182,7 +1181,7 @@ bool ValidateRenderbufferStorageParametersBase(Context *context,
return true; return true;
} }
bool ValidateFramebufferRenderbufferParameters(gl::Context *context, bool ValidateFramebufferRenderbufferParameters(Context *context,
GLenum target, GLenum target,
GLenum attachment, GLenum attachment,
GLenum renderbuffertarget, GLenum renderbuffertarget,
...@@ -1194,7 +1193,7 @@ bool ValidateFramebufferRenderbufferParameters(gl::Context *context, ...@@ -1194,7 +1193,7 @@ bool ValidateFramebufferRenderbufferParameters(gl::Context *context,
return false; return false;
} }
gl::Framebuffer *framebuffer = context->getGLState().getTargetFramebuffer(target); Framebuffer *framebuffer = context->getGLState().getTargetFramebuffer(target);
ASSERT(framebuffer); ASSERT(framebuffer);
if (framebuffer->id() == 0) if (framebuffer->id() == 0)
...@@ -1262,8 +1261,8 @@ bool ValidateBlitFramebufferParameters(Context *context, ...@@ -1262,8 +1261,8 @@ bool ValidateBlitFramebufferParameters(Context *context,
} }
const auto &glState = context->getGLState(); const auto &glState = context->getGLState();
gl::Framebuffer *readFramebuffer = glState.getReadFramebuffer(); Framebuffer *readFramebuffer = glState.getReadFramebuffer();
gl::Framebuffer *drawFramebuffer = glState.getDrawFramebuffer(); Framebuffer *drawFramebuffer = glState.getDrawFramebuffer();
if (!readFramebuffer || !drawFramebuffer) if (!readFramebuffer || !drawFramebuffer)
{ {
...@@ -1305,7 +1304,7 @@ bool ValidateBlitFramebufferParameters(Context *context, ...@@ -1305,7 +1304,7 @@ bool ValidateBlitFramebufferParameters(Context *context,
if (mask & GL_COLOR_BUFFER_BIT) if (mask & GL_COLOR_BUFFER_BIT)
{ {
const gl::FramebufferAttachment *readColorBuffer = readFramebuffer->getReadColorbuffer(); const FramebufferAttachment *readColorBuffer = readFramebuffer->getReadColorbuffer();
const Extensions &extensions = context->getExtensions(); const Extensions &extensions = context->getExtensions();
if (readColorBuffer) if (readColorBuffer)
...@@ -1416,9 +1415,9 @@ bool ValidateBlitFramebufferParameters(Context *context, ...@@ -1416,9 +1415,9 @@ bool ValidateBlitFramebufferParameters(Context *context,
{ {
if (mask & masks[i]) if (mask & masks[i])
{ {
const gl::FramebufferAttachment *readBuffer = const FramebufferAttachment *readBuffer =
readFramebuffer->getAttachment(context, attachments[i]); readFramebuffer->getAttachment(context, attachments[i]);
const gl::FramebufferAttachment *drawBuffer = const FramebufferAttachment *drawBuffer =
drawFramebuffer->getAttachment(context, attachments[i]); drawFramebuffer->getAttachment(context, attachments[i]);
if (readBuffer && drawBuffer) if (readBuffer && drawBuffer)
...@@ -1575,7 +1574,7 @@ bool ValidateReadnPixelsRobustANGLE(Context *context, ...@@ -1575,7 +1574,7 @@ bool ValidateReadnPixelsRobustANGLE(Context *context,
return true; return true;
} }
bool ValidateGenQueriesEXT(gl::Context *context, GLsizei n, GLuint *ids) bool ValidateGenQueriesEXT(Context *context, GLsizei n, GLuint *ids)
{ {
if (!context->getExtensions().occlusionQueryBoolean && if (!context->getExtensions().occlusionQueryBoolean &&
!context->getExtensions().disjointTimerQuery) !context->getExtensions().disjointTimerQuery)
...@@ -1587,7 +1586,7 @@ bool ValidateGenQueriesEXT(gl::Context *context, GLsizei n, GLuint *ids) ...@@ -1587,7 +1586,7 @@ bool ValidateGenQueriesEXT(gl::Context *context, GLsizei n, GLuint *ids)
return ValidateGenOrDelete(context, n); return ValidateGenOrDelete(context, n);
} }
bool ValidateDeleteQueriesEXT(gl::Context *context, GLsizei n, const GLuint *ids) bool ValidateDeleteQueriesEXT(Context *context, GLsizei n, const GLuint *ids)
{ {
if (!context->getExtensions().occlusionQueryBoolean && if (!context->getExtensions().occlusionQueryBoolean &&
!context->getExtensions().disjointTimerQuery) !context->getExtensions().disjointTimerQuery)
...@@ -1599,7 +1598,7 @@ bool ValidateDeleteQueriesEXT(gl::Context *context, GLsizei n, const GLuint *ids ...@@ -1599,7 +1598,7 @@ bool ValidateDeleteQueriesEXT(gl::Context *context, GLsizei n, const GLuint *ids
return ValidateGenOrDelete(context, n); return ValidateGenOrDelete(context, n);
} }
bool ValidateIsQueryEXT(gl::Context *context, GLuint id) bool ValidateIsQueryEXT(Context *context, GLuint id)
{ {
if (!context->getExtensions().occlusionQueryBoolean && if (!context->getExtensions().occlusionQueryBoolean &&
!context->getExtensions().disjointTimerQuery) !context->getExtensions().disjointTimerQuery)
...@@ -1611,7 +1610,7 @@ bool ValidateIsQueryEXT(gl::Context *context, GLuint id) ...@@ -1611,7 +1610,7 @@ bool ValidateIsQueryEXT(gl::Context *context, GLuint id)
return true; return true;
} }
bool ValidateBeginQueryBase(gl::Context *context, QueryType target, GLuint id) bool ValidateBeginQueryBase(Context *context, QueryType target, GLuint id)
{ {
if (!ValidQueryType(context, target)) if (!ValidQueryType(context, target))
{ {
...@@ -1666,7 +1665,7 @@ bool ValidateBeginQueryBase(gl::Context *context, QueryType target, GLuint id) ...@@ -1666,7 +1665,7 @@ bool ValidateBeginQueryBase(gl::Context *context, QueryType target, GLuint id)
return true; return true;
} }
bool ValidateBeginQueryEXT(gl::Context *context, QueryType target, GLuint id) bool ValidateBeginQueryEXT(Context *context, QueryType target, GLuint id)
{ {
if (!context->getExtensions().occlusionQueryBoolean && if (!context->getExtensions().occlusionQueryBoolean &&
!context->getExtensions().disjointTimerQuery && !context->getExtensions().syncQuery) !context->getExtensions().disjointTimerQuery && !context->getExtensions().syncQuery)
...@@ -1678,7 +1677,7 @@ bool ValidateBeginQueryEXT(gl::Context *context, QueryType target, GLuint id) ...@@ -1678,7 +1677,7 @@ bool ValidateBeginQueryEXT(gl::Context *context, QueryType target, GLuint id)
return ValidateBeginQueryBase(context, target, id); return ValidateBeginQueryBase(context, target, id);
} }
bool ValidateEndQueryBase(gl::Context *context, QueryType target) bool ValidateEndQueryBase(Context *context, QueryType target)
{ {
if (!ValidQueryType(context, target)) if (!ValidQueryType(context, target))
{ {
...@@ -1697,7 +1696,7 @@ bool ValidateEndQueryBase(gl::Context *context, QueryType target) ...@@ -1697,7 +1696,7 @@ bool ValidateEndQueryBase(gl::Context *context, QueryType target)
return true; return true;
} }
bool ValidateEndQueryEXT(gl::Context *context, QueryType target) bool ValidateEndQueryEXT(Context *context, QueryType target)
{ {
if (!context->getExtensions().occlusionQueryBoolean && if (!context->getExtensions().occlusionQueryBoolean &&
!context->getExtensions().disjointTimerQuery && !context->getExtensions().syncQuery) !context->getExtensions().disjointTimerQuery && !context->getExtensions().syncQuery)
...@@ -2047,7 +2046,7 @@ bool ValidateGetQueryObjectui64vRobustANGLE(Context *context, ...@@ -2047,7 +2046,7 @@ bool ValidateGetQueryObjectui64vRobustANGLE(Context *context,
} }
bool ValidateUniformCommonBase(Context *context, bool ValidateUniformCommonBase(Context *context,
gl::Program *program, Program *program,
GLint location, GLint location,
GLsizei count, GLsizei count,
const LinkedUniform **uniformOut) const LinkedUniform **uniformOut)
...@@ -2171,7 +2170,7 @@ bool ValidateUniformMatrixValue(Context *context, GLenum valueType, GLenum unifo ...@@ -2171,7 +2170,7 @@ bool ValidateUniformMatrixValue(Context *context, GLenum valueType, GLenum unifo
bool ValidateUniform(Context *context, GLenum valueType, GLint location, GLsizei count) bool ValidateUniform(Context *context, GLenum valueType, GLint location, GLsizei count)
{ {
const LinkedUniform *uniform = nullptr; const LinkedUniform *uniform = nullptr;
gl::Program *programObject = context->getGLState().getProgram(); Program *programObject = context->getGLState().getProgram();
return ValidateUniformCommonBase(context, programObject, location, count, &uniform) && return ValidateUniformCommonBase(context, programObject, location, count, &uniform) &&
ValidateUniformValue(context, valueType, uniform->type); ValidateUniformValue(context, valueType, uniform->type);
} }
...@@ -2179,7 +2178,7 @@ bool ValidateUniform(Context *context, GLenum valueType, GLint location, GLsizei ...@@ -2179,7 +2178,7 @@ bool ValidateUniform(Context *context, GLenum valueType, GLint location, GLsizei
bool ValidateUniform1iv(Context *context, GLint location, GLsizei count, const GLint *value) bool ValidateUniform1iv(Context *context, GLint location, GLsizei count, const GLint *value)
{ {
const LinkedUniform *uniform = nullptr; const LinkedUniform *uniform = nullptr;
gl::Program *programObject = context->getGLState().getProgram(); Program *programObject = context->getGLState().getProgram();
return ValidateUniformCommonBase(context, programObject, location, count, &uniform) && return ValidateUniformCommonBase(context, programObject, location, count, &uniform) &&
ValidateUniform1ivValue(context, uniform->type, count, value); ValidateUniform1ivValue(context, uniform->type, count, value);
} }
...@@ -2197,7 +2196,7 @@ bool ValidateUniformMatrix(Context *context, ...@@ -2197,7 +2196,7 @@ bool ValidateUniformMatrix(Context *context,
} }
const LinkedUniform *uniform = nullptr; const LinkedUniform *uniform = nullptr;
gl::Program *programObject = context->getGLState().getProgram(); Program *programObject = context->getGLState().getProgram();
return ValidateUniformCommonBase(context, programObject, location, count, &uniform) && return ValidateUniformCommonBase(context, programObject, location, count, &uniform) &&
ValidateUniformMatrixValue(context, valueType, uniform->type); ValidateUniformMatrixValue(context, valueType, uniform->type);
} }
...@@ -2442,7 +2441,7 @@ bool ValidateCopyTexImageParametersBase(Context *context, ...@@ -2442,7 +2441,7 @@ bool ValidateCopyTexImageParametersBase(Context *context,
return false; return false;
} }
const gl::State &state = context->getGLState(); const State &state = context->getGLState();
Framebuffer *readFramebuffer = state.getReadFramebuffer(); Framebuffer *readFramebuffer = state.getReadFramebuffer();
if (!ValidateFramebufferComplete(context, readFramebuffer)) if (!ValidateFramebufferComplete(context, readFramebuffer))
{ {
...@@ -2483,7 +2482,7 @@ bool ValidateCopyTexImageParametersBase(Context *context, ...@@ -2483,7 +2482,7 @@ bool ValidateCopyTexImageParametersBase(Context *context,
return false; return false;
} }
const gl::Caps &caps = context->getCaps(); const Caps &caps = context->getCaps();
GLuint maxDimension = 0; GLuint maxDimension = 0;
switch (texType) switch (texType)
...@@ -2513,7 +2512,7 @@ bool ValidateCopyTexImageParametersBase(Context *context, ...@@ -2513,7 +2512,7 @@ bool ValidateCopyTexImageParametersBase(Context *context,
return false; return false;
} }
gl::Texture *texture = state.getTargetTexture(texType); Texture *texture = state.getTargetTexture(texType);
if (!texture) if (!texture)
{ {
ANGLE_VALIDATION_ERR(context, InvalidOperation(), TextureNotBound); ANGLE_VALIDATION_ERR(context, InvalidOperation(), TextureNotBound);
...@@ -2526,9 +2525,9 @@ bool ValidateCopyTexImageParametersBase(Context *context, ...@@ -2526,9 +2525,9 @@ bool ValidateCopyTexImageParametersBase(Context *context,
return false; return false;
} }
const gl::InternalFormat &formatInfo = const InternalFormat &formatInfo =
isSubImage ? *texture->getFormat(target, level).info isSubImage ? *texture->getFormat(target, level).info
: gl::GetInternalFormatInfo(internalformat, GL_UNSIGNED_BYTE); : GetInternalFormatInfo(internalformat, GL_UNSIGNED_BYTE);
if (formatInfo.depthBits > 0 || formatInfo.compressed) if (formatInfo.depthBits > 0 || formatInfo.compressed)
{ {
...@@ -2687,7 +2686,7 @@ bool ValidateDrawBase(Context *context, PrimitiveMode mode, GLsizei count) ...@@ -2687,7 +2686,7 @@ bool ValidateDrawBase(Context *context, PrimitiveMode mode, GLsizei count)
// If we are running GLES1, there is no current program. // If we are running GLES1, there is no current program.
if (context->getClientVersion() >= Version(2, 0)) if (context->getClientVersion() >= Version(2, 0))
{ {
gl::Program *program = state.getProgram(); Program *program = state.getProgram();
if (!program) if (!program)
{ {
ANGLE_VALIDATION_ERR(context, InvalidOperation(), ProgramNotBound); ANGLE_VALIDATION_ERR(context, InvalidOperation(), ProgramNotBound);
...@@ -2764,8 +2763,7 @@ bool ValidateDrawBase(Context *context, PrimitiveMode mode, GLsizei count) ...@@ -2764,8 +2763,7 @@ bool ValidateDrawBase(Context *context, PrimitiveMode mode, GLsizei count)
for (unsigned int uniformBlockIndex = 0; for (unsigned int uniformBlockIndex = 0;
uniformBlockIndex < program->getActiveUniformBlockCount(); uniformBlockIndex++) uniformBlockIndex < program->getActiveUniformBlockCount(); uniformBlockIndex++)
{ {
const gl::InterfaceBlock &uniformBlock = const InterfaceBlock &uniformBlock = program->getUniformBlockByIndex(uniformBlockIndex);
program->getUniformBlockByIndex(uniformBlockIndex);
GLuint blockBinding = program->getUniformBlockBinding(uniformBlockIndex); GLuint blockBinding = program->getUniformBlockBinding(uniformBlockIndex);
const OffsetBindingPointer<Buffer> &uniformBuffer = const OffsetBindingPointer<Buffer> &uniformBuffer =
state.getIndexedUniformBuffer(blockBinding); state.getIndexedUniformBuffer(blockBinding);
...@@ -2857,7 +2855,7 @@ bool ValidateDrawArraysCommon(Context *context, ...@@ -2857,7 +2855,7 @@ bool ValidateDrawArraysCommon(Context *context,
} }
const State &state = context->getGLState(); const State &state = context->getGLState();
gl::TransformFeedback *curTransformFeedback = state.getCurrentTransformFeedback(); TransformFeedback *curTransformFeedback = state.getCurrentTransformFeedback();
if (curTransformFeedback && curTransformFeedback->isActive() && if (curTransformFeedback && curTransformFeedback->isActive() &&
!curTransformFeedback->isPaused()) !curTransformFeedback->isPaused())
{ {
...@@ -2944,7 +2942,7 @@ bool ValidateDrawElementsBase(Context *context, PrimitiveMode mode, GLenum type) ...@@ -2944,7 +2942,7 @@ bool ValidateDrawElementsBase(Context *context, PrimitiveMode mode, GLenum type)
const State &state = context->getGLState(); const State &state = context->getGLState();
gl::TransformFeedback *curTransformFeedback = state.getCurrentTransformFeedback(); TransformFeedback *curTransformFeedback = state.getCurrentTransformFeedback();
if (curTransformFeedback && curTransformFeedback->isActive() && if (curTransformFeedback && curTransformFeedback->isActive() &&
!curTransformFeedback->isPaused()) !curTransformFeedback->isPaused())
{ {
...@@ -2990,10 +2988,10 @@ bool ValidateDrawElementsCommon(Context *context, ...@@ -2990,10 +2988,10 @@ bool ValidateDrawElementsCommon(Context *context,
return false; return false;
} }
const gl::VertexArray *vao = state.getVertexArray(); const VertexArray *vao = state.getVertexArray();
gl::Buffer *elementArrayBuffer = vao->getElementArrayBuffer().get(); Buffer *elementArrayBuffer = vao->getElementArrayBuffer().get();
GLuint typeBytes = gl::GetTypeInfo(type).bytes; GLuint typeBytes = GetTypeInfo(type).bytes;
if (context->getExtensions().webglCompatibility) if (context->getExtensions().webglCompatibility)
{ {
...@@ -3172,7 +3170,7 @@ bool ValidateFramebufferTextureBase(Context *context, ...@@ -3172,7 +3170,7 @@ bool ValidateFramebufferTextureBase(Context *context,
if (texture != 0) if (texture != 0)
{ {
gl::Texture *tex = context->getTexture(texture); Texture *tex = context->getTexture(texture);
if (tex == nullptr) if (tex == nullptr)
{ {
...@@ -3187,7 +3185,7 @@ bool ValidateFramebufferTextureBase(Context *context, ...@@ -3187,7 +3185,7 @@ bool ValidateFramebufferTextureBase(Context *context,
} }
} }
const gl::Framebuffer *framebuffer = context->getGLState().getTargetFramebuffer(target); const Framebuffer *framebuffer = context->getGLState().getTargetFramebuffer(target);
ASSERT(framebuffer); ASSERT(framebuffer);
if (framebuffer->id() == 0) if (framebuffer->id() == 0)
...@@ -3207,7 +3205,7 @@ bool ValidateGetUniformBase(Context *context, GLuint program, GLint location) ...@@ -3207,7 +3205,7 @@ bool ValidateGetUniformBase(Context *context, GLuint program, GLint location)
return false; return false;
} }
gl::Program *programObject = GetValidProgram(context, program); Program *programObject = GetValidProgram(context, program);
if (!programObject) if (!programObject)
{ {
return false; return false;
...@@ -3250,7 +3248,7 @@ static bool ValidateSizedGetUniform(Context *context, ...@@ -3250,7 +3248,7 @@ static bool ValidateSizedGetUniform(Context *context,
return false; return false;
} }
gl::Program *programObject = context->getProgram(program); Program *programObject = context->getProgram(program);
ASSERT(programObject); ASSERT(programObject);
// sized queries -- ensure the provided buffer is large enough // sized queries -- ensure the provided buffer is large enough
...@@ -5168,8 +5166,7 @@ bool ValidateRobustCompressedTexImageBase(Context *context, GLsizei imageSize, G ...@@ -5168,8 +5166,7 @@ bool ValidateRobustCompressedTexImageBase(Context *context, GLsizei imageSize, G
return false; return false;
} }
gl::Buffer *pixelUnpackBuffer = Buffer *pixelUnpackBuffer = context->getGLState().getTargetBuffer(BufferBinding::PixelUnpack);
context->getGLState().getTargetBuffer(BufferBinding::PixelUnpack);
if (pixelUnpackBuffer == nullptr) if (pixelUnpackBuffer == nullptr)
{ {
if (dataSize < imageSize) if (dataSize < imageSize)
...@@ -5697,7 +5694,7 @@ bool ValidateReadPixelsBase(Context *context, ...@@ -5697,7 +5694,7 @@ bool ValidateReadPixelsBase(Context *context,
} }
// Check for pixel pack buffer related API errors // Check for pixel pack buffer related API errors
gl::Buffer *pixelPackBuffer = context->getGLState().getTargetBuffer(BufferBinding::PixelPack); Buffer *pixelPackBuffer = context->getGLState().getTargetBuffer(BufferBinding::PixelPack);
if (pixelPackBuffer != nullptr && pixelPackBuffer->isMapped()) if (pixelPackBuffer != nullptr && pixelPackBuffer->isMapped())
{ {
// ...the buffer object's data store is currently mapped. // ...the buffer object's data store is currently mapped.
...@@ -5714,7 +5711,7 @@ bool ValidateReadPixelsBase(Context *context, ...@@ -5714,7 +5711,7 @@ bool ValidateReadPixelsBase(Context *context,
// .. the data would be packed to the buffer object such that the memory writes required // .. the data would be packed to the buffer object such that the memory writes required
// would exceed the data store size. // would exceed the data store size.
const InternalFormat &formatInfo = GetInternalFormatInfo(format, type); const InternalFormat &formatInfo = GetInternalFormatInfo(format, type);
const gl::Extents size(width, height, 1); const Extents size(width, height, 1);
const auto &pack = context->getGLState().getPackState(); const auto &pack = context->getGLState().getPackState();
GLuint endByte = 0; GLuint endByte = 0;
......
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