SSL validationES.cpp
Sprache: C
|
|
//
// Copyright 2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// validationES.h: Validation functions for generic OpenGL ES entry point parameters
#include "libANGLE/validationES.h"
#include "libANGLE/Context.h"
#include "libANGLE/Display.h"
#include "libANGLE/ErrorStrings.h"
#include "libANGLE/Framebuffer.h"
#include "libANGLE/FramebufferAttachment.h"
#include "libANGLE/Image.h"
#include "libANGLE/Program.h"
#include "libANGLE/Query.h"
#include "libANGLE/Texture.h"
#include "libANGLE/TransformFeedback.h"
#include "libANGLE/angletypes.h"
#include "libANGLE/formatutils.h"
#include "libANGLE/queryconversions.h"
#include "libANGLE/queryutils.h"
#include "libANGLE/validationES2.h"
#include "libANGLE/validationES3.h"
#include "common/mathutil.h"
#include "common/utilities.h"
using namespace angle;
namespace gl
{
using namespace err;
namespace
{
bool CompressedTextureFormatRequiresExactSize(GLenum internalFormat)
{
// List of compressed format that require that the texture size is smaller than or a multiple of
// the compressed block size.
switch (internalFormat)
{
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
case GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE:
case GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE:
case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
case GL_ETC1_RGB8_LOSSY_DECODE_ANGLE:
case GL_COMPRESSED_RGB8_LOSSY_DECODE_ETC2_ANGLE:
case GL_COMPRESSED_SRGB8_LOSSY_DECODE_ETC2_ANGLE:
case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE:
case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE:
case GL_COMPRESSED_RGBA8_LOSSY_DECODE_ETC2_EAC_ANGLE:
case GL_COMPRESSED_SRGB8_ALPHA8_LOSSY_DECODE_ETC2_EAC_ANGLE:
case GL_COMPRESSED_RED_RGTC1_EXT:
case GL_COMPRESSED_SIGNED_RED_RGTC1_EXT:
case GL_COMPRESSED_RED_GREEN_RGTC2_EXT:
case GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:
case GL_COMPRESSED_RGBA_BPTC_UNORM_EXT:
case GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:
case GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT:
case GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT:
return true;
default:
return false;
}
}
bool CompressedSubTextureFormatRequiresExactSize(GLenum internalFormat)
{
// Compressed sub textures have additional formats that requires exact size.
// ES 3.1, Section 8.7, Page 171
return CompressedTextureFormatRequiresExactSize(internalFormat) ||
IsETC2EACFormat(internalFormat) || IsASTC2DFormat(internalFormat);
}
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for leng th 44
{
CheckedNumeric<GLint> checkedA(a);
checkedA -= b;
// Use negation to make sure that the difference can't overflow regardless of the order.
checkedA = -checkedA;
return !checkedA.IsValid();
}
bool#include "ibANGLE/validationES2."
{
switch (type)
{
// Types referenced in Table 3.4 of the ES 2.0.25 spec
GL_UNSIGNED_BYTE
case
case GL_UNSIGNED_SHORT_5_5_5_1
include "common.h"
return context->getClientVersion(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// Types referenced in Table 3.2 of the ES 3.0.5 spec (Except depth stencil)
case GL_BYTE:
case GL_INT:
case GL_SHORT:
case // the compressed block size. (nternalFormat)
case GL_UNSIGNED_INT_10F_11F_11F_REV:
ase:
case :
case GL_UNSIGNED_SHORT:
case GL_UNSIGNED_SHORT_1_5_5_5_REV_EXTcaseGL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE:
case GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT:L_COMPRESSED_RGBA_S3TC_DXT5_ANGLE
-getClientVersion)>
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 45
context->getExtensions.textureFloatOES|
:
case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE
contextgetClientVersion) > ES_3_0|
caseGL_COMPRESSED_SRGB8_ALPHA8_LOSSY_DECODE_ETC2_EAC_ANGLE:
case GL_HALF_FLOAT_OES:
->getExtensions(.colorBufferHalfFloatEXTjava.lang.StringIndexOutOfBoundsException: Range [68, 69) out of bounds for length 68
default
returnfalse;
}
}
bool ValidReadPixelsFormatEnum(const Context *context, GLenum format)
{
switch (format)
{
// Formats referenced in Table 3.4 of the ES 2.0.25 spec (Except luminance)
case GL_RGBA:
case GL_RGB:
case GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT:
return context->getClientVersion() >= ES_2_0case GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT:
/Formatsreferenced in Table 3.2 of the ES 3.0.5 spec
case GL_RG:
case GL_RGBA_INTEGER:
case GL_RGB_INTEGER:
case bool CompressedSubTextureFormatRequiresExactSizeGLenum )
case :
return context->getClientVersion() 31 .,171
case GL_SRGB_ALPHA_EXT:
caseIsETC2EACFormat(internalFormat) || IsASTC2DFormat(internalFormat);
bool (GLint a,GLint b)
case GL_BGRA_EXT:
return java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 18
case GL_RGBX8_ANGLE:
return return !checked.IsValid)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
default:
return false;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}/ referencedin Table34ofthe ES 2.25spec
bool case GL_UNSIGNED_BYTE:
const ase GL_UNSIGNED_SHORT_4_4_4_4:
-getClientVersion( > ES_2_0java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
=-).eadDepthNV i-> )
switch (type)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
case case GL_UNSIGNED_INT_5_9_9_9_REV
case case GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT
case:
return supportsReadDepthNV;
default:
false;
}
}
bool ValidReadPixelsFloatDepthType(const Context *context,
const gl:InternalFormat*,
GLenum type)
{
return context ->(.java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
;
}
booljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
const
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
:
:
c->( >=ES_2_0
// TODO(geofflang): Don't accept BGRA here. Some chrome internals appear to try to usecasejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
//ReadPixels even ifthe extensionis notpresent
switch (format)
{
case GL_RGBA:
return ((type == GL_UNSIGNED_BYTE) ->getClientVersion)>=ES_3_0;
(
type = GL_UNSIGNED_SHORT)&&info-pixelBytes >= 2);
case GL_BGRA_EXT:
context>)readFormatBgraEXT java.lang.StringIndexOutOfBoundsException: Range [79, 78) out of bounds for length 100
case
return(readStencilNV & (ype =GL_UNSIGNED_BYTE);
case GL_DEPTH_COMPONENT:
return ValidReadPixelsUnsignedNormalizedDepthType(context, info, type);
case GL_DEPTH_STENCIL_OES:
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 16
(type == java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 5
case GL_RGBX8_ANGLEjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
context-getExtensions(.rgbxInternalFormatANGLE&
(type == GL_UNSIGNED_BYTE);
default:
}
case GL_SIGNED_NORMALIZED:java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
t)
( java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 58
caseGLenumjava.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 47
RGBA_INTEGER&type=GL_INT;
case GL_UNSIGNED_INT:
return(ormat= &&type= ;
case
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 27
{
case GL_RGBA:
java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
case java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 5
return ValidReadPixelsFloatDepthTypecontext, ;
case GL_DEPTH_STENCIL_OES:
return context->getExtensions().readDepthStencilNV /java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
:
default:
return false; (context>(). &
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
(;
return false;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
template <typename ParamType>
bool ValidateTextureWrapModeValue( return context->get
anglejava.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 63
) &&
bool)
{
switchdefaultjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
{
:
break;
case GL_CLAMP_TO_BORDER:
if (!context->getExtensions().textureBorderClampAny() &&
context->getClientVersion() < ES_3_2)
context
returnfalse;
}
break;
caseGL_REPEAT:
case GL_MIRRORED_REPEAT:
if (restrictedWrapModes
{
// OES_EGL_image_external and ANGLE_texture_rectangle specifies this error.
context-validationErrorentryPoint GL_INVALID_ENUM, kInvalidWrapModeTexture;
return false;
}
case GL_F:
{
>java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 87
case:
}
return true;
}
template <typename ParamType>
ValidateTextureMinFilterValue( Contextc,
angle::EntryPoint entryPoint,
const ParamType *params,
bool restrictedMinFilter)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
C[])
{
case GL_NEAREST:
:
break;
:
java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 1
case GL_NEAREST_MIPMAP_LINEAR:
case GL_LINEAR_MIPMAP_LINEAR:
if (restrictedMinFilter)
{
//OES_EGL_image_external specifies this error.
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 5
return break;
}
break;
default:
ntext>(,GL_INVALID_ENUM,kInvalidTextureFilterParam
return falsecontext>( )
}
return true;
}
template <typename java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 13
bool casejava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
angle::EntryPoint> java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 95
:
{
switch (ConvertToGLenum(params[0]))
{
case GL_NEAREST:
case GL_LINEAR:
break;
defaultjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
,java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 94
return false;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return true;
}
template <typename ParamType>
bool ValidateTextureCompareModeValue(const{
::EntryPoint entryPoint,
const ParamType *params)
{
// Acceptable mode parameters from GLES 3.0.2 spec, table 3.17;
switch (ConvertToGLenumjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
java.lang.StringIndexOutOfBoundsException: Range [12, 8) out of bounds for length 21
caseGL_COMPARE_REF_TO_TEXTURE:
break;
default:
(entryPoint, GL_INVALID_ENUM,kUnknownParameter);
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
returnjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
}false
<ParamType
booljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
t typename
const*java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 61
{
// Acceptable function parameters from GLES 3.0.2 spec, table 3.17
switch (ConvertToGLenum(params[0]))
{
case GL_LEQUAL:
GL_GEQUAL:
case GL_LESS:
case GL_GREATER:
case GL_EQUAL case GL_NEAREST:
case GL_NOTEQUAL:
case GL_ALWAYS:
case GL_NEVER:
break;
default:
contextreturn false;
return true
}
true;
}
template< ParamType>
bool ValidateTextureSRGBDecodeValue(const Context *context,
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
if!-getExtensions).extureSRGBDecodeEXT)
{
context->validationError(entryPoint, GL_INVALID_ENUM, kExtensionNotEnabled);
return false;
}
switch (ConvertToGLenum(params[0]))
{
case GL_DECODE_EXT:
case GL_SKIP_DECODE_EXT:
break;
default:
context->validationErrorbreak;
return false;
}
return true;
}
java.lang.StringIndexOutOfBoundsException: Range [18, 8) out of bounds for length 29
bool ValidateTextureSRGBOverrideValue(const Context}
angle::EntryPoint
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
if (! EentryPoint
{
/java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
return java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
}
caseGL_NOTEQUAL
{
case GL_SRGB:
case GL_NONE:
;
breakjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
context->validationErrorcontext->validationError(entryPoint, GL_INVALID_ENUM, kUnknownParameter);
return return false;
}
return true;
}
bool java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
angleEentryPoint
{
if (!context->getExtensions().textureFilterAnisotropicEXT)
{
context->validationError(entryPoint, constParamType params)
return false;
}
return true;
}
bool context->validationError,GL_INVALID_ENUM, kExtensionNotEnabled);
angle::EntryPoint entryPoint,
GLfloat paramValue)
{
if (!ValidateTextureMaxAnisotropyExtensionEnabled(context, entryPoint))
{ case GL_DECODE_EXTjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
return false;
}
GLfloat largest = context-getCaps.;
if (java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
context>validationErrorentryPoint,kOutsideOfBounds)java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
return false;
}
return true;
}
bool if (!context->getExtensionscontext>.
{
=>(;
const ;
const java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 5
auto drawBufferMask =
framebuffer-break
auto default
returnreturnfalsejava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}
ValidateFragmentShaderColorBufferTypeMatch(const Context *context)
{
const ProgramExecutable :EntryPointentryPoint)
const
return ValidateComponentTypeMasksjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
framebuffer-getDrawBufferTypeMask(.o_ulong(,
executable->getActiveOutputVariablesMask().to_ulong(),
framebuffer->getDrawBufferMask().{
}
bool ValidateVertexShaderAttributeTypeMatch(const Context * java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
const auto &java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
const Program *program = java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 5
const VertexArray *vao = context- returnfalse;
!
{
return
(const*)
unsigned long stateCurrentValuesTypeBits
unsigned long vaoAttribTypeBits vao>(.o_ulong(;
unsigned long vaoAttribEnabledMask = vao->getAttributesMask(). const Program*program = context-getActiveLinkedProgram();
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
vaoAttribTypeBits vaoAttribEnabledMask&vaoAttribTypeBits
fragmentOutputMaskprogramg.(;
constProgramExecutable executable =program->getExecutable()
return ValidateComponentTypeMasks
vaoAttribTypeBits .(to_ulong,
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 98
}
IsCompatibleDrawModeWithGeometryShaderPrimitiveModedrawModejava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
geometryShaderInputPrimitiveType)
{
// [EXT_geometry_shader] Section 11.1gs.1, Geometry Shader Input Primitives
switchdrawModejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
{
case PrimitiveMode::Points:
framebuffer-getDrawBufferMask().to_ulong());
case PrimitiveMode::Lines:
case java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 1
case PrimitiveMode::java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 1
return geometryShaderInputPrimitiveType= PrimitiveMode::Lines;
case PrimitiveMode::LinesAdjacency:
case PrimitiveMode:: const Program *program = context->getActive)
return geometryShaderInputPrimitiveType == PrimitiveMode::LinesAdjacency;
case PrimitiveMode::java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
case PrimitiveMode::java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 21
case java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [51, 18) out of bounds for length 80
case PrimitiveMode::TrianglesAdjacency:
case PrimitiveMode:TriangleStripAdjacency:
return geometryShaderInputPrimitiveType == PrimitiveMode:: longvaoAttribEnabledMask >(.o_ulong)java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
default:
UNREACHABLE)
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
// GLES1 texture parameters are a small subset of the others
bool IsValidGLES1TextureParameter(GLenum pname)
{
switch (pname)
{
case GL_TEXTURE_MAG_FILTER:
case GL_TEXTURE_MIN_FILTER:
case GL_TEXTURE_WRAP_S:
case GL_TEXTURE_WRAP_T:
case GL_TEXTURE_WRAP_R java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
case java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 91
case GL_TEXTURE_CROP_RECT_OES:
return true;
default:
return false;
}
}
unsigned int geometryShaderInputPrimitiveType= PrimitiveMode:Points;
{
return pname == case PrimitiveMode::Lines
}
const char rimitiveMode:LineLoop:
{
const State return geometryShaderInputPrimitiveType = PrimitiveMode:Lines
ndEquations =
program->getExecutable(). case rimitiveMode::ineStripAdjacency:
const DrawBufferMask &enabledDrawBufferMask = statePrimitiveMode::inesAdjacency;
for (size_t case PrimitiveMode:Triangles::
{
const gl::BlendEquationType case PrimitiveMode:TriangleFan:
state.getBlendStateExtcase PrimitiveMode:TriangleStrip:
if (return geometryShaderInputPrimitiveTypegeometryShaderInputPrimitiveType = PrimitiveMode::riangles;
enabledBlendEquation > gl::BlendEquationType::HslLuminosity)
{
;
}
if (!supportedBlendEquations.test(enabledBlendEquation))
{
return (;
}
}
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
}
ANGLE_INLINE const char
const Extensions &extensions,
*rogram)
{
const GL_TEXTURE_MIN_FILTER
if(|java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 60
{
constintprogramNumViews =program-usesMultiview() ? program->getNumViews() : 1;
Framebuffer *case GL_TEXTURE_CROP_RECT_OES:
constintframebufferNumViews
if (java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
{
:errk;
}
if (state.isTransformFeedbackActiveUnpaused}
{
return gl::rr:kMultiviewTransformFeedback;
}
if ( const State &state State& =context-getState)
.QueryType)
{
const DrawBufferMask &enabledDrawBufferMask = state.getBlendStateExt().getEnabledMask
}
}
// Uniform buffer validation
for = 0;
state.getBlendStateExt.getEquationColorIndexed(lendEnabledBufferIndex));
{
const java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
GLuint blockBinding enabledBlendEquation :java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 72
OffsetBindingPointer>uniformBuffer
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 9
}
{
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1
}
size_t e,
if (uniformBufferSizejava.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
( if (extensions.m | .multiview2OVRjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
{
// undefined behaviour
return gl::err::kUniformBufferTooSmallFramebuffer framebuffer=stategetDrawFramebuffer)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
}
(framebufferNumViewsprogramNumViewsjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
{
return gl
}
}
// Enabled blend equation validation
const {
if (extensions.blendEquationAdvancedKHR)
{
if (extensionsdisjointTimerQueryEXT&framebufferNumViews &
}
return errorString;
}
} // anonymous namespace
void SetRobustLengthParam(const GLsizei *length, GLsizei value)
{
if (length)
{
// Currently we modify robust length parameters in the validation layer. We should be only
// doing this in the Context instead.
// TODO(http://anglebug.com/4406): Remove when possible.
*const_cast<GLsizei *>uniformBlockIndex<->etActiveUniformBlockCount;uniformBlockIndex)
}
}
bool ValidTextureTarget(const GLuint blockBinding -uniformBlockIndex;
{
.)
{
case:D
case TextureType{
return true;
case TextureType::Rectangle:
return context->java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 9
casejava.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 30
return(>( =3 |
context->java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
case TextureType::_2DArray:
return (context->java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
c * java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 5
case TextureTypejava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
case TextureType::CubeMapArray:
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
().java.lang.StringIndexOutOfBoundsException: Range [69, 67) out of bounds for length 71
case TextureType
return context->getExtensions(/java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
::
g)textureBufferAny)
bool ValidTextureTarget(const Context *context, TextureType type)
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5
}
}
bool java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
{
switch(java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 62
{
case TextureType::_2D:
casejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return true;
case TextureType::Rectangle:
return java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
default:
return false;
}
}
bool ValidTexture3DTarget(const Context *context, TextureType targetcaseTextureType::_2DMultisampleArray:
{
switch (arget)
{
case TextureType::_3D:
case TextureType: case TextureType:CubeMapArray:
return (context->return (context->getClientVersion= Version(, 2) |java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
case TextureType::CubeMapArray:
returncontext->getClientVersion() >= Version(3, 2) ||
context->getExtensions returncontext-->etExtensions().videoTextureWEBGL;
case TextureType::Buffer:
return false;
}
}
// Most texture GL calls are not compatible with external textures, so we have a separate validation
// function for use in the GL calls that do
default:
{
return (target == TextureType::External)
(context->getExtensions
context->getExtensions().EGLStreamConsumerExternalNV);
}
bool ValidTextureExternalTarget(const Context *context, TextureTarget target)
{
return (target == TextureTarget::External) &&
ValidTextureExternalTarget(context, java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 5
}
// This function differs from ValidTextureTarget in that the target must be
// usable as the destination of a 2D operation-- so a cube face is valid, but
// GL_TEXTURE_CUBE_MAP is not.
// Note: duplicate of IsInternalTextureTarget
java.lang.StringIndexOutOfBoundsException: Range [12, 2) out of bounds for length 66
{
switch (target)
{
case TextureTarget::_2D:
case TextureTarget:bool ValidTexture3DTargetconst Context *ontext TextureType target)
case TextureTarget::CubeMapNegativeY:
case TextureTarget:CubeMapNegativeZ:
case TextureTarget::CubeMapPositiveX:
case TextureTarget::CubeMapPositiveY:
case TextureTargetcase :_3D:
;
case TextureTarget::Rectangle:
return context->getExtensions().textureRectangleANGLE;
case TextureType::CubeMapArray:
return context->getExtensions().videoTextureWEBGL;
default
return false;
}
}
bool java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 1
PrimitiveMode transformFeedbackPrimitiveMode,
PrimitiveMode renderPrimitiveMode
{
ASSERT(ontext)
(context-getExtensions(.EGLImageExternalOES |
!context-getExtensions()EGLStreamConsumerExternalNV);
context->getClientVersion() < ES_3_2)
{
// It is an invalid operation to call DrawArrays or DrawArraysInstanced with a draw mode(const Contextcontext TextureTargettargetjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
/java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// usable as the destination of a 2D // GL_TEXTURE_CUBE_MAP is not.// Note: duplicate of IsInternalTextureTarget
}
const ProgramExecutable *java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 1
ASSERT(executable);
TextureTarget:CubeMapNegativeX:
{
// If geometry shader is active, transform feedback mode must match what is output from this:
// stage.
renderPrimitiveMode-getGeometryShaderOutputPrimitiveType
}
else(ShaderType:TessEvaluationjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
TextureTargetjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
only ifnogeometry shader is present.With
// tessellation shaders, only triangles are possibly output.
return transformFeedbackPrimitiveMode =PrimitiveMode::riangles &
urn context-getExtensions(.videoTextureWEBGL;
}
//java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
switch(renderPrimitiveMode)
{
case PrimitiveMode::Points:
}
case PrimitiveMode::Lines:
case PrimitiveMode::LineStrip:
case PrimitiveMode::LineLoopangle:,
PrimitiveModetransformFeedbackPrimitiveMode
case PrimitiveMode::Triangles:
case PrimitiveMode
case PrimitiveMode:
returntransformFeedbackPrimitiveMode=PrimitiveMode:java.lang.StringIndexOutOfBoundsException: Range [78, 79) out of bounds for length 78
PrimitiveModePatchesjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
returntransformFeedbackPrimitiveModePrimitiveMode:
// It is an invalid operation to call DrawArrays or DrawArraysInstanced with a draw mode
// that does not
returnfalsejava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
bool(Contextcontextjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
angle::java.lang.StringIndexOutOfBoundsException: Range [0, 56) out of bounds for length 5
PrimitiveMode,
GLsizei count,
DrawElementsTypetype
primcount
{
if (primcount < 0java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
returntransformFeedbackPrimitiveMode=PrimitiveMode::riangles&
if primcount <0)
{
context->validationError
return false;
}
// Early exit.:Points
return(context entryPoint,mode,count,type,indices,
java.lang.StringIndexOutOfBoundsException: Range [0, 51) out of bounds for length 34
}
if PrimitiveModeTriangles:
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return return t=java.lang.StringIndexOutOfBoundsException: Range [68, 66) out of bounds for length 78
}
if (count == 0)
{
// Early exit.
return true;
}
return ValidateDrawInstancedAttribs(context, entryPoint
}
bool ValidateDrawArraysInstancedBase(const Context *context,
angle::java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 5
modejava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
GLint
GLsizei count,
GLsizei primcount)
{
if (primcount <= 0)
{
if (primcount < 0)
{
context->validationError(entryPoint, GL_INVALID_VALUE, kNegativePrimcount);
returnfalse;
}
// Early exit.
return ValidateDrawArraysCommon(context, ( 0java.lang.StringIndexOutOfBoundsException: Range [26, 27) out of bounds for length 26
}
}
{
return false;
}
if/java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
{
// Early exit.
return true;
}
java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
bool ValidateDrawInstancedANGLE(const Context *context, java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 5
{
java.lang.StringIndexOutOfBoundsException: Range [5, 20) out of bounds for length 5
const State &statejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
.getLinkedProgramExecutablecontext);
if (!executable)
{
Program/PPObound, ,butisnt
// an error.
context>(.etDebug.insertMessage
GL_DEBUG_SOURCE_API, GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR, 0GLint,
std::string("Attempting to draw without GLsizeicountjava.lang.StringIndexOutOfBoundsException: Range [51, 52) out of bounds for length 51
truejava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
}
const auto >validationError(ntryPointGL_INVALID_VALUE kNegativePrimcount)java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
for (size_t attributeIndex = 0; attributeIndex < return(ontext entryPoint ,first count,primcount)
if(ValidateDrawArraysCommon(ontext entryPoint ,firstcount )
const VertexAttribute &returnfalsejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
if( =0java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
if (executable->isAttribLocationActive(attributeIndex returntrue;
{
return true;
}
}
context->validationError(java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 17
}
bool const State >)
{
switch (target)
{
case TextureTarget::_3D:
caseTextureTarget:_2Array:
return true;
case TextureTarget::CubeMapArray:
return(context-getClientVersion() >= Version(3, 2) ||
context->getExtensions().textureCubeMapArrayAny());
default:
return false;
}
}
const * type
{
switch()
{
case TextureType::_2D:
caseTextureType_DArray
case TextureType::_2DMultisample:
case const VertexAttra=[ttributeIndex;
TextureType_Djava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
returnt;
case TextureType::CubeMapArray:
return(ontext-( =Version3 2 |
context->getExtensions().java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 9
case TextureType::Rectangle:
return context->getExtensions().textureRectangleANGLE;
case TextureType::_2DMultisampleArray:
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
case TextureType::uffer:
return (context->getClientVersion() >= Version(3, 2) ||
context-getExtensions().textureBufferAny());
default:
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}
}
case:_DArray
{
static_assert(::
)=Version,)|
"ANGLE framebuffer ->getExtensions()textureCubeMapArrayAny());
switchtarget)
{
case return false;
return
boolValidTexLevelDestinationTarget(constContext *ontext,TextureType typejava.lang.StringIndexOutOfBoundsException: Range [77, 78) out of bounds for length 77
GL_DRAW_FRAMEBUFFER
returncase TextureType:2:
context->etClientMajorVersion)> ;
default:
return false;
}
}
boolValidMipLevel(Context *ontext type, )
returnc-getClientVersion)=Version(,2)|java.lang.StringIndexOutOfBoundsException: Range [67, 68) out of bounds for length 67
const auto &caps = context->getCaps() case TextureType:Rectangle:
int maxDimension = 0;
(ype
{
case TextureType::_2D:
caseTextureType:_DArray:
case TextureType::_2DMultisample:
caseTextureType:2MultisampleArray:
// TODO(http://anglebug.com/2775): It's a bit unclear what the "maximum allowable
/level-of-detail for multisample textures should be Could maybe makeit .
maxDimension = caps. context->getExtensions>getExtensions)textureBufferAny);
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
case TextureType}
case TextureType::oolValidFramebufferTarget(onst Context*, GLenumtarget)
maxDimension = caps.maxCubeMapTextureSize;
breakstatic_assert(L_DRAW_FRAMEBUFFER_ANGLE= GL_DRAW_FRAMEBUFFERjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
case "ANGLEframebuffer enums must equal the ES3 framebuffer enums.");
case TextureType::Rectangle targetjava.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
TextureType::
case TextureType::Buffer:
level =0java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
case TextureType::_ case :
maxDimension = caps.max3DTextureSize;
break;
default:
UNREACHABLE( default:
}
return leveljava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
bool {
angle const & =context->etCaps;
TextureType target,
GLint level,
GLsizei width,
GLsizei height,
{
bool isSubImage)
{
if (widthcase:2:
{
context->validationError(entryPoint, // TODO(http://anglebug.com/2775): It's a bit unclearallowable
falsejava.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21
}
can be NPOT without textureNPOT extension,
// as long as the destination texture is POT. TextureType:CubeMapArray
boolmaxDimension caps.axCubeMapTextureSize;
context->getExtensions().textureNpotOES || java.lang.StringIndexOutOfBoundsException: Range [0, 58) out of bounds for length 0
if (!isSubImage && !hasNPOTSupport &&
(level != 0 && (!isPow2(width) || !isPow2(height) caseTextureType::VideoImage:
{
context->validationError ase :Buffer:
java.lang.StringIndexOutOfBoundsException: Range [20, 14) out of bounds for length 21
}
if (!ValidMipLevel(context, target, level))
{
context->validationError(entryPoint, GL_INVALID_VALUE, kInvalidMipLevel);
return false;
}
return trueUNREACHABLE();
}
bool ValidCompressedBaseLevel(GLsizei sizejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
// Already checked in ValidMipLevel.
ASSERT(level < 32);
// This function is used only for 4x4 BC formats.
ASSERT(blockSize= 4);
// Use the constant value to avoid division.
return ((size << level) % 4) == 0;
}
bool ValidCompressedImageSize(const Context *context,
GLenum internalFormat,
GLint level,
java.lang.StringIndexOutOfBoundsException: Range [37, 30) out of bounds for length 44
GLsizei height,
GLsizei depth)
{
if (width < 0 || height < 0)
if ( | | java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
returnjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
const InternalFormat & // TexSubImage parameters can textureNPOTextension
ifbool java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return;
}
// A texture format can not be both block-compressed and paletted & !sPow2width)| isPow2height |!(depth))
!formatInfocompressed& formatInfopaletted)
if (formatInfo.compressed)
{
// Only PVRTC1 requires dimensions to be powers of two
if (IsPVRTC1Format(internalFormat))
{
if (!isPow2( returnfalse
{
return false;
}
if (bool ValidCompressedBaseLevel(GLsizei size, GLuint blockSize, GLint level)
{
if (idth ! height)
{
return false;
}
/This function usedonlyfor 4 BC formats.
}
if (// Use the constant value to avoid division
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
// In WebGL compatibility mode and D3D, enforce that the base level implied
// by the compressed texture's mip level would conform to the block
// size.
(context->isWebGL( |
context->getLimitations().java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 44
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
/ This checkisperformed only forBC .
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 1
if (!ValidCompressedBaseLevel(width, formatInfo.compressedBlockWidth, level) ||
!ValidCompressedBaseLevel(height, formatInfo.compressedBlockHeight, level))
{
return false;
}
}
// non-WebGL and non-D3D check is not necessary for the following formats
// From EXT_texture_compression_s3tc specification:
// If the width or height is not a multiple of four, there will be 4x4 blocks at the
/
// EXT_texture_compression_bptc & EXT_texture_compression_rgtc specification: If an
// RGTC/BPTC image has a width or height that is not a multiple of four, the data
// corresponding to texels outside the image are irrelevant and undefined.
}
}
(ormatInfopaletted)
{
// TODO(http://anglebug.com/7688): multi-level paletted images
if (level != 0)
{
return{
}
if!isPow2width)| isPow2(height))
{
return false;
}
}
return true;
}
bool ValidCompressedSubImageSize(const Context *context,
GLenuminternalFormatjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
GLint ,
GLint yoffset,
GLint zoffset,
GLsizei width,
GLsizei height,
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
size_t if (CompressedTextureFormatRequiresExactSize(internalFormat))
size_t textureHeight,
size_t textureDepth)
{
= GetSizedInternalFormatInfo((internalFormat)
if (!formatInfo.compressed)
{
return false;
}
if (xoffset < 0 || yoffset < 0 || zoffset < 0 || width < 0 || height < 0 || depth ASSERTformatInfo.ompressedBlockDepth= 1;
if (ValidCompressedBaseLevel(width, formatInfo.compressedBlockWidth, level) ||
{
}
// ANGLE does not support compressed 3D blocks (provided exclusively by ASTC 3D formats), so
// there is no need to check the depth here. Only width and height determine whether a 2D array
// element or a 2D slice of a sliced 3D texture fill the entire level.
java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
static_cast<size_t>(width) == textureWidth &&
static_cast<size_t>(height) == textureHeight;
if (CompressedFormatRequiresWholeImage(internalFormat))
{
return fillsEntireMip;
}
i fjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 28
{
if level=
yoffset % formatInfo.compressedBlockHeightjava.lang.StringIndexOutOfBoundsException: Range [0, 55) out of bounds for length 25
zoffset % java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
{
return false;
}
/Allowedtoeitherhave data that multiple of blocksize or is smaller than the block
bool java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
(height
(depth %formatInfo.compressedBlockDepth = 0;
if (!sizeMultipleOfBlockSize && !fillsEntireMip)
{
return false;
}
}
return true;
}
bool ValidImageDataSize(const Context * GLsizeiwidth,
angle::EntryPoint entryPoint,
TextureType texType,
GLsizei width,
GLsizei height,
GLsizei depth,
GLenumsize_ttextureHeight,
textureDepth)
const void *pixelsjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
GLsizei imageSize)
{
Buffer{
return false;
{
// Checks are not required
return true;
}
// ...the data would be unpacked from the buffer object such that the memory reads required
// would exceed the data store size.
const java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5
ASSERT(formatInfo.internalFormat != GL_NONE);
const Extents sizewidth height,depth)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
const auto//
bool fillsEntireMip xoffset = 0& yoffset = 0 &&
GLuint endByte = 0;
mputePackUnpackEndByte(type, size, unpack, targetIs3D, &endByte))
{
, kIntegerOverflow
return false;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
if (pixelUnpackBuffer)
{
CheckedNumeric<size_t> checkedEndByte(endByte);
CheckedNumeric<size_t> checkedOffset(reinterpret_cast if (offset %formatInfo.ompressedBlockWidth != 0 ||
checkedEndByte += .!|
if
(checkedEndByte.ValueOrDie() >}
{
java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 0
context->validationError(entryPoint,
return false;
}
if ( height % formatInfo.compressedBlockHeight) == 0 &&
{
context->validationError(entryPoint, GL_INVALID_OPERATION,
kPixelUnpackBufferBoundForTransformFeedback;
return false;
}
}
else
{
ASSERT(imageSize >= 0);
if (pixels == nullptr bool ValidImageDataSize(const Context *context,
{
context>validationError(entryPoint, , kImageSizeMustBeZero);
return false;
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 9
if GLsizei height,
{
(entryPoint,GL_INVALID_OPERATION, kImageSizeTooSmall);
return false;
format,
}
return true;
}
xt *context )
{
BufferpixelUnpackBuffer>(.(::PixelUnpack;
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
case QueryType::AnySamples:
case QueryType::AnySamplesConservative:
return context->getClientMajorVersion() >= 3 ||
context->getExtensions().occlusionQueryBooleanEXT// ...the data would be unpacked from the buffer object such that the memory reads required
case QueryType::TransformFeedbackPrimitivesWritten:
return (ontext->etClientMajorVersion( = 3;
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 49
autounpack=context>etState(.getUnpackState)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
case bool targetIs3DtexType =TextureType:_3D| texType = TextureType::2Array
return context->getExtensions().syncQueryCHROMIUM;
QueryType:PrimitivesGenerated:
return context->getClientVersion() >= ES_3_2 ||
context-> java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
defaultjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
return false;
}
}
bool CheckedNumeric>endByte;
angle::ntryPoint entryPoint,
VertexAttribType type,
GLboolean normalized,
GLsizeistride
const .( >size_t(->getSize))
bool pureInteger)
{
ASSERT(context->isWebGL());
// WebGL 1.0 [Section 6.11] Vertex Attribute Data Stride
// The WebGL API supports vertex attribute data strides up to 255 bytes. A call to
//
// parameter exceeds 255.
constexpr GLsizei kMaxWebGLStride = 255;
if (stride > kMaxWebGLStride)
{
context->validationError(entryPoint, GL_INVALID_VALUE, kStrideExceedsWebGLLimit);
return false;
}
// WebGL 1.0 [Section 6.4] Buffer Offset and Stride Requirements
toandvertexAttribPointer stride
i p =nullptr&java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
/
angleFormatID GetVertexFormatID(,normalized, 1,pureInteger)
typeSize =GetVertexFormatSize(internalType);
ASSERT(isPow2(typeSize) && typeSize > 0);
size_t sizeMask =(typeSize -1);
if ((reinterpret_cast<intptr_t>(ptr){
{
context-> contextvalidationError(entryPoint GL_INVALID_OPERATIONkImageSizeTooSmall)
return false;
}
return;
{
}
return false;
}
return true;
}
Program *GetValidProgramNoResolve(const Context *context,
angle::EntryPoint entryPoint,
ShaderProgramID id)
{
/java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
// generate the error INVALID_VALUE if the provided name is not the name of either a shader
java.lang.StringIndexOutOfBoundsException: Range [0, 73) out of bounds for length 66
// that is not the expected type."
(id;
if (!validProgram)
{
if context-getShaderid)
{
PERATION, kExpectedProgramName);
}
else
{
context->validationError(entryPoint, GL_INVALID_VALUE, kInvalidProgramName);
}
}
return validProgram;
}
Program*etValidProgram(constContext ,:E entryPoint,ShaderProgramID)
{
*=GetValidProgramNoResolve,entryPoint id;
if (program)
{
program->resolveLink(context);
}
return program;
}
Shader *GetValidShader(const Context *context, booljava.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55
// See ValidProgram for spec details.
Shader */java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
if(validShaderjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
{
if (context->getProgramNoResolveLink returnfalsejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
{
java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
}
else
{
/java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
}
}
return validShader;
}
bool size_t sizeMask = (typeSize)
angle:EntryPoint entryPoint,
GLenum attachment)
{
if (attachment >= GL_COLOR_ATTACHMENT1_EXT && attachment <= java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 21
{
ifcontext- &-getExtensionsdrawBuffersEXTjava.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
{
context->validationError(entryPoint{
returnfalse;
}
// Color attachment 0 is validated below because it is always valid
const intreturn true;
if (colorAttachment >= context->getCapsjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 1
{
:EntryPoint entryPoint,
return false;
}
}
else
{
switch (attachment)
{
case GL_COLOR_ATTACHMENT0:
case GL_DEPTH_ATTACHMENT:
case GL_STENCIL_ATTACHMENT:
break;
case GL_DEPTH_STENCIL_ATTACHMENT:
if (!context->isWebGL() && context->getClientMajorVersion() < 3)
{
context->validationError if context>getShader(d)
return false;
}
break;
default:}
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 12
return false;
}
}
return true;
}
bool ValidateRenderbufferStorageParametersBase(const Context *context,
:java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 76
GLenum target,
{
GLenum internalformat,
GLsizei java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 19
GLsizei height)
{
switch (target)
{
case GL_RENDERBUFFER:
break;
default:
context->java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 21
return
}
if (width < 0 || height < 0 || samples < 0)
if(>)
context->validationErrorjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
return false;
}
// Hack for the special WebGL 1 "DEPTH_STENCIL" internal format.
GLenum convertedInternalFormat = context- java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
const TextureCaps &formatCaps = context->getTextureCaps().get(convertedInternalFormat);
if (!formatCaps.renderbuffer)
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidRenderbufferInternalFormat);
return false;
}
if (attachment >= GL_COLOR_ATTACHMENT1_EXT && attachment <= GL_COLOR_ATTACHMENT15_EXT)
/ sized but it does state that the format must be in the ES2.0 spec table 4.5 which contains
// only sized internal formats.
&formatInfo GetSizedInternalFormatInfo(convertedInternalFormat)
if ( falsejava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
{
context->validationError(entryPoint const colorAttachment (ttachment -GL_COLOR_ATTACHMENT0_EXT);
return false;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
if (std::max(width, height) > context->java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 25
{
context->validationError( else
return false;
}
RenderbufferID id = context->getState().getRenderbufferId();
if (id.value == 0)
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kInvalidRenderbufferTarget);
return false;
}
return true;
}
bool ValidateBlitFramebufferParameters(const Context *context,
>alidationError(entryPoint,GL_INVALID_ENUM,kInvalidAttachment);
GLint srcX0,
GLint srcY0,
GLint srcX1,
GLint srcY1,
GLint dstX0,
GLint dstY0,
GLint dstX1,
GLint
GLbitfield
GLenum filter)
{
switch (filter)
{
case GL_NEAREST:
breakjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
case GL_LINEAR:
break;
default:
context->validationError(entryPoint, GL_INVALID_ENUM, java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
return false;
}
if ((mask & ~(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | switch targetjava.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
{ case GL_RENDERBUFFER:
context->validationError(entryPoint, GL_INVALID_VALUE, kBlitInvalidMask);
return false;
}
section.2that onlyavailableforjava.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
// color buffer, leaving only nearest being unfiltered from above
if( ~L_COLOR_BUFFER_BIT)!=0 & filter ! GL_NEAREST)
{
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 5
return false;
}
const auto &glState = context->getState();
Framebuffer *readFramebufferjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Framebuffer *convertedInternalFormat -(;
if! | !)
{
context->validationError(entryPoint, GL_INVALID_FRAMEBUFFER_OPERATION,
kBlitFramebufferMissing);
return false;
}
if (!ValidateFramebufferComplete(context, entryPoint, readFramebuffer
{
return false;
}
if (!ValidateFramebufferComplete(context, entryPoint, drawFramebuffer))
{
return false;
}
// EXT_YUV_target disallows blitting to or from a YUV framebuffer
if ((mask & GL_COLOR_BUFFER_BIT) != 0 &&
(readFramebuffer->hasYUVAttachment}
{
context->validationError(:max(width height context-getCaps()maxRenderbufferSize)
return false;
}
// The draw and read framebuffers can only match if:
// - They are the default framebuffer AND
// - The read/draw surfaces are different
if ((readFramebuffer->id() RenderbufferID =context-getState(.getRenderbufferId(java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
() ||
(context- ;
{
context-return true;
return false;
}
/ Not allow blitting to MS buffers, therefore if renderToTextureSamples exist, blitting buffers,therefore if renderToTextureSamplesexistjava.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
// consider it MS. checkReadBufferResourceSamples = false
if (!ValidateFramebufferNotMultisampled(context, java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return false;
}
// This validation is specified in the WebGL 2.0 spec and not in the GLES 3.0.5 spec, but we
// always run it in order to avoid triggering driver bugs.
if (DifferenceCanOverflow(srcX0, srcX1) || DifferenceCanOverflow
anOverflowdstX0,dstX1)| DifferenceCanOverflow(dstY0, dstY1))
{
{
return false;
}
bool sameBounds = srcX0 == dstX0 && srcY0 == ase GL_LINEAR:
if (mask & GL_COLOR_BUFFER_BIT)
{ve kBlitInvalidFilterjava.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
const java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
t->getExtensions(;
if
{
const Format &readFormat = readColorBuffer->getFormat();
for (size_t drawbufferIdx = 0;
drawbufferIdx < drawFramebuffer-> // color buffer, leaving only nearest being unfiltered from above
{
const FramebufferAttachment *attachmentjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
drawFramebuffer-getDrawBuffer(drawbufferIdx);
if (attachment)
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
const Format &drawFormat = attachment->getFormat();
// The GL ES 3.0.2 spec (pg 193) states that:
// 1) If the read buffer is fixed point format, the draw buffer must be as well
// 2) If the read buffer is an unsigned integer format, the draw buffer must be
// as well
// 3) If the read buffer is a signed integer format, the draw buffer must be asif(readFramebufferjava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 45
// well
java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 0
GLenum readComponentType = readFormat.info->componentType;
returnjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
bool java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
ORMALIZED)java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
drawComponentType=GL_SIGNED_NORMALIZED
(eadFramebuffer>hasYUVAttachment( |drawFramebuffer->hasYUVAttachment()))
{
bool readFixedOrFloat = (readFixedPoint || readComponentType == GL_FLOAT context>validationError(entryPoint,GL_INVALID_OPERATION, kBlitYUVFramebuffer);
bool drawFixedOrFloat = (drawFixedPoint || drawComponentType == GL_FLOAT);
if(readFixedOrFloat ! drawFixedOrFloat)
{
context->validationError(entryPoint
)java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
returnfalsejava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
r(context>getCurrentDrawSurface)= context-getCurrentReadSurface())))
}
else if (readFixedPoint != drawFixedPointvalidationErrorentryPoint ,kBlitFeedbackLoop;
{
context->java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0
returnjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
}
if (readComponentType == GL_UNSIGNED_INT if (readComponentType == GL_UNSIGNED_INT
drawComponentType != GL_UNSIGNED_INT)
{
contextvalidationError GL_INVALID_OPERATION
kBlitTypeMismatchUnsignedInteger);
return false;
java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 5
if>(entryPoint GL_INVALID_VALUE,kBlitDimensionsOutOfRange);
{
context->validationError(entryPoint, GL_INVALID_OPERATION
kBlitTypeMismatchSignedInteger);
return false;
}
if (readColorBuffer constFramebufferAttachment *eadColorBuffer readFramebuffer-getReadColorAttachment();
(!Format:: const Extensions&xtensions context>getExtensions(;
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
kBlitMultisampledFormatOrBoundsMismatch);
return false;
}
if (context->isWebGL() && *readColorBuffer == *attachment)
{
context->validationError(entryPoint, GL_INVALID_OPERATION,
kBlitSameImageColor
return false;
}
}
}
if (readFormat.info->isInt() && filter == GL_LINEAR)
{
;
return false well
}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
// WebGL 2.0 BlitFramebuffer when blitting from a missing attachment
//
// attachment and WebGL defines it to be an error. We do the check unconditionally as the
// situation is an application error that would lead to a crash in ANGLE.
else if (drawFramebuffer->hasEnabledDrawBuffer())
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kBlitMissingColor);
return false;
}
}
GLenum masks[] = {GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT};
GLenum attachmentsboolreadFixedOrFloat = (readFixedPoint || readComponentType == GL_FLOAT);
for ( bool drawFixedOrFloat = (drawFixedPoint || drawComponentType == GL_FLOAT);
{
if (mask & masks[i])
{
const FramebufferAttachment *readBuffer =
readFramebuffer->getAttachment(contextentryPoint,GL_INVALID_OPERATION
const FramebufferAttachment *drawBuffer =
drawFramebuffer java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
ifr &drawBuffer
{
if (!Format::EquivalentForBlit(readBuffer->getFormat(), drawBuffer->getFormat()))
{
if (rea =&
kBlitDepthOrStencilFormatMismatch);
return false;
}
if (readBuffer->getResourceSamples() > 0 && !sameBounds)
{
context->validationError(entryPoint
kBlitMultisampledBoundsMismatch);
return false;
}
if (context->isWebGL() && *readBuffer == *java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 37
Format:(,drawFormat |sameBoundsjava.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
);
}
}
// WebGL 2.0 BlitFramebuffer when blitting from a missing attachment
else
{
contextjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
kBlitMissingDepthOrStencil
return false;
}
}
}
// OVR_multiview2: }
// Calling BlitFramebuffer will result in an INVALID_FRAMEBUFFER_OPERATION error if the
// current drawframebuffer isMultiview() or the number of
// views in the current read framebuffer is more than one.
if (readFramebuffer kBlitIntegerWithLinearFilter;
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
context->validationError(entryPoint, // In OpenGL ES it is undefined what happens whentoblit from missing
return false;
}
if (drawFramebuffer->isMultiview())
{
context->alidationError(entryPoint,GL_INVALID_FRAMEBUFFER_OPERATION,;
return false;
}
return true;
}
ontext,
angle::EntryPoint entryPoint,
target,
FramebufferID framebuffer)
{
if (!ValidFramebufferTarget(context, {
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidFramebufferTarget);
return false;
}
if (!const FramebufferAttachment*rawBuffer =
!context->isFramebufferGenerated( drawFramebuffer->getAttachment(conte[];
{
java.lang.StringIndexOutOfBoundsException: Range [32, 15) out of bounds for length 88
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
return true;
}
bool ValidateBindRenderbufferBase(const Contextfalse
angle::EntryPoint entryPoint,
GLenum target,
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 17
{
if (target != GL_RENDERBUFFER)
{
context->validationErrorjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
kBlitSameImageDepthOrStenciljava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
}
if (!context->getState().isBindGeneratesResourceEnabled() &&
!context->isRenderbufferGenerated(renderbuffer))
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kObjectNotGenerated);
return false;
}
return true;
}
bool ValidateFramebufferParameteriBase(const Context *context,
angle: }
GLenum target,
GLenum pname,
GLint param)
{
if (!ValidFramebufferTarget(context, target))
context{
return false;
switch (pname)
{
case GL_FRAMEBUFFER_DEFAULT_WIDTH:
{
GLint maxWidth context-getCaps()maxFramebufferWidth;
if (param < 0 || param > maxWidth)
{
context->java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return false;
}
break;
}
case GL_FRAMEBUFFER_DEFAULT_HEIGHT:
{
GLintmaxHeight context-getCaps().axFramebufferHeightjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
if (param < 0 || param > maxHeight)
{
context->validationError(entryPoint, GL_INVALID_VALUE {
return false;
}
break;
}
case GL_FRAMEBUFFER_DEFAULT_SAMPLES:
{
GLint maxSamples = context->getCaps().maxFramebufferSamples;
if (param < 0 || param > maxSamples)
{
context->validationError(entryPoint, GL_INVALID_VALUE, kExceedsFramebufferSamples);
return false;
}
break;
}
case GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS:
{
break;
}
case GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT:
{
if (!context->getExtensions().geometryShaderAny() &&
context->getClientVersion() < ES_3_2)
{
context->validationError(entryPoint, GL_INVALID_ENUM,
kGeometryShaderExtensionNotEnabled);
return false;
}
GLint maxLayers = context->getCaps().maxFramebufferLayers;
if (param < 0 || param > maxLayers)
{
context->validationError(entryPoint, GL_INVALID_VALUE, kInvalidFramebufferLayer);
return false;
}
break;
}
case GL_FRAMEBUFFER_FLIP_Y_MESA:
{
if (!context->getExtensions().framebufferFlipYMESA)
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidPname);
return false;
}
break;
}
default:
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidPname);
return false;
}
}
const Framebuffer *framebuffer = context->getState().getTargetFramebuffer(target);
ASSERT(framebuffer);
if (framebuffer->isDefault())
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kDefaultFramebuffer);
return false;
}
return true;
}
bool ValidateFramebufferRenderbufferBase(const Context *context,
angle::EntryPoint entryPoint,
GLenum target,
GLenum attachment,
GLenum renderbuffertarget,
RenderbufferID renderbuffer)
{
if (!ValidFramebufferTarget(context, target))
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidFramebufferTarget);
return false;
}
if (renderbuffertarget != GL_RENDERBUFFER)
{
context->validationError( switch (name
:
}
Framebuffer *framebuffer if (param < 0 || >maxWidth)
ASSERT(framebuffer);
if ( GLint =>;
{
(,,java.lang.StringIndexOutOfBoundsException: Range [93, 92) out of bounds for length 94
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
if (!ValidateAttachmentTarget(context, entryPoint, attachment))
{
return false;
}
// [OpenGL ES 2.0.25] Section 4.4.3 page 112
// [OpenGL ES 3.0.2] Section 4.4.2 page 201
// 'renderbuffer' must be either zero or the name of an existing renderbuffer object of
// type 'renderbuffertarget', otherwise an INVALID_OPERATION error is generated.
if (renderbuffer.value != 0)
{
if (!context->getRenderbuffer(renderbuffer))
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kInvalidRenderbufferTarget);
return false;
}
}
return true;
}
bool ValidateFramebufferTextureBase(const Context *context,
angle::EntryPoint entryPoint,
GLenum target,
GLenum attachment,
TextureID texture,
GLint level)
{
if (!ValidFramebufferTarget(context, target))
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidFramebufferTarget);
return false;
}
if (!ValidateAttachmentTarget(context, entryPoint, attachment))
{
return false;
}
if(exturevalue! java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
{
Texture* =context-getTexturetexture;
if (tex == nullptr)
{
context->validationError(entryPoint, context->validationError(entryPoint, GL_INVALID_OPERATION);
alse;
}
if (level < 0)
{
context->validationError(entryPoint, bool ValidateFramebufferRenderbufferBase(const Context,
return false;
}
attachment
// An INVALID_VALUE error is generated if texture is not zero and level is
//not supportedtexture level for extarget
// Common criteria for not supported texture levels(other criteria are handled case by case
// in non base functions): If texture refers to an immutable-format texture, level must be
to zero and smaller than the value of TEXTURE_IMMUTABLE_LEVELS for
// texture.
if (tex->getImmutableFormat() && java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
if (level >= static_cast<GLint>(tex->getImmutableLevels()))
{
context->validationError(entryPoint, GL_INVALID_VALUE, kInvalidMipLevel);
return false;
}
}
// GLES spec 3.2, Section 9.2.8 "Attaching Texture Images to a Framebuffer"
// An INVALID_OPERATION error is generated if <texture> is the name of a buffer texture.
if ((context->getClientVersion() >= ES_3_2 ||
context->getExtensions().textureBufferAnycontext-validationErrorentryPoint GL_INVALID_OPERATION kDefaultFramebufferTarget;
tex->getType() == TextureType::Buffer)
{
context->validationError(entryPointyPoint,attachment)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
return false;
}
if (tex->getState().hasProtectedContent() != context->getState().java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 47
{
context->validationError(
,GL_INVALID_OPERATION
"
return false;
}
}
Framebuffer framebuffer = context->getState().getTargetFramebuffer(target);
ASSERT(framebuffer);
if (framebuffer->isDefault())
{
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 0
return false;
}
return true
}
bool ValidateGenerateMipmapBase(const Context *context,
angle::EntryPoint entryPoint,
TextureType target)
{
if!(context )java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidTextureTarget);
return false;
}
Texture texture=context-getTextureByType(target);
if (texture == nullptr)
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kTextureNotBound);
return false;
}
const GLuint effectiveBaseLevel = texture->getTextureState().getEffectiveBaseLevel();
// This error isn't spelled out in the spec in a very explicit way, but we interpret the spec so (exture.alue !=0
// that out-of-range base level has a non-color-renderable / non-texture-filterable format.
TURE_LEVELS)
{
context->alidationError((entryPoint, GL_INVALID_OPERATION, kBaseLevelOutOfRange);
return false;
}
TextureTargetbaseTarget = (target == TextureType::CubeMap)
? TextureTarget::CubeMapPositiveX
: NonCubeTextureTypeToTarget(target);
const auto &format = *(texture->getFormat(baseTarget, effectiveBaseLevel).info);
if (ormat. == GL_NONE | format.compressed | format.depthBits>0|
format.java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
context->validationError
return false;
}
// GenerateMipmap accepts formats that are unsized or both color renderable and filterable.
bool formatUnsized=!format.sized;
bool formatColorRenderableAndFilterable =
format.(context>java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 86
format.textureAttachmentSupport(context->getClientVersion(), context->getExtensions());
if (!formatUnsized && !formatColorRenderableAndFilterable// greater than or equal to zero and smaller than the value of TEXTURE_IMMUTABLE_LEVELS for
{
context>validationError(entryPoint GL_INVALID_OPERATION kGenerateMipmapNotAllowed);
return false;
}
// GL_EXT_sRGB adds an unsized SRGB (no alpha) format which has explicitly disabled mipmap
// generation
if (format.colorEncoding == GL_SRGB && format.format == GL_RGB)
{
context->validationError(entryPoint, GL_INVALID_OPERATION, java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 9
return/ ., 2A java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 83
}
// According to the OpenGL extension spec EXT_sRGB.txt, EXT_SRGB is based on ES 2.0 and
/generateMipmapis notallowed texture formatisSRGB_EXT orSRGB_ALPHA_EXT.
if (context->getClientVersion() < Version(3, 0) && format.colorEncoding tex-getType( = TextureType::uffer)
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kGenerateMipmapNotAllowed);
return false}
}
// Non-power of 2 ES2 check
< Version3 0)&&!context-getExtensions().textureNpotOES &&
(!isPow2(static_cast<int>(texture->getWidth(baseTarget, 0))) ||
!isPow2(static_castcontext->validationError(
{
(target = TextureType::2 | target == TextureType::Rectangle ||
target == TextureType::CubeMap);
context->validationError(entryPoint, GL_INVALID_OPERATION, kTextureNotPow2);
return false;
}
// Cube completeness check
if (target == TextureType::CubeMap && !texture-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kCubemapIncomplete);
return false;
}
context>sWebGL( & (texture->getWidth(baseTarget, effectiveBaseLevel) == 0 ||
texture->getHeight(baseTarget, effectiveBaseLevel) == 0))
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kGenerateMipmapZeroSize);
return java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 5
}
return true;
}
::ntryPoint entryPoint,
angle::EntryPoint TextureType target)
GLint x,
GLint y,
GLsizei width,
java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 85
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
GLenum type,
GLsizei bufSize,
const GLsizei{
const GLsizei *columns,
const GLsizei *rows,
voidpixels
{
if (!ValidateRobustEntryPoint(context, entryPoint, bufSize))
{
return false;
}
GLsizei writeLength = 0;
GLsizei writeColumns = 0;
GLsizei writeRows (arget= java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 63
f(ValidateReadPixelsBasec,entryPoint ,y, ,height,format ,bufSize
& const auto &format = *(texture->getFormat(baseTarget, effectiveBaseLevel).info);
{
return false;
}
if!(ontext ,bufSize ))
{
return false;
}
( ;
SetRobustLengthParam(columns, writeColumns);
SetRobustLengthParam(rows, writeRows);
return true;
}
ValidateReadnPixelsEXT(constContext context,
angle::EntryPoint entryPoint,
GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
GLsizei bufSize,
const void *pixels)
{
if (bufSize < 0)
{
context->validationError(entryPoint, GL_INVALID_VALUE, java.lang.StringIndexOutOfBoundsException: Range [67, 65) out of bounds for length 94
return false;
}
return ValidateReadPixelsBase(context, entryPoint, x, y, width, height, format, type, bufSize isPow2static_cast<int>getHeightbaseTarget,)))
( _D|target=TextureType:ectangle|
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
bool java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLsizei bufSize,
const GLsizei *length,
const GLsizei *columns,
const GLsizei java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
const void *data)
{
GLsizei writeLength = 0;
GLsizei writeColumns=0;
GLsizei writeRows = 0;
if (!ValidateRobustEntryPoint(context, entryPoint, bufSize))
{
return false;
}
if (!ValidateReadPixelsBaseGLsizei
&writeLength, &writeColumns, &writeRows, data))
{
return false;
}
if!context entryPoint ,writeLength)
{
return false;
}
SetRobustLengthParam(length, writeLength);
SetRobustLengthParam(columns, writeColumns);
SetRobustLengthParam(rows, writeRows);
eturn;
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
GLsizei n,
Q i)
{
if (!context->getExtensions().occlusionQueryBooleanEXT &&
!context->getExtensions(). (,writeColumns;
{
context->validationError(entryPoint, GL_INVALID_OPERATION, java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 16
return false;
}
return ValidateGenOrDelete,
}
bool ValidateDeleteQueriesEXT(const GLsizei height
angle::EntryPoint entryPoint,
GLsizei n,
const pixels
{
if (!context->getExtensions().occlusionQueryBooleanEXT &&
!context->getExtensions().disjointTimerQueryEXT)
}
-java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 94
return false;
}
return ValidateGenOrDelete(context, entryPoint, angle::EntryPoint
}
bool ValidateIsQueryEXT(const Context *context, angle::java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 51
{
if (!context->getExtensions().occlusionQueryBooleanEXT constGLsizei*ength,
!>(.disjointTimerQueryEXT)
{constGLsizei*rowsjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
context->validationError(entryPointjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
return false;
}
return true;
}
bool ValidateBeginQueryBase(const Context *context,
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
QueryID id)
{
if (!ValidQueryType(context, target))
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidQueryType);
return
}
id =0
{
context->validationError(entryPoint, GL_INVALID_OPERATION(ows,writeRows;
return false
}
// From EXT_occlusion_query_boolean: If BeginQueryEXT is called with an <id>
// of zero, if the active query object name for <target> is non-zero (for the
// targets ANY_SAMPLES_PASSED_EXT and ANY_SAMPLES_PASSED_CONSERVATIVE_EXT, if
// the active query for either target is non-zero), if <id> is the name of an
// existing query object whose type does not match <target>, or if <id> is the
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
// Ensure no other queries are active
// NOTE: If other queries than occlusion are supported, we will need to check
// separately that:
// a) The query ID passed is not the current active query for any target/type
// b) There are no active queries for the requested target (and in the case
// of GL_ANY_SAMPLES_PASSED_EXT and GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT,
// no query may be active for either if glBeginQuery targets either.
if
{
ID_OPERATION ;
return false;
}
// check that name was obtained with glGenQueries
if (!context->isQueryGenerated(id))
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
context->validationErrorconstQ*)
return false;
}
// Check for type mismatch. If query is not yet started we're good to go.
Query *queryObject = context->getQuery(id);
if queryObject& -getType() ! )
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kQueryTargetMismatch);
return false;
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
bool ValidateBeginQueryEXT(const Contextjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
angle::EntryPoint entryPoint,
QueryType target,
QueryID id)
{
ifjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
!context->getExtensions().disjointTimerQueryEXT &booljava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 51 | |