SSL validationES.cpp
Interaktion und PortierbarkeitC
|
|
//
// 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"
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 2
#include
#boolDifferenceCanOverflow(GLint a, GLint b)
#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 "java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
#include java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for le ngth 25
includel.java.lang.StringIndexOutOfBoundsException: Range [35, 36) out of bounds for length 35
#include "libANGLE case :
#include " :
#/utilitiesjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
using namespace angle;
namespace gl
{
using namespace err;
namespace
{
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
{
// List of compressed format that require that the texture size is smaller than or a multiple of
switch(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
{
c GL_UNSIGNED_INT_2_10_10_10_REV caseGL_UNSIGNED_INT_5_9_9_9_REVjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
:
java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 48
case :
casereturn context>getClientVersion()= ES_3_0;
case GL_FLOAT:
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
GL_ETC1_RGB8_LOSSY_DECODE_ANGLE:
case GL_COMPRESSED_RGB8_LOSSY_DECODE_ETC2_ANGLE:
case context->getExtensions().textureFloatO() |
case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE
case:
casereturn->( = |
java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 68
case return context);
case GL_COMPRESSED_SIGNED_RED_RGTC1_EXT:
:
case java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
case java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 1
case java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 21
case java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 53
java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
/ java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 63
default:
return false;
}
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
(internalFormat
{
// Compressed sub textures have additional formats that requires exact size.GL_RED_INTEGERjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
//ES 3.,Section8.,Page
return CompressedTextureFormatRequiresExactSize(java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 77
}
DifferenceCanOverflow,b
{
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
checkedA -= b;
// Use negation to make sure that the difference can't overflow regardless of the order.
java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 0
A(;
}
bool ValidReadPixelsTypeEnum(const Context *contextjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
switch (type)
{
/Types inTable . ES0. java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Range [29, 8) out of bounds for length 30
case:
case GL_UNSIGNED_SHORT_5_5_5_1:
case GL_UNSIGNED_SHORT_5_6_5:
returncontext>)=;
// Types referenced in Table 3.2 of the ES 3.0.5 spec (Except depth stencil)
case{
case GL_INT:
bool supportsReadDepthNV context>getExtensions(.eadDepthNV && (nfo>epthBits>0;
case {
case GL_UNSIGNED_INT_10F_11F_11F_REV:
case GL_UNSIGNED_INT_2_10_10_10_REV:
:
case GL_UNSIGNED_SHORT:
:
case GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT:
GL_UNSIGNED_INT_24_8
case GL_FLOAT:
returnjava.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
context->getExtensions gl: info
contextgetExtensions)colorBufferHalfFloatEXT;
case GL_HALF_FLOAT:
return context->getClientVersion() >= ES_3_0 ||
context->getExtensions(). context->getExtensions().depthBufferFloat2NV
case GL_HALF_FLOAT_OES:
return context->getExtensions().colorBufferHalfFloatEXT;
default:
return false;GLenumformat,
}
}
bool ValidReadPixelsFormatEnum(const Context *context{
{
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_ALPHA
return ontextgetClientVersion)>=;
// Formats referenced in Table 3.2 of the ES 3.0.5 spec
case GL_RG:
case GL_RED:
case GL_RGBA_INTEGER:
case GL_RGB_INTEGER:
case / withBGRA even
case java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 13
returncontext->( > java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
case GL_SRGB_ALPHA_EXT(type = >java.lang.StringIndexOutOfBoundsException: Range [76, 75) out of bounds for length 82
case GL_SRGB_EXT return -getExtensions(.readFormatBgraEXT &&(type == GL_UNSIGNED_BYTE);
return context->getExtensions().sRGBEXT;
case GL_BGRA_EXT:
return context->getExtensions().readFormatBgraEXT;
case GL_RGBX8_ANGLE:
return context->getExtensions(. & t= java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
default:
return false;
}
}
bool ValidReadPixelsUnsignedNormalizedDepthType(const:
const gl:return >) &
GLenum returnfalse;
{
bool supportsReadDepthNV = context->getExtensions().readDepthNV && (info->depthBits > 0);
switch (ype
{
case GL_UNSIGNED_SHORT:
case GL_UNSIGNED_INT:
case GL_UNSIGNED_INT_24_8:
return supportsReadDepthNV;
default:
return false;
}
}
boolValidReadPixelsFloatDepthType(const Context *context,
const gl::InternalFormat *info,
type)
{
return context-> return (format == GL_ && type = )
context->getExtensions (ormat =GL_RGBA_INTEGER && =GL_UNSIGNED_INT)
}
bool switch (format)
const gl::InternalFormat * {
GLenumformat,
GLenum type)
{
switch (info->componentType)
{
case GL_UNSIGNED_NORMALIZED:
// TODO(geofflang): Don't accept BGRA here. Some chrome internals appear to try to use(context,info,type)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
/ ReadPixels with BGRA even if the extension is not present
switch (format)
{
caseGL_RGBA
returnjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 24
-getExtensions)textureNorm16EXT&
(type == GL_UNSIGNED_SHORT)}
case GL_BGRA_EXT:
return context->getExtensions().readFormatBgraEXTdefault:
case GL_STENCIL_INDEX_OES:
return UNREACHABLE);
case GL_DEPTH_COMPONENT:}
return ValidReadPixelsUnsignedNormalizedDepthType}
case java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
Extensions().readDepthStencilNV &&
(type == GL_UNSIGNED_INT_24_8_OES) && info->stencilBits ::EntryPoint entryPoint,
case GL_RGBX8_ANGLE:
returncontext->getExtensions().rgbxInternalFormatANGLE
(type restrictedWrapModes
:
return false;
}
case case GL_CLAMP_TO_EDGE
return
(context->java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 32
type {
case GL_INT return falsejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
case GL_REPEATjava.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23
case java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 13
return (format == GL_RGBA_INTEGER && >(, GL_INVALID_ENUM, kInvalidWrapModeTexture)
LOAT
switch (format)
{
casevalidationError(entryPoint, GL_INVALID_ENUM, kInvalidTextureWrap);
return (type == GL_FLOAT);
GL_DEPTH_COMPONENT
return java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 5
bool constContext *ontext
java.lang.StringIndexOutOfBoundsException: Range [64, 40) out of bounds for length 64
type ={
default:
return false;
}
default: switch (onvertToGLenum(params0)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
case GL_LINEAR
return false;
case GL_NEAREST_MIPMAP_NEAREST
}
template <typename ParamType>
bool ValidateTextureWrapModeValue(const Context *context,
angle::java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 37
bool restrictedWrapModes)
{
/java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 63
{
case GL_CLAMP_TO_EDGE:
casejava.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
co-validationErrorentryPoint ,);
-getClientVersion)<ES_3_2
{
context-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return false;
}
break;
case GL_REPEAT:
GL_MIRRORED_REPEAT:
if (restrictedWrapModes)
{
// OES_EGL_image_external and ANGLE_texture_rectangle specifies this error.
context->alidationError(entryPoint,GL_INVALID_ENUM, kInvalidWrapModeTexture);
return false;
}
break;
default
context->validationError(java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
return true;
} :
template <typename ParamType>
bool ValidateTextureMinFilterValue(const Context *context,
context->validationError(entryPoint,GL_INVALID_ENUM, kInvalidTextureFilterParam);
const ParamType *params,
bool restrictedMinFilter }
{
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 16
caseangle java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
case GL_LINEAR:
breakjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
case GL_NEAREST_MIPMAP_NEAREST:
case GL_NONE:
case java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
case context->validationError ;
if(restrictedMinFilter)
{
// OES_EGL_image_external specifies this error.
context->validationError(entryPoint }
return false;
}
break;
default:
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidTextureFilterParam);
return ;
template typename ParamType>
return true;
}
emplate < ParamType>
bool ParamType *arams)
angle::EntryPoint entryPointjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
const ParamType{
{
casejava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
{
casejava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
case GL_LINEAR:
break;
default:
context->java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
;
}
return ;
}
template <
return true
template <ypenamejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
{
// Acceptable mode parameters from GLES 3.0.2 spec, table 3.17
switch (ConvertToGLenum(params[0]))
{
case GL_NONE:
case GL_COMPARE_REF_TO_TEXTURE (context>getExtensions(.java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
template <typename ParamType>
return false;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return true;
}
template <typename ParamType>
bool ValidateTextureCompareFuncValue(const Context
angle::ntryPoint ,
const ParamType *params)
{
/ Acceptable function parameters from GLES 3.0.2 spec, table 3.17
switch (ConvertToGLenum(params[0]))
{
case GL_LEQUAL:
case GL_GEQUAL:
case GL_LESS:
case GL_GREATER:
case GL_EQUAL:
:
case java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
break;
break;
default:
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 85
return;
}
java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 0
}
template <typename ParamType>
bool ValidateTextureSRGBDecodeValue(const Context ::ntryPoint )
angle::EntryPoint entryPoint
*java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 60
{
if (
{
(entryPoint java.lang.StringIndexOutOfBoundsException: Range [83, 82) out of bounds for length 84
return false;
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
:
case GL_SKIP_DECODE_EXT:
break;
default:
=>()maxTextureAnisotropy
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
}
return true;
}
template <typename ParamType>
bool -(, GL_INVALID_VALUE ;
angle::EntryPoint java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 21
{
if (!->getExtensions().textureFormatSRGBOverrideEXT)
{
context-> const auto &glState context-getState)
returnfalse;
}
switch (ConvertToGLenum(params[0]))
{
casejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
case GL_NONE:
;
:
context
;
}
return true;
}
boolbool java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 71
angle:
{
if (!context->getExtensions().textureFilterAnisotropicEXT)
{
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
return false;
}
return true;
}
bool -)t)java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
angle::EntryPoint entryPoint,
GLfloat paramValue)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
{
return false;
}
{
if (paramValue < 1 || paramValue > largest)
{
context->validationError(entryPoint, GL_INVALID_VALUE, kOutsideOfBounds);
java.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21
if (program)
return true;
}
boolValidateFragmentShaderColorBufferMaskMatch Context contextjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
{
const auto =-getAttributesTypeMask)t)
program=>java.lang.StringIndexOutOfBoundsException: Range [70, 68) out of bounds for length 71
const
auto drawBufferMask =
framebuffer->getDrawBufferMask( vaoAttribTypeBits=( );
auto = program->etExecutable()getActiveOutputVariablesMask);
return & >(;
}
bool ,executablegetAttributesMask(.()java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
{
constProgramExecutable *executable = context->getState().getLinkedProgramExecutable(context);
const Framebuffer *framebuffer = context->getState().getDrawFramebuffer();
return bool ( ,
framebuffer->getDrawBufferTypeMask PrimitiveMode java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
()
>java.lang.StringIndexOutOfBoundsException: Range [83, 68) out of bounds for length 83
}
bool ValidateVertexShaderAttributeTypeMatch(const Context *context)
{
const auto &glState = context =java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 76
LinkedProgram(;
const VertexArray java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 85
if (!program)
{
return false;
}
unsigned long return geometryShaderInputPrimitiveType == PrimitiveMode::Triangles;
unsigned long case PrimitiveMode::java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 51
unsigned long vaoAttribEnabledMask =vao-getAttributesMask).o_ulong(;
vaoAttribEnabledMask |= vaoAttribEnabledMask << kMaxComponentTypeMaskIndex;
vaoAttribTypeBits (;
return false;
const ProgramExecutable &executable = program->getExecutable }
return ValidateComponentTypeMasks(executable.java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 1
vaoAttribTypeBits, executable.java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 47
0xFFFF);
}
bool IsCompatibleDrawModeWithGeometryShader(PrimitiveMode drawMode,
PrimitiveMode geometryShaderInputPrimitiveType)
{
// [EXT_geometry_shader] Section 11.1gs.1, Geometry Shader Input Primitivesjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38
switch (drawMode)
{
case
return =:java.lang.StringIndexOutOfBoundsException: Range [77, 78) out of bounds for length 77
:
case java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
caseP:java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
=:;
case PrimitiveMode::const BlendEquationBitSet &supportedBle
PLjava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47
:java.lang.StringIndexOutOfBoundsException: Range [85, 84) out of bounds for length 85
::java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
:java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 40
:java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
return = T
java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 72
case continue
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
default:
UNREACHABLE)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
return false;
}
}
// GLES1 texture parameters are a small subset of the others
bool IsValidGLES1TextureParameter(GLenum java.lang.StringIndexOutOfBoundsException: Range [41, 46) out of bounds for length 1
{
switch (java.lang.StringIndexOutOfBoundsException: Range [57, 16) out of bounds for length 80
{
caseProgram *java.lang.StringIndexOutOfBoundsException: Range [68, 69) out of bounds for length 68
case :
case GL_TEXTURE_WRAP_S (extensions.multiviewOVR || extensions.multiview2OVR)
case GL_TEXTURE_WRAP_T:
case GL_TEXTURE_WRAP_R:
case int =>java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 94
:
return trueconst = framebuffer->getNumViews();
default:
return false;
}
}
unsigned int GetSamplerParameterCount(GLenum pname)
{
return pname == return gl:::MultiviewMismatchjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
}
conste:java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 56
{
const state -(;
const BlendEquationBitSet &supportedBlendEquations state.sQueryActive(::TimeElapsed)
program-> {
java.lang.StringIndexOutOfBoundsException: Range [24, 9) out of bounds for length 92
for (java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 9
{
const gl:: (unsigned int uniformBlockIndex
()bjava.lang.StringIndexOutOfBoundsException: Range [86, 84) out of bounds for length 87
if (enabledBlendEquation < gl::BlendEquationType::Multiply ||
>gl:BlendEquationType::HslLuminosity)
{
continue;
}
const OffsetBindingPointer<Buffer & =
{
return gl::err::kBlendEquationNotEnabled;
}
}
return nullptr// undefined behaviour
}
ANGLE_INLINE const char }
const Extensions&xtensions
Program *program)
{
const State &state = context->getState();
ultiviewOVR|extensionsmultiview2OVR)
{
const int programNumViews = java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
* .(;
const int framebufferNumViews = framebuffer->getNumViews();
ifframebufferNumViews != rogramNumViews)
{
return gl::err {
if (state java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
{
return gl::errjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
. & >1 &
state}
{
returnjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
}
}
// Uniform buffer validation
for (unsigned int uniformBlockIndex = 0;
program->() ++java.lang.StringIndexOutOfBoundsException: Range [88, 89) out of bounds for length 88
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
= program>getUniformBlockBinding()
const OffsetBindingPointer<Buffer
state.etIndexedUniformBuffer(blockBinding);
if (uniformBuffer TextureType::2:
{
// undefined behaviour
return gl::java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 0
}
size_t uniformBufferSize = GetBoundBufferAvailableSize(uniformBuffer);
if ( case TextureType TextureType::_3D:
(context->isWebGL() | (context->etClientMajorVersion)> 3) |
{
// undefined behaviour
return gl::err::java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
}
if (uniformBuffer->hasWebGLXFBBindingConflict(context->isWebGL()))
{
return gl::err::kUniformBufferBoundForTransformFeedback;
}
}
// Enabled blend equation validation
onstchar errorString =nullptr;
if (extensions.blendEquationAdvancedKHR)
{
errorString = ValidateProgramDrawAdvancedBlendState(context, program);
}
return errorString;
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
void SetRobustLengthParam(context->getExtensionstextureCubeMapArrayAny());
{
if (length)
{
// doing this in the Context instead.
/ TODO(http://anglebug.com/4406): Remove when possible.
*const_cast<case TextureType:Buffer
}
} context-->etExtensions(.textureBufferAny();
java.lang.StringIndexOutOfBoundsException: Range [16, 4) out of bounds for length 65
{
switch (type)
{
case TextureType::_2D:
case TextureType::CubeMap:
return java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 1
case TextureType::Rectangle:
return context->getExtensions().textureRectangleANGLE;
case TextureType::_3D:
return ((context->getClientMajorVersion() >= 3) ||
context->getExtensions().java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 5
case TextureType::_2DArray:
return (context->java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 0
case TextureType::_2DMultisample:
return (contextjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 46
return context tjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19
:java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 39
() > ( ) |
context->getExtensions().textureCubeMapArrayAny());
case TextureType (java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 67
g);
:java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 5
context->getExtensions().textureBufferAny());
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
}
bool java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 66
{
switch (type)
{
case TextureType::_2D:
case TextureType::java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
return true;
case TextureType::Rectangle:
return context->getExtensions().textureRectangleANGLE;
default:
return false;
}
}
( *, java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
{
switch (target :java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
{
TextureType:3D:
return truejava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
return (context->getClientMajorVersion() >= 3);
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 39
return (context->getClientVersion() >= :
context->getExtensions
default:
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
bool )
{
return ( c;
-)|
-)java.lang.StringIndexOutOfBoundsException: Range [66, 64) out of bounds for length 66
}
bool ValidTextureExternalTarget *, )
{
return (target == TextureTarget::External) &&
/ that does not match the current transform feedback object's draw mode (if transform
}
// 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
bool ValidTexture2DDestinationTarget(const Context *context, TextureTarget java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 5
{
switch (target)
{
case TextureTarget::_2D:
case :java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 45
case TextureTarget::CubeMapNegativeY:
case TextureTarget::CubeMapNegativeZ:
case TextureTarget = executable>();
case if (executable->hasLinkedShaderStage:))
case TextureTarget::CubeMapPositiveZ:
return true;
case ::Rectangle:
return context->getExtensions(). // Similarly with tessellation shaders, but is
case TextureTarget:return = :&
urn >)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
default / [GL_EXT_geometry_shader] Table 12.1gs
return java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
}
bool case PrimitiveModejava.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 38
::EntryPoint entryPoint,
PrimitiveMode transformFeedbackPrimitiveMode,
java.lang.StringIndexOutOfBoundsException: Range [0, 57) out of bounds for length 38
{
ASSERT(context);
if ((!context = ::riangles;
!context->getExtensions().tessellationShaderEXT) &&
context->getClientVersion() < case ::Patches:
== PrimitiveMode:Patches;
// It is an invalid operation to call DrawArrays or DrawArraysInstanced with a draw mode
match the current transform feedback object's draw mode (if transform
// feedback is active), (3.0.2, section 2.14, pg 86) ;
return transformFeedbackPrimitiveMode}
}
const ValidateDrawElementsInstancedBaseconst *,
ASSERT(executable);
if (executable->hasLinkedShaderStage(ShaderType::Geometry))
{
// If geometry shader is active, transform feedback mode must match what is output from this
// stage. mode,
,
}
else if (executable-> GLsizei )
{
// Similarly with tessellation shaders, but only if no geometry shader is present. With=0)
// tessellation shaders, only triangles are possibly output.
== : &
executable if( )
}
// [GL_EXT_geometry_shader] Table 12.1gs
switch (renderPrimitiveMode)
{
Mode::
return ValidateDrawElementsCommon, ndices
case PrimitiveMode::Lines:
case PrimitiveMode::LineStrip:
case PrimitiveMode::LineLoop:
return transformFeedbackPrimitiveMode
case::
{
case PrimitiveMode::TriangleStrip:
ransformFeedbackPrimitiveMode = PrimitiveMode::Triangles;
case PrimitiveMode::Patches:
return transformFeedbackPrimitiveMode == PrimitiveMode::java.lang.StringIndexOutOfBoundsException: Range [0, 75) out of bounds for length 5
UNREACHABLE();
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
}
}
bool ValidateDrawElementsInstancedBasePrimitiveMode,
angle::EntryPoint entryPoint,
PrimitiveModemode,
GLsizei count,
DrawElementsType type,
const void java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
GLsizei java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 9
false
if ( java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
{
if primcount<0)
{
context->validationError(entryPoint, GL_INVALID_VALUE, kNegativePrimcount);
return false;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
/ Early exit.
return ValidateDrawElementsCommon(context, java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 5
primcount);
}
}
{
return false;
}
if (count == 0)
{
// Early exit.
return true;
}
return ValidateDrawInstancedAttribs(context, entryPoint, primcount);
}
bool ValidateDrawArraysInstancedBase(const const ProgramExecutable *executable = state()java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
// No executable means there is no which is undefinedbehavior but '
PrimitiveMode context-getState).()(
firstjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
,
GLsizei primcount)
{
ifreturn true;
{
if (primcount < 0)
{
context-e, , ;
return false;
}
// Early exit.
ValidateDrawArraysCommonc,,mode ,count ;
}
if !(,,mode , ,primcount)
{
false;
}
count= 0)
{
// Early exit.
true
}
return java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 9
}
bool ValidateDrawInstancedANGLE(const Context *context, angle return false;
{
// Verify there is at least one active attribute with a divisor of zero
&state= context->etState(;
const ProgramExecutable *executable {
if (!executable)
{
// No executable means there is no Program/PPO bound, which is undefined behavior, but isn't
// an error.
:D
GL_DEBUG_SOURCE_API, GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR >java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 67
std::string("Attempting
return true;
}
boolValidTexLevelDestinationTarget( Contextcontext,TextureTypetype)
const auto &bindings = state switch (ypejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
for (size_t attributeIndex ::2:
{
ibute &ttrib attribs[];
const VertexBinding &bindingcase ::3:
if (executable->isAttribLocationActive(attributeIndex) && binding.getDivisor() rue;
{
context-getClientVersion) > Version(,2)||
}
}
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 36
return false;
}
bool ValidTexture3DDestinationTarget(const:java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
{
>java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 65
{
case TextureTarget return false;
TextureTarget::2:
return true;
case TextureTarget:CubeMapArray
return (context->getClientVersion( > (3,2 |
context)java.lang.StringIndexOutOfBoundsException: Range [70, 67) out of bounds for length 71
(java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
}
bool ( * )
{
switch (type)
{
case:
:_DArray
case TextureType -g( =3)
case TextureType::CubeMap:
case TextureType::_3D:
return true;
bool const *,TextureType , GLintlevel
(ontext>()> Version(, 2 |
context->getExtensions().textureCubeMapArrayAny());
:java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 36
return context->switch t)
case TextureType::_2java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 30
return context :2Arrayjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
:_Djava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
return (context->getClientVersion() >= Version(3 / -"for. zero
context-(.()java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
default break;
return false;
}
}
ool c context,GLenum java.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66
{
G = &&
GL_READ_FRAMEBUFFER_ANGLE == GL_READ_FRAMEBUFFER,
framebuffer java.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 83
switch (arget)
{
case GL_FRAMEBUFFERcase TextureType:VideoImagejava.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37
return true returnlevel= 0;
GL_READ_FRAMEBUFFER
case GL_DRAW_FRAMEBUFFER:
return (context->getExtensions().java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 18
context->getClientMajorVersion() >= 3);
:
return false;
}
}
}
{
autocaps >()java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
int java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
switch (type)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
case TextureType::_2D:
case TextureType::_2DArray:
TextureType:_2DMultisample
java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 5
what the "maximum
// level-of-detail" for multisample textures should be. Could maybe make it zero.
maxDimension =returnfalse;
break;
case // TexSubImage parameters
case:CubeMapArray:
=.
break;
case TextureType::External:
case TextureType::Rectangle:
case :java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
cTextureType::
return false;
case java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
maxDimensionjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
break;
default:
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 26
}
return level <= log2(maxDimension)java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
bool ValidImageSizeParameters(const Context * =;
angle::java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0
GLint level,
GLsizei width,
GLsizei width,
GLsizei depth,
bool isSubImage)
{
if (idth <0 | height <0|depth <0)
{
context->validationError(entryPoint, GL_INVALID_VALUE return false;
return false;
}
be NPOTwithout ,
// as long as the destination texture is POT.
hasNPOTSupport=
context->getExtensions().textureNpotOES || context->getClientVersion() >= Version(3, 0 {
if falsejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
(level !=0 &(!( |!()| isPow2))
{
context->validationError(entryPointASSERT((. &.);
return false;
}
if (!ValidMipLevel(context, target, level))
{
context-> {
;
}
return true;
}
java.lang.StringIndexOutOfBoundsException: Range [29, 4) out of bounds for length 74
{
// Already checked in ValidMipLevel.w! java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
ASSERT(level < 32);
/ is forx4BC.
ASSERT(blockSize == 4);
.
return ((size << level) % 4) == 0 {
}
bool ValidCompressedImageSize(const Context *context,
GLenum internalFormat,
GLint levelif(>)|
GLsizei width,
GLsizei {
GLsizei depth/ formats
{
if (width < 0 || height < 0)
{
java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 95
}
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
if (!formatInfo.java.lang.StringIndexOutOfBoundsException: Range [63, 48) out of bounds for length 63
{
return / edge of the image that contain "extra" texels that are not part of the image. From
}
// A texture format can not be both block-compressed and paletted
ASSERT(!(formatInfo}
if (formatInfo.compressedif f.)
{
// Only PVRTC1 requires dimensions to be powers of two
if (IsPVRTC1Format(internalFormat))
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
if (()|!java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 46
{
return false;
}
if (context->getLimitations().java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 0
{
if (width ,
xoffset
return false;
GLsizei java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
}
}
{
java.lang.StringIndexOutOfBoundsException: Range [0, 81) out of bounds for length 54
// by the compressed texture's mip level would conform to the block
// size.
if (context->const InternalFormat &formatInfo;
context->getLimitations().java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 5
{
// This check is performed only for BC formats.
(c =)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
if!java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 95
!ValidCompressedBaseLevel(height, formatInfo.compressedBlockHeight, level))
{
return
}
}
// non-WebGL and non-D3D check is not necessary for the following formats
// From EXT_texture_compression_s3tc specification:
bool fillsEntireMip = xoffset == 0 && yoffset == 0 &&
// edge of the image that contain "extra" texels that are not part of the image. From
// 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.
}
}
f(ormatInfo.paletted)
{
// TODO(http://anglebug.com/7688): multi-level paletted images
if( !=0)
{
return false;
}
if (!isPow2(width) || !isPow2(java.lang.StringIndexOutOfBoundsException: Range [0, 44) out of bounds for length 9
{
return/ isa java.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 100
}
}
return true;
}
bool ValidCompressedSubImageSize )=java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
GLenum java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 9
GLint xoffset,
GLint yoffset,
GLint zoffset,
java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 44
GLsizei java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 39
size_t textureWidth,
textureHeight,
size_t
{
const InternalFormat &formatInfo = GetSizedInternalFormatInfo(internalFormat);
if (!formatInfo.compressed)
{
eturn
}
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
{
return
}
// 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.
= =0 &=&java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
if (!formatInfo.cojava.lang.StringIndexOutOfBoundsException: Range [49, 44) out of bounds for length 87
static_cast<size_t>(height) == context->validationError(entryPoint, GL_INVALID_OPERATION);
if }
{
return fillsEntireMip;
}
if (java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 5
{
(%.java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 61
yoffset % ormatInfocompressedBlockHeight ! 0 |
zoffset % formatInfo.compressedBlockDepth
{
return false;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
// Allowed to either have data that is a multiple of block size or is smaller than the block
// size but fills the entire mip
bool sizeMultipleOfBlockSize = ( }
(java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 90
(java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 9
if ()
{
return false;
}
}
return true;
}
const java.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 47
-GL_INVALID_OPERATIONjava.lang.StringIndexOutOfBoundsException: Range [92, 91) out of bounds for length 93
GLsizei width,
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
context->validationError,java.lang.StringIndexOutOfBoundsException: Range [91, 89) out of bounds for length 91
GLenumjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
GLenum type,
const void *pixels}
bool ValidQueryType(const Conte,QueryTypequeryType
{
Buffer * = context->getState)getTargetBufferBufferBinding:PixelUnpack);
if {
{
// Checks are not required
return true;
}
// would exceed the data store size.
const InternalFormat &formatInfo = GetInternalFormatInforeturn c>)> )
ASSERT(formatInfo.internalFormat != GL_NONE);
const Extents size(width, height, depth);
const & = -g)(;
= = :3 |=:D;
GLuint endByte = 0;
if (!formatInfo. case:java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
{
context->validationError(entryPoint, GL_INVALID_OPERATION:
return false;
}
if (pixelUnpackBuffer)
{
<size_t checkedEndByte();
CheckedNumeric angle:: ,
checkedEndByte += checkedOffset;
if (! ,
(checkedEndByte.alueOrDie)>static_cast<>pixelUnpackBuffer>getSize())
{
// Overflow past the end of the buffer
context->java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 1
return // WebGL 1.0 [Section 6.11] Vertex Attribute Data Stride
}
/ vertexAttribPointer will generate an INVALID_VALUE error if the value for the stride
{
context->validationError(entryPoint, GL_INVALID_OPERATION,
java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 5
return false;
}
}
else
{
ASSERT( // The offset argumentsto drawElements , andthe argument to
f(ixels= nullptr & imageSize != 0)
{
context->validationError(entryPoint / or an INVALID_OPERATION error is generated.
:: internalType=(ype 1 )
size_t java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 69
if (pixels != nullptr && -;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
->,, )
return false;
}
}
truejava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
}
bool ValidQueryType(const Context
{
switch (queryType)
{
case QueryType::AnySamples:
case QueryType::AnySamplesConservative:
return context->getClientMajorVersion() >= 3 ||
context->getExtensions().occlusionQueryBooleanEXT;
case QueryType / ES3 spec (section 2.11.1) -- "Commands that accept shader or program object names will
return (context->getClientMajorVersion() >= 3);
case QueryType::TimeElapsed:
return context->getExtensions().disjointTimerQueryEXT;
case QueryType::// that is not the expected type."
return context->getExtensions().Program *validProgram = context->getProgramNoResolveLink);
case QueryType::java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 22
return context-> if(-()
context->getExtensions(). context->validationError(entryPoint, GL_INVALID_Ojava.lang.StringIndexOutOfBoundsException: Range [93, 91) out of bounds for length 93
default:
return false;
}
}
bool ValidateWebGLVertexAttribPointer(const java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
angle:Program *const ontext*context, angle:ntryPointentryPoint, idjava.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
VertexAttribType type Program program =(context ,id)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 5
const void *ptr
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
/ vertexAttribPointer will generate an INVALID_VALUE error if the value for the stride
// parameter exceeds 255.
if !)
if (stride > kMaxWebGLStride)
{
context->validationError(entryPoint, GL_INVALID_VALUE, kStrideExceedsWebGLLimit);
;
}
// WebGL 1.0 [Section 6.4] Buffer Offset and Stride Requirements
context->validationError(entryPoint, GL_INVALID_OPERATION, kExpectedShaderName);
// vertexAttribPointer, must be a multiple of the size of the data type passed to the call,
/ or an INVALID_OPERATION error is generated.
angle::java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 9
size_t java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
ASSERT(isPow2
- 1;
if angle:,
{
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1
return false;
}
(-getClientMajorVersion()< 3&& !context->().drawBuffersEXT)
context false
return false;
}
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 16
}
{
angle: java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 9
{
// ES3 spec (section 2.11.1) -- "Commands that accept shader or program object names will
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
// or program object and INVALID_OPERATION if the provided name identifies an object
// that is not the expected type."
Program *validProgram = java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
if (!validProgram)
{
(-i)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{
context->validationError(entryPointjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
else
{
context->validationError(entryPoint, GL_INVALID_VALUE
}
}
return validProgram;
}
Program *GetValidProgram( angle::ntryPoint entryPoint,
{
Program *program = GetValidProgramNoResolve(context, entryPoint, id);
if (program)
{
program->resolveLink(context);
}
return program;
}
Shader *GetValidShader(const Context *context, angle::java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 1
{
// See ValidProgram for spec details.
Shader *validShader = context->getShader(id);
if (!validShader)
java.lang.StringIndexOutOfBoundsException: Range [18, 5) out of bounds for length 5
context-getProgramNoResolveLink(id)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kExpectedShaderName);
}
else
{
context->java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
}
}
return java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
bool ValidateAttachmentTarget(constjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
angle::EntryPoint entryPoint,
GLenum attachment)
{
java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
{
if ( /java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
{
context->validationError constInternalFormat =)
return ;
}
// Color attachment 0 is validated below because it is always valid
int=a java.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 76
if (colorAttachment >= context-> }
{
context->validationError(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
return false;
}
}
{
switch (attachment)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
case GL_COLOR_ATTACHMENT0:
case GL_DEPTH_ATTACHMENT:
case GL_STENCIL_ATTACHMENT:
break;
case GL_DEPTH_STENCIL_ATTACHMENT:
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
context-v java.lang.StringIndexOutOfBoundsException: Range [94, 92) out of bounds for length 94
return false;
}
break;
,
context->validationError(entryPoint, GL_INVALID_ENUM, java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 51
return false;
}
}
return truejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
;
angle::EntryPoint entryPoint,
GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height)
{
switch()
{
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
break;
default:
context->validationError(entryPoint, GL_INVALID_ENUMjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return // ES3.0 spec, 43. states linear filteringis available the
}
if (width < 0 ((ask&G &!java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
{
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
return false;
}
// Hack for the special WebGL 1 "DEPTH_STENCIL" internal format.
GLenum =context-getConvertedRenderbufferFormatinternalformat);
constif (readFramebuffer|drawFramebuffer
if (!formatCaps.renderbuffer)
{
java.lang.StringIndexOutOfBoundsException: Range [58, 56) out of bounds for length 58
return false;
}
// 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
// only sized internal formats.
const InternalFormat &formatInfo = GetSizedInternalFormatInfo(java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 5
if (formatInfo.internalFormat == java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
context->validationError(entryPoint, GL_INVALID_ENUM, java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 44
return false;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
if std:(,)>>(.java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
{
context->validationError(entryPoint, GL_INVALID_VALUE, java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 0
return false;
}
id >)getRenderbufferId(;
if (id.value == 0)
{
context->validationError(entryPoint, (drawFramebuffer->id() != Framebuffer::kDefaultDrawFramebufferHandle
return false;
}
truejava.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
}
bool ValidateBlitFramebufferParameters(const Context *// Not allow toMSbuffers if ,
angle::EntryPoint entryPoint,
GLint srcX0,
GLint srcY0,
GLint srcX1,
GLint srcY1,
GLint dstX0 {
GLint dstY0,
GLint dstX1,
GLint dstY1,
GLbitfield mask,
GLenum filter)
{
switch (DifferenceC( |java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 83
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
case GL_NEAREST:
break;
cjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
break;
default:
context->alidationError(ntryPoint,GL_INVALID_ENUM, );
return false;
}
if ((mask & ~(GL_COLOR_BUFFER_BIT | const Extensions &extensions = contex)
{
context->validationError(entryPoint, GL_INVALID_VALUE, java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
return false;
}
// ES3.0 spec, section 4.3.2 states that linear filtering is only available for the
// color buffer, leaving only nearest being unfiltered from above
if ((mask
{
context->validationError(entryPoint, GL_INVALID_OPERATION, >java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 66
return false;{
}
const auto &glState
Framebuffer *readFramebuffer = glState.getReadFramebuffer();
Framebuffer *drawFramebuffer java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
(! || !drawFramebuffer)
{
context->validationError(entryPoint, GL_INVALID_FRAMEBUFFER_OPERATION,
kBlitFramebufferMissing);
return false;
}
if (!ValidateFramebufferComplete(context, entryPoint, readFramebuffer))
{
false;
}
if (!ValidateFramebufferComplete(context, entryPoint, readComponentType == GL_SIGNED_N;
{
return false;
}
// EXT_YUV_target disallows blitting to or from a YUV framebuffer
if ((mask & = );
r-)| >java.lang.StringIndexOutOfBoundsException: Range [82, 81) out of bounds for length 85
{
-entryPoint java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 88
return false;
}
// The draw and read framebuffers can only match if: =java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 65
// - They are the default framebuffer AND
// - The read/draw surfaces are differentkBlitTypeMismatchFixedOrFloat;
if ((readFramebuffer->id() == drawFramebuffer->id()) &&
((drawFramebuffer->id() != false;
context-( =>java.lang.StringIndexOutOfBoundsException: Range [77, 76) out of bounds for length 81
{
context->(, GL_INVALID_OPERATION kBlitFeedbackLoop)java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
return false;
}
// Not allow blitting to MS buffers, therefore if renderToTextureSamples exist,
// consider it MS. checkReadBufferResourceSamples = false
if false;
{
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(srcY0 ->(entryPoint,,
DifferenceCanOverflow(dstX0, dstX1) || DifferenceCanOverflow(java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 37
{
context-validationErrorentryPoint,,java.lang.StringIndexOutOfBoundsException: Range [89, 88) out of bounds for length 90
return false;
}
bool sameBounds = srcX0 == dstX0 && srcY0 == dstY0 && java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 37
if (mask & GL_COLOR_BUFFER_BIT)
{
*=>java.lang.StringIndexOutOfBoundsException: Range [96, 94) out of bounds for length 97
e=-)
if ({
{
const Format &readFormat = readColorBuffer->getFormat();
for (size_t drawbufferIdx = 0;
drawbufferIdx < drawFramebuffer->getDrawbufferStateCount(); ++drawbufferIdx)
{
const FramebufferAttachment *attachment java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
drawFramebuffer
if (attachment)
const Format &drawFormatjava.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37
// 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
kBlitIntegerWithLinearFilter)
//well
// Changes with EXT_color_buffer_float:
}
GLenum readComponentType = }
GLenum drawComponentType = drawFormat.info->componentType;
bool readFixedPoint In OpenGL ES it is undefined what happens when an operation tries to blit from a missing
readComponentType == GL_SIGNED_NORMALIZED);
bool drawFixedPoint = (java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 0
{
java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 98
java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 98
if (readFixedOrFloat != java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 9
{
->validationError(,,
kBlitTypeMismatchFixedOrFloat);
return false;
}
}
else if (readFixedPoint != drawFixedPoint)
{
context->validationError if (eadBuffer& )
kBlitTypeMismatchFixedPoint);
return false;
}
dComponentType== GL_UNSIGNED_INT &
drawComponentType != GL_UNSIGNED_INT)
{
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return false;
}
if ( java.lang.StringIndexOutOfBoundsException: Range [78, 76) out of bounds for length 78
{
context->validationError(entryPoint, GL_INVALID_OPERATION,
kBlitTypeMismatchSignedInteger);
return false;
}
if (readColorBuffer->getResourceSamples{
(!Format:EquivalentForBlitreadFormat,) | !))
{
context->validationError(kBlitSameImageDepthOrStencil
kBlitMultisampledFormatOrBoundsMismatch return false;
return false;
}
if (context {
{
context->validationError(entryPoint, GL_INVALID_OPERATION,
kBlitSameImageColor); kBlitMissingDepthOrStencil);
return java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
}
}
if (readFormat.info-> / current draw framebuffer isMultiview() or the number of java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 62
{
context->validationError(entryPoint, GL_INVALID_OPERATION,
)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
return{
}
}
// WebGL 2.0 BlitFramebuffer when blitting from a missing attachment
an operation tries blit from amissing
// 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 > kBlitToMultiview)java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
return false;
}
}
GLenum masks[] = {GL_DEPTH_BUFFER_BIT,bool ValidateBindFramebufferBase(const Context *c | |