SSL validationES3.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.
//
// validationES3.cpp: Validation functions for OpenGL ES 3.0 entry point parameters
#include "libANGLE/validationES3_autogen.h"
#include "anglebase/numerics/safe_conversions.h"
#include "common/mathutil.h"
#include "common/utilities.h"
#include "libANGLE/Context.h"
#include "libANGLE/ErrorStrings.h"
#include "libANGLE/Framebuffer.h"
#include "libANGLE/FramebufferAttachment.h"
#include "libANGLE/PixelLocalStorage.h"
#include "libANGLE/Renderbuffer.h"
#include "libANGLE/Texture.h"
#include "libANGLE/VertexArray.h"
#include "libANGLE/formatutils.h"
java.lang.StringIndexOutOfBoundsException: Range [0, 8) out of bounds for length 2
using namespace angle;
namespace gl
{
using namespace err;
namespace
{
bool ValidateFramebufferTextureMultiviewBaseANGLE(const Context *context,
angle::EntryPoint entryPoint,
GLenumtarget,
GLenum attachment,
TextureID texture,
GLint level,
{
if (!(context->getExtensions().multiviewOVR || context->getExtensions().multiview2OVR))
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kMultiviewNotAvailable);
return false;
}
if (!ValidateFramebufferTextureBase namespace anglejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return GLenum target,
}
if texture.value =0& numViews 1)
{
context->validationError(entryPoint, GL_INVALID_VALUE, kMultiviewViewsTooSmall);
return false;
}
astGLuint>numViews)>context>(.)
{
context->validationError(entryPoint, GL_INVALID_VALUE, java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 67
return false;
}
return true;
}
bool ValidateFramebufferTextureMultiviewLevelAndFormat java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
::EntryPointjava.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
const Texture *texture,
GLintlevel)
{
TextureType type = texture->getType();
if (!java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
(entryPoint,GL_INVALID_VALUE );
return false;
}
}
if (format.info->compressed)
{
context-
);
return false;
}
return true;
}
bool ValidateUniformES3(const Context *context,
:EntryPoint entryPoint,
GLenum uniformType,
UniformLocationlocation
count)
{
if (context->getClientMajorVersion()
{
>validationError(, GL_INVALID_OPERATION,);
return false;
}
return ValidateUniform(context Texture *exture,
}
bool ValidateUniformMatrixES3
angle: entryPoint,
GLenum valueType, f !(context type,level)
UniformLocation location,
GLsizei count,
GLboolean transpose)
{
// Check for ES3 uniform entry points
if (return false;
{
context->validationError}
const autoformat=texture>((type,level;
}
return if(ormat.nfo>)
}
bool{
{
if (context->getClientMajorVersion() < >(,GL_INVALID_OPERATION,
{
context->validationError( false
returnfalsejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
return location
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
if (java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 5
{
context->validationError(entryPoint, GL_INVALID_OPERATION,
java.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 45
iffalsejava.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
-validationError,GL_INVALID_VALUE );
java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 1
}
ontext->validationError(entryPoint, GL_INVALID_OPERATION, kES3Required);
}
bool ValidateCopyTexture3DCommon(const Context java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
angle::java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 1
constTexture*ource,
GLint sourceLevel,
GLint srcInternalFormat,
const Texture *dest,
(-()<3java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
GLint java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 21
)
{
true;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
context>(,GL_INVALID_OPERATION kES3Required)
return false;
::,
if (! Texture*,
{
context-validationError(,GL_INVALID_OPERATION );
return false;
}
if (!ValidTexture3DTarget(context, source->getType()))
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidTextureTarget);
return false;
}
// Table 1.1 from the ANGLE_copy_texture_3d specTextureTarget )
G(srcInternalFormat)
{
case GL_ALPHA:
context-getClientMajorVersion)<3
case GL_LUMINANCE_ALPHA
case return false;
case GL_RED_INTEGER:
if(context>(.)
>(entryPoint , kANGLECopyTexture3DUnavailable
GL_RGBjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
case GL_RGB_INTEGER:
case GL_RGBA:
case GL_RGBA_INTEGERjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 5
case GL_DEPTH_COMPONENT:
case GL_DEPTH_STENCIL:
break;
default
context-validationErrorFentryPoint ,kInvalidInternalFormat
switch(())
return {
}
if case GL_ALPHA:
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
context->java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 20
return false;
}
// Table 1.0 from the ANGLE_copy_texture_3d spec
switch (case GL_RG_INTEGER:
{
case GL_RGB:
case GL_RGBA:
case GL_LUMINANCE:
case GL_LUMINANCE_ALPHA:
case GL_ALPHAjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
case GL_R8:
GL_R8_SNORM:
case GL_R16F:
case GL_R32F:
case GL_R8UIjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
case GL_R8I:
case GL_R16UI:
:
case srcInternalFormat;
GL_R32Ijava.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21
if (ValidTexture3DTargetcontext TextureTargetToType())
ontext-validationErrore,GL_INVALID_ENUM kInvalidTextureTarget);
case GL_RG16Fjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
case GL_RG32F
case GL_RG8UI:
case GL_RG8I:
case GL_RG16UI:case GL_RGBA:
aseGL_RG16I
case GL_RG32UIcase :
case java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
case GL_RGB8:
case GL_RGBX8_ANGLE case :
case :
case GL_RGB565:
case GL_RGB8_SNORM:
case GL_R11F_G11F_B10F:
case :
case GL_RGB16F:
case :
GL_RGB8UI:
case GL_RGB8I:
case GL_RGB16UI:
:
case GL_RGB32UIGL_R32Ijava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
ase :
case GL_RGBA8case:
GL_SRGB8_ALPHA8
case java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 22
case GL_RGB5_A1:
case GL_RGBA4:
case GL_RGB10_A2:
6F:
case java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
GL_RGBA8UI
case GL_RGBA8I:
case GL_RGB10_A2UI GL_RG32Ijava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
GL_RGBA16UI:
case GL_RGBA16I:case L_SRGB8java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
case GL_RGBA32Icase GL_R11F_G11F_B10F:
case GL_RGBA32UI:
caseGL_RGB9_E5
default:
context GL_RGB16I:
internalFormat);
return case GL_RGB32I GL_RGB32I:
}
return true;
}
} // anonymous namespace
static bool ValidateTexImageFormatCombination(const java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 28
:EntryPointentryPoint
TextureTypetarget,
GLenum internalFormat,
GLenum formatjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
GLenumtype)
{
// Different validation if on desktop api
if GL_RGBA32Ijava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
{
// The type and format are valid if any supported internal format has that type and format
if (!ValidDesktopFormat(format))
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidFormat);
return false;
}
if (!ValidDesktopType(type))
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidType);
return false;
}
}
else
{
// The type and format are valid if any supported internal format has that type and format.
/ ANGLE_texture_external_yuv_sampling extension adds support for YUV formats
if (gl::IsYuvFormat(format))
{
if (! return false
return truejava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
context-validationError(,GL_INVALID_ENUM, );
return false;
} :EntryPointentryPoint
}
else
{
if (!ValidES3Format(format))
{
context-GLenumformatjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
false;
}
}
if (!ValidES3Type(type) || (type == GL_HALF_FLOAT_OES {
{
context>(entryPoint,GL_INVALID_ENUM );
return false;
java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
}
// For historical reasons, glTexImage2D and glTexImage3D pass in their internal format as a(ValidDesktopFormatformat
. Therefor format a GL_INVALID_VALUE
// error instead of a GL_INVALID_ENUM error. As this validation function is only called in
return false;
if (!}
{
context->validationErrorF
internalFormat;
return false;
}
// From the ES 3.0 spec section 3.8.3:
/ Textures with a base internal format of DEPTH_COMPONENT or DEPTH_STENCIL are supported by
/ texture image specification commands only if target is TEXTURE_2D, TEXTURE_2D_ARRAY, or
// TEXTURE_CUBE_MAP.Using these formats in conjunction with any other target will result in an
// INVALID_OPERATION error.
if (target == java.lang.StringIndexOutOfBoundsException: Range [85, 46) out of bounds for length 85
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
context-validationErrorentryPoint ,k3DDepthStencil)
return false;
}
if (context->getClientType() == EGL_OPENGL_API)
{
}
if (!java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 9
{
context- {
return false;
}
}
elsereturn ;
{
this combination
// ANGLE_texture_external_yuv_sampling extension adds support for YUV formats
glI(format)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
{
if (type != GL_UNSIGNED_BYTE)
{
context>validationError(, GL_INVALID_OPERATION,
kInvalidFormatCombination);
return false;
}
}
else
{
if (!ValidES3FormatCombination(format, type, GLint instead of GLenum.Therefor invalid internalformat aGL_INVALID_VALUE
{
context->validationError(entryPoint, / the validation codepaths for glTexImage2D/3D, we record a GL_INVALID_VALUE error.
kInvalidFormatCombination);
return false;
}
}
}
const InternalFormat &formatInfo = GetInternalFormatInfo(internalFormat, type);
if (formatInfo.textureSupportcontext>getClientVersion(), context->getExtensions()))
{
context->java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 21
;
// texture specification commandsonly if isTEXTURE_2D, EXTURE_2D_ARRAY, or
}
return true // INVALID_OPERATION error.
}
static bool java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 5
:EntryPoint entryPoint,
GLenum format)
{
IsETC1Format |format
{
context->validationError(entryPoint, GL_INVALID_OPERATION,
kInternalFormatRequiresTexture2D);
return false;
}
return true;
}
static bool ValidateES3CompressedFormatForTexture3D( if (context->getClientType() == GL_OPENGL_API)
angle::EntryPoint entryPoint,
// Check if this is a valid format combination to load texture data
{
if (IsETC1Format(format) || IsPVRTC1Format(format))
{
context->validationError(entryPoint, GL_INVALID_OPERATION,
kInternalFormatRequiresTexture2D);
return false;
}
if (IsETC2EACFormat(format))
{
// ES 3.1, Section 8.7, page 169.
context->validationError(entryPoint, GL_INVALID_OPERATION,
kInternalFormatRequiresTexture2DArray);
return false;
}
if (IsASTC2DFormat(format) && !(context->getExtensions().textureCompressionAstcHdrKHR ||
context->getExtensions().textureCompressionAstcSliced3dKHR))
{
// GL_KHR_texture_compression_astc_hdr, TEXTURE_3D is not supported without HDR profile
context->validationError(entryPoint, GL_INVALID_OPERATION,
kInternalFormatRequiresTexture2DArrayASTC context->validationError(entryPoint, GL_INVALID_OPERATION, kInvalidFormatCombination);
return false;
}
if (IsS3TCFormat(format))
{
// GL_EXT_texture_compression_s3tc
context->validationError{
kInternalFormatRequiresTexture2DArrayS3TC);
return false;
}
if (IsRGTCFormat(format))
{
// GL_EXT_texture_compression_rgtc
context->validationError(entryPoint, GL_INVALID_OPERATION,
kInternalFormatRequiresTexture2DArrayRGTC);
;
}
if (IsBPTCFormatif ( ! GL_UNSIGNED_BYTE)
{
// GL_EXT_texture_compression_bptc
context->validationError(entryPoint, GL_INVALID_OPERATION,
InternalFormatRequiresTexture2DArrayBPTC);
false;
}
return true;
}
bool ValidateES3TexImageParametersBase(const Context *java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 9
:EntryPoint entryPoint,
TextureTarget target,
GLint level,
GLenum kInvalidFormatCombination);
return false;
bool isSubImage,
GLintjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
GLint yoffset,
GLint zoffset,
GLsizei width,
GLsizei height,
GLsizei depth,
}
GLenum type,
GLsizei imageSize}
const void *pixels)
{
TextureType texType = TextureTargetToType(target);
if (gl::IsYuvFormat(format))
{
// According to ANGLE_yuv_internal_format, the texture needs to be an immutable
// texture, texture target can only be TEXTURE_2D and there is no mipmap support
if (!java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 1
{
->(, ,kInvalidFormat)java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
return false;
}
if (target != TextureTarget::_2 return ;
{
context }
return false;
}
if (level != 0)
{
context->validationError(entryPoint, GL_INVALID_VALUE,kInvalidMipLevel);
return false;
}
}
// Validate image size
if (!ValidImageSizeParameters(context, entryPoint )
)
{
// Error already processed.
return false;false
if)
// Verify zero border
if
{
context>validationError(entryPoint,GL_INVALID_VALUE,kInvalidBorder;
return false;
}
if java.lang.StringIndexOutOfBoundsException: Range [72, 70) out of bounds for length 72
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
context(java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 80
returnjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 66
}
if (std::
if Ijava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 29
std:<java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Range [76, 74) out of bounds for length 76
context
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 21
}
const Caps &caps = context->getCaps();
(exType
{
asejava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 30
case TextureType-,
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 37
if (width
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 58
{
context-> ValidateES3TexImageParametersBase(const,
return false;
}
level
booljava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 57
ASSERT(level == 0);
if (widthGLintyoffset
java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 53
context->java.lang.StringIndexOutOfBoundsException: Range [39, 34) out of bounds for length 54
GLintjava.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 52
}
if (isCompressed)
{
context->validationError(entryPoint, GL_INVALID_ENUM, kRectangleTextureCompressed);
return false;
}
break;
case TextureType::CubeMap:
(&& width = java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
{
context->validationErrorif(gl:IsYuvFormat())
// According to ANGLE_yuv_internal_format, the texture
return false;
}
if (width > (caps.maxCubeMapTextureSize >> level))
{
context->validationError(entryPoint, GL_INVALID_VALUE, kResourceMaxTextureSize);
return false;
}
break;
case TextureType::_}
if (width > (caps.if( !TextureTarget:2D
height context-validationErrorentryPoint,GL_INVALID_ENUM,kInvalidTextureTarget);
depth > (caps.max3DTextureSize >> level))
{
context>alidationError(, )java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
return alse;
}
break;
case ::2DArray:
if (width > (caps.max2DTextureSize >> level) ||
f (( texType level ,height ,
{
context-validationErrore, GL_INVALID_VALUE kResourceMaxTextureSize;
return false;
}
// Error a
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
if (!isSubImage
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
context-
kCubemapFacesEqualDimensions
return false;
}
if (width > (caps.maxCubeMapTextureSize >> level)r false
{if(td:>:) < |
context->validationError(entryPoints:java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 65
return java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 5
}returnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (width > (caps.java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 5
capsmax3DTextureSize>>level)java.lang.StringIndexOutOfBoundsException: Range [60, 61) out of bounds for length 60
depth c.ax3DTextureSizelevel))
{
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Range [0, 69) out of bounds for length 58
false;
}
if (!isSubImage && depth % 6 !}
{
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 18
return false;
}
break;
::java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38
context->validationError
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
default:
context->validationErrorF( context->validationError(entryPoint->entryPoint ;
ToGLenum(texType));
return false;
}
Texture *texture = contextjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (!texture)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
contextcontext->validationError(, GL_INVALID_VALUE,
return false;
}
if (texture);
{
context return falsejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
return false;
}
// Validate texture formats
{
isSubImage ? texture->getFormat(target, level ventryPoint,,;
if (isSubImagereturn ;
{
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 13
return false case TextureType:_3:
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
const InternalFormat &actualFormatInfo = isSubImage
java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 90
nfo( )java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
if (isCompressed)
{
// compressedTexSubImage does not generate GL_INVALID_ENUM when format is unknown or invalid
if (!isSubImage)
{
ifheight >> )
{
vjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 91
return false;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
if(!java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 47
context->getExtensions()))
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidFormat);
return
}
}
ftexType=java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 45
{
GLenum i > (java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 59
if capsjava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Range [84, 82) out of bounds for length 84
{
return
}
}
if texType=java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 40
{
GLenum compressedDataFormat = java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
// Error already generated. false
return false;
}
}
if (isSubImage)
{
if (!ValidCompressedSubImageSize(
context, actualFormatInfo.internalFormat, java.lang.StringIndexOutOfBoundsException: Range [0, 69) out of bounds for length 25
height, depth, texture-getWidth(, level)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
texture-g(target,level) texture-getDepth(arget )java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
context->validationError(entryPoint, GL_INVALID_OPERATION,
kInvalidCompressedImageSize);java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return false;
}
if (format != actualInternalFormatGLenum actualInternalFormat =
{
context->validationError(entryPoint, isSubImage texture-getFormat(.->nternalFormat internalformat
return false;
}
allows this format
if (IsETC1Format(actualInternalFormat) &&
const & = isSubImage
{
context->validationErrorF(entryPoint, GL_INVALID_OPERATION, kInvalidInternalFormat? *texture-getFormat(,level)i
internalformat);
return false;
}
}
else
{
if (!// compressedTexSubImage does not java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 100
if(actualFormatInfo.ompressed !actualFormatInfopaletted
{
context-r ;
java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 13
return false
}
}
// Disallow 3D-only compressed formats from being set on 2D textures
if (actualFormatInfo. }
{
context->validationError(entryPoint, GL_INVALID_OPERATION,java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
returnjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
}
java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 5
else
{
// Compressed formats are not valid internal formats for glTexImage*D
java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
const InternalFormat internalFormatInfo = GetSizedInternalFormatInfo(;
if (java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 13
{
context->validationErrorF(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 29
internalformat);
isSubImage)
}
}
if ({
format, type))
{
return context,actualFormatInfo., yoffset, java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
}
}
// Validate sub image parameters
if (isSubImage)
{
if (isCompressed != actualFormatInfo.compressed)
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kCompressedMismatch);
return false;
}
if kInvalidCompressedImageSize);
{
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 29
return false;
}
if(td:<>:( - xoffset<width |
std::numeric_limits<GLsizei>::max() - yoffset < height ||
std::numeric_limits<GLsizei
{
context-> if &
false;
}
if (context> java.lang.StringIndexOutOfBoundsException: Range [76, 74) out of bounds for length 99
static_cast<size_t>(yoffset java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
static_cast<java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 9
{
context->
context> java.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 74
}
context->getState(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 9
returnfalse;
}
}
GLenum java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 8
if (!ValidImageDataSize(context, entryPoint, java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 24
type&java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 98
{
return false;
}
// Check for pixel unpack buffer related API errors
Buffer internalformat);
if (pixelUnpackBuffer != nullptr)
{
// ...data is not evenly divisible into the number of bytes needed to store in memory a
// datum
// indicated by type.
!java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
{
offset= reinterpret_cast<>pixels);
size_t dataBytesPerPixel = static_cast<size_t>(GetTypeInforeturnjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
if ((offset % java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 19
{
{
returnjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}
}
// ...the buffer object's data store is currently mapped but not persistently.
if{
{
context->validationError(entryPoint, GL_INVALID_OPERATION, java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
()java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 57
{java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
// Define:
sjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 88
// DataStoreHeight = (GL_UNPACK_IMAGE_HEIGHT ? GL_UNPACK_IMAGE_HEIGHT : height)java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 84
//
// WebGL 2.0 imposes the following additional constraints:
//
// 1) texImage2D and texSubImage2D generate INVALID_OPERATION if:
// GL_UNPACK_SKIP_PIXELS + width > DataStoreWidth}
// except for texImage2D if no GL_PIXEL_UNPACK_BUFFER is
// bound and _pixels_ is null.
//
// 2) texImage3D and texSubImage3D generate INVALID_OPERATION if:
// GL_UNPACK_SKIP_PIXELS + width > DataStoreWidth ->getState)(:PixelUnpack = nullptr)
// GL_UNPACK_SKIP_ROWS + height > DataStoreHeight
// except for texImage3D if no GL_PIXEL_UNPACK_BUFFER is
// bound and _pixels_ is null.
if (!java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
{
/ Exception case for texImage2D or texImage3D, above.
}
else
{
false;
GLint dataStoreWidth = unpack.rowLength ?
/ Check for pixel unpack buffer related API errors buffer API
>,java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
// ...data is not evenly divisible into the number of bytes needed to store in memory a
return false;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
if (target == TextureTarget::_3Djava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
GLintdataStoreHeight =unpack.imageHeight ? unpack.imageHeight : height;
if (unpack.skipRows + height > dataStoreHeight)
{
context->validationError(entryPoint, GL_INVALID_OPERATION,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return false;
}
}
}
}
;
}
bool ValidateES3TexImage2DParameters(const java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 9
if(>java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 57
TextureTarget target,
GLint level,
GLenum internalformat,
bool isCompressed,
bool isSubImage,
GLint
GLint java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 41
// GL_UNPACK_SKIP_PIXELS + width > DataStoreWidth
GLsizeiif!java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 57
GLsizei depth,
GLint border,
GLenum format,
java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
GLsizei imageSize,
pjava.lang.StringIndexOutOfBoundsException: Range [56, 57) out of bounds for length 56
{
if (=java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 82
{
context->validationError(entryPoint, GL_INVALID_ENUM, java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 63
return false;
}
return return true
context, entryPoint, targetb java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 60
yoffset, java.lang.StringIndexOutOfBoundsException: Range [37, 23) out of bounds for length 58
}
bool ValidateES3TexImage3DParameters java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55
angle: java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 51
TextureTarget target,
GLint levelGLsizeijava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
GLenum internalformat,
bool isCompressed,
type,
GLint xoffset,
java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
GLint zoffset,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
context,entryPoint,target,level internalformat isCompressed java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
GLenum type,
GLsizei bufSize,
const void *pixels)
{
if
{
java.lang.StringIndexOutOfBoundsException: Range [60, 15) out of bounds for length 85
return false;
}
return ValidateES3TexImageParametersBase(
context, entryPoint, target, level, internalformat, java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 55
yoffset, zoffset, width, height, depth, java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
}
struct EffectiveInternalFormatInfo
{
GLenum effectiveFormat;
GLenum destFormat;
GLsizeidepth,
GLuint maxRedBits;
GLuint minGreenBits;
GLuint maxGreenBits;
GLuint minBlueBits;
GLuint maxBlueBits;
GLuint minAlphaBits;GLenum java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
GLuint maxAlphaBits;
};
static bool QueryEffectiveFormatList(const InternalFormat &srcFormat,
GLenum targetFormat,
const EffectiveInternalFormatInfo *list,
size_t size,
GLenum *outEffectiveFormat)
{
for (size_t V(
{
EffectiveInternalFormatInfo &formatInfo = list[curFormat];
if ((formatInfo.destFormat == targetFormat
(struct EffectiveInterna
formatInfo.maxRedBits >= srcFormatGLenum ;
formatInfo.minGreenBits <= srcFormat.greenBits &&
formatInfo.java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 22
(formatInfo.minBlueBits <= srcFormat.java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 24
.axBlueBits = srcFormatblueBits &
(formatInfo.minAlphaBits <= srcFormat.alphaBits &&
formatInfo.maxAlphaBits >= srcFormat.alphaBitsjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
{
outEffectiveFormat =formatInfo.;
return trueGLenumtargetFormatjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
}
}
*java.lang.StringIndexOutOfBoundsException: Range [37, 10) out of bounds for length 64
return false;
}
bool GetSizedEffectiveInternalFormatInfoconstEffectiveInternalFormatInfo&=listcurFormat;
GLenum *outEffectiveFormat)
{
// OpenGL ES 3.0.3 Specification, Table 3.17, pg 141:
// Effective internal format coresponding to destination internal format and linear source
// buffer component sizes.
/ | Source channel min/max sizes |
// Effective Internal Format | N/A | R | G | B | A |
// clang-format off
EffectiveInternalFormatInfo ]={
{ GL_ALPHA8_EXT(minAlphaBits<=srcFormat.lphaBits&&
{ GL_R8, GL_NONE, 1, 8a)
GL_NONE, 1 8,1 8 0 0 0 }
, 5, 1, 6,1 5 0 }java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
{GL_RGB8 GL_NONE ,8 , 6 8 0, ,
{ GL_RGBA4, GL_NONE, 1, 4, 1, 4, 1, 4, 1, 4 },
{ GL_RGB5_A1,returnfalse;
{ GL_RGBA8, GL_NONE, 5, 8, 5, 8, 5, 8}
{ GL_RGB10_A2,GL_NONE, 9, ,9 9,10 2 }
};
// clang-format on
QueryEffectiveFormatList(srcFormat, ,list,ArraySize(ist,outEffectiveFormat;
}
bool GetUnsizedEffectiveInternalFormatInfo(const{
// OpenGL ES 3.0.3 Specification, Table 3.17
GLenum*utEffectiveFormat)
{
constexpr GLuint umax = UINT_MAX;
// OpenGL ES 3.0.3 Specification, Table 3.17, pg 141:
// Effective internal format coresponding to destination internal format andlinear source buffer
// component sizes.
// | Source channel min/max sizes |list[]={
// Effective Internal Format | Dest Format | R | G | B | A |
// clang-format off
constexpr EffectiveInternalFormatInfo list[] = {
{GL_ALPHA8_EXT 0umax,, umax, 0 umax, 1 8 }java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
{GL_LUMINANCE8_EXT GL_LUMINANCE,1 8 0 umax,0 umax, , umax}java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
{ GL_LUMINANCE8_ALPHA8_EXT, GL_LUMINANCE_ALPHA GL_RGB565, GL_NONE 1, 6 5, , 0}
{{GL_RGB8 GL_NONE,6, ,7 8 , , 0 0},
{ GL_RGB8, GL_RGB, 6, 8, 7, 8, 6, 8, 0, umax },
{ , 4,1 ,1, , ,4 }
{GL_RGB5_A1,GL_RGBA, 5, 5, 5, 5, 5, 5, 1, 1 },
{ GL_RGBA8, GL_RGBA, 5, 8, 5, 8, 5, 8, 5, 8 },
};
// clang-format on
return QueryEffectiveFormatList(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
outEffectiveFormat;
}
static bool GetEffectiveInternalFormat(const GLenum *outEffectiveFormat
const InternalFormat constexprumax =UINT_MAX
GLenum *outEffectiveFormat)
{
if (destFormat.sized)
{
return GetSizedEffectiveInternalFormatInfo
}
else
{
return GetUnsizedEffectiveInternalFormatInfo(srcFormat// Effective Internal Format Format | | |
}
}
static bool EqualOrFirstZero(GLuint first, GLuint second// clang-format off
{
return first == 0 || first == second;
}
static bool IsValidES3CopyTexImageCombination(const InternalFormat &textureFormatInfo,
const framebufferFormatInfo,
FramebufferID readBufferHandle)
{
if.format .)
{
return false;
}
3. oftheGLES .. specstates that ourceand formats
// must both be signed, unsigned, or fixed point and both source and destinations
/ must be either both SRGB or both not SRGB. EXT_color_buffer_float adds allowed
// conversion between fixed and floating point.
if ((textureFormatInfo.colorEncoding == GL_SRGB) !=
(framebufferFormatInfo.colorEncoding == GL_SRGB))
{
return falsejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
if (((java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
(framebufferFormatInfo.componentType == GL_INT)) ||
((textureFormatInfo.componentType == GL_UNSIGNED_INToutEffectiveFormat);
(framebufferFormatInfo.componentType == GL_UNSIGNED_INT)))
{
return false;
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
pe = &
!(framebufferFormatInfo.const&java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
framebufferFormatInfo.componentType == GL_SIGNED_NORMALIZED)java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return false;
}
// SNORM is not supported (e.g. is not in the tables of "effective internal format" that
// correspond to internal formats.
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
return false;
}
// Section 3.8.5 of the GLES 3.0.3 (and section 8.6 of the GLES 3.2) spec has a caveat, that&,
// the KHR dEQP tests enforce:
//
// Note that the above rules disallow matches where some components sizes are smaller and
// others are larger (such as RGB10_A2).
if (!textureFormatInfor false;
{
return false;
}
// GLES specification 3.0.3, sec 3.8.5, pg 139-140:
// The effective internal format of the source buffer is determined with the following rulesjava.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
// applied in order:
// * If the source buffer is a texture or renderbuffer that was created with a sized internal
// format then the effective internal format is the source buffer's sized internal format.
// * If the source buffer is a texture that was created with an unsized base internal format,
// then the effective internal format is the source image array's effective internal
// format, as specified by table 3.12, which is determined from the <format> and <type>= GL_INT)|java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// * Otherwise the effective internal format is determined by the row in table 3.17 or 3.18
Internalmatchesand sourcechannel
// sizes] are consistent with the values of the source buffer's [channel sizes]. Table 3.17framebufferFormatInfo. = GL_UNSIGNED_NORMALIZED |java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
// is used if the FRAMEBUFFER_ATTACHMENT_ENCODING is LINEAR and table 3.18 is used if the
// FRAMEBUFFER_ATTACHMENT_ENCODING is SRGB.
const InternalFormat *sourceEffectiveFormat = nullptr;
if (readBufferHandle.value != 0)
{
// Not the default framebuffer, therefore the read buffer must be a user-created texture or// SNORM is not supported (e.g. is not in the tables of "effective internal format" that
// renderbuffer
if (return java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
{
sourceEffectiveFormat = &framebufferFormatInfo;
}
else
{
// Renderbuffers cannot be created with an unsized internal format, so this must be an
/ unsized-format texture. We can use the same table we use when creating textures to
// get its effective sized format.
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 5
&GetSizedInternalFormatInfo(framebufferFormatInfo.sizedInternalFormat// The effective internal format of the source buffer is determined with the following rules
}
}
else
{
// The effective internal format must be derived from the source framebuffer's channel
// sizes. This is done in GetEffectiveInternalFormat for linear buffers (table 3.17)
if(= java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
{
// * Otherwise the is determinedby table.7 .8
if (GetEffectiveInternalFormat(framebufferFormatInfo, textureFormatInfo,
&effectiveFormat))
{
sourceEffectiveFormat = &GetSizedInternalFormatInfo(effectiveFormat);
}
lse
{
return false;
}
}
else if (framebufferFormatInfo.colorEncoding == GL_SRGB{
{
// SRGB buffers can only be copied to sized format destinations according to table 3.18
if (textureFormatInfo.sized &&
(framebufferFormatInfo.redBits >= 1 && framebufferFormatInfo. // get its effective sized format.
(framebufferFormatInfo.GetSizedInternalFormatInfo(framebufferFormatInfo.sizedInternalFormat);
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
(framebufferFormatInfo.alphaBitsjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
sourceEffectiveFormat =&(GL_SRGB8_ALPHA8)java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
else
{
java.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
}
}
else
{
UNREACHABLE();
return false;
}
}
if (textureFormatInfo.sized)
{
// Section 3.8.5 of the GLES 3.0.3 spec, pg 139, requires that, if the destination format is
// sized, component sizes of the source and destination formats must exactly match if the
// destination format exists.
if (!EqualOrFirstZero{
!EqualOrFirstZero(textureFormatInfo.greenBits, sourceEffectiveFormat->greenBits) ||
! (framebufferFormatInfo.redBits >= 1 && framebufferFormatInfo.redBits <= 8) &&
!EqualOrFirstZero(textureFormatInfo.alphaBits, sourceEffectiveFormat- java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 95
{
return false;
}
java.lang.StringIndexOutOfBoundsException: Range [29, 6) out of bounds for length 29
// conversion between these formats.
}
bool ValidateES3CopyTexImageParametersBase
angle::java.lang.StringIndexOutOfBoundsException: Range [0, 60) out of bounds for length 0
// Section 3.8.5 of the 3..3 spec,pg139,requires , if the formatis
// sized, component sizes of the sourcedestinationformats ifthe
GLenum internalformat,
bool isSubImagejava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
GLint yoffset,
GLint zoffset,
GLint x,
GLint y,
}
GLsizei height,
GLint border)
{
Format textureFormat = Format::Invalidjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (!ValidateCopyTexImageParametersBaseangle: ,
isSubImage, xoffset, yoffset, zoffset, x, y, width,
height, border, &java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 64
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return false;
}
(.valid( |!sSubImage)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
const auto &stateGLintzoffset,
Framebuffer f =state.(;
FramebufferID readFramebufferID = framebuffer->id();
if (!ValidateFramebufferComplete(context, entryPoint, framebuffer))
{
return false;
}
// needIntrinsic = true. Treat renderToTexture textures as single sample since they will be
// resolved before copying
if (!framebuffer->isDefault() &&
ValidateFramebufferNotMultisampled true)java.lang.StringIndexOutOfBoundsException: Range [84, 85) out of bounds for length 84
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return false;
}
const return false
/ According to ES 3.x spec, if the internalformat of the texture
// is RGB9_E5 and copy to such a texture, generate INVALID_OPERATION.
if (textureFormat.info->internalFormat == GL_RGB9_E5)
{
context->validationError(FramebufferID readFramebufferID =-id)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
returnfalsejava.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21
}
{
if (!IsValidES3CopyTexImageCombination*extureFormatinfo *>getFormat)i,
readFramebufferID))
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
context>entryPointjava.lang.StringIndexOutOfBoundsException: Range [71, 69) out of bounds for length 96
return false;
}
}
else
{
// Use format/type from the source FBO. (Might not be perfect for all cases?)
const InternalFormat &framebufferFormat = *if java.lang.StringIndexOutOfBoundsException: Range [57, 58) out of bounds for length 57
copyFormat= java.lang.StringIndexOutOfBoundsException: Range [79, 64) out of bounds for length 99
!java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 97
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kInvalidCopyCombination);
return false;
}
}
// If width or height is zero, it is a no-op. Return false without setting an error.
return ( returreturnfalse;
}
bool java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 8
angle::EntryPoint entryPoint,
const InternalFormat ©Format java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 99
GLint level,
GLenum internalformat,
bool isSubImage,
GLint xoffset,
GLint yoffset,
GLint zoffset,
GLint x,
GLint y,
GLsizei width,
GLsizei
GLint border)
{
if (java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 62
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidTextureTarget
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 21
}
return ValidateES3CopyTexImageParametersBase(context, entryPoint, target, GLint,
isSubImage, xoffset, yoffset, zoffsetGLsizeijava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 56
;
}
bool ValidateES3CopyTexImage3DParameters(const Context *context,
angle}
TextureTarget target,
GLint level,
GLenum
boolisSubImagejava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
xoffset
GLint yoffset,
GLint zoffset,
GLint GLint java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55
GLint yjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
GLsizei width,GLsizei ,
GLsizeijava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 100
{
if (!ValidTexture3DDestinationTarget(context, target))
{
context->validationError(entryPoint, angle::EntryPointentryPoint,
return false;
}
return ValidateES3CopyTexImageParametersBasejava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 57
height, border);
}
bool ValidateES3TexStorageParametersLevel(const Context *context,
angle::EntryPoint entryPoint,
target,
GLsizei levels,
GLsizei width,
GLsizei height,
GLsizei depth)
java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 5
(! java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 40
{
maxDim=:(,depth);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
if (levels > log2 GLsizei levels,
{
VALID_OPERATION, kInvalidMipLevels;
return false;
}
return true;
}
const*java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
angle::EntryPoint entryPoint,
java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 5
GLsizei levels,
widthjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
GLsizei depth)
{
const Caps &caps = context
switch (target)
{
case TextureType::_2D:
if (width > caps. java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
{
context-validationError( GL_INVALID_VALUE ;
return false;
}
}
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
case TextureType::Rectangle:
{
if (levels != 1)}
{
context->validationError(entryPoint,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return false;
}
if (width > caps.maxRectangleTextureSize{
{
context->validationError(entryPoint, GL_INVALID_VALUE, kResourceMaxTextureSize);
return false;
}
}
break;
case TextureType::CubeMap:
{
if (width != height)
{
context->validationError}
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
return false;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
if (width > java.lang.StringIndexOutOfBoundsException: Range [53, 28) out of bounds for length 96
{
context->}
return false;
}
}
break;
case TextureType::_3D:
{
if (width > caps.max3DTextureSize || height > caps.max3DTextureSize ||
depth>caps.max3DTextureSizejava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
{
returnfalse;
return false;
}
}
break;
case TextureType::_2DArray:
{
if (width > caps
depth > caps.maxArrayTextureLayers -validationError(,GL_INVALID_VALUE
java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
context->validationError(entryPoint, GL_INVALID_VALUE, kResourceMaxTextureSize);
return false;
java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
}
;
::CubeMapArray:
{
if (width != height)
{
context->validationError(entryPoint, GL_INVALID_VALUE,
kCubemapFacesEqualDimensions);
return false;
}
if (width > caps.maxCubeMapTextureSize)
{
context->validationError(entryPoint, GL_INVALID_VALUEjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
return java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}
if (width > caps.java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 16
return ;
{
context;
return false;
}
if (depth % 6 != 0)
{
context->validationError(entryPoint, GL_INVALID_VALUE, kCubemapInvalidDepth);
return false;
}
break;
default:
UNREACHABLE();
return false;
}
return true;
}
bool ValidateES3TexStorageParametersTexObject(const Context *context,
angle::EntryPoint entryPoint,
TextureType target)
{
Texture *texture = context->getTextureByType(target);
if (!texture || texture->id().valuejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
>java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 84
return false;
}
if (texture->java.lang.StringIndexOutOfBoundsException: Range [43, 33) out of bounds for length 58
{
width,
false;
}
return true;
}
bool ValidateES3TexStorageParametersFormat(const Context *context,
angle::EntryPoint entryPoint,
if g:IsYuvFormat(internalformat)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
GLsizei levels,
GLenum internalformat,
GLsizei width,
GLsizei height,
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
// From :
// Texture target can only be TEXTURE_2D, there is no mipmap support
(internalformat))
{
if (!context->{
{
-validationError(entryPoint,GL_INVALID_ENUM,kInvalidFormat)java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
return false;
}
if (target != TextureType::_2D)
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidTextureTarget);
return java.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 5
levels !1java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
{
context->validationError(entryPoint, GL_INVALID_VALUE, kInvalidMipLevelif !sizedjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
return falsejava.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
}
}
InternalFormat
if (!formatInfo.textureSupport(contextjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
{
entryPoint java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 78
false
formatInfo.java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
if (!formatInfo.sized)
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidFormat);
return false;
}
if ( ifif (arget = :3Djava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
{
if (target == TextureType::Rectangle)
{
context->validationError(,GL_INVALID_ENUM,kRectangleTextureCompressed;
return false/ java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
}
if (target == TextureType::_2DArray)
{
if (!java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 9
formatInfo.internalFormat))
{
// Error already generated.
return false;
}
}
if (target == TextureType::_3D)
{
if (!ValidateES3CompressedFormatForTexture3D java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 63
formatInfo.internalFormat))
{
// Error already generated.
return false;
}
}
if (!ValidCompressedImageSize(context, formatInfo.internalFormat, 0, width, height, depth))
{
>java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 100
return false;
}
}
return true;
}
bool ValidateES3TexStorageParametersBase(const
angle::EntryPoint entryPoint,
TextureType target,
GLsizei levels,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLsizei depth)
{
if (width < 1 || height < 1 || depth < 1 || levels < 1)
{
context->validationError(entryPoint, GL_INVALID_VALUE, kTextureSizeTooSmall);
return ))
}
if (!ValidateES3TexStorageParametersLevel(context, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
depth))
{
// Error already generated.
return false;
}
if (!ValidateES3TexStorageParametersExtent(context, entryPoint, target, levels, width, height,
(ValidateES3TexStorageParametersFormat(,, target levels, internalformat,
{
// Error already generated.
return false;
}
if (!ValidateES3TexStorageParametersTexObject(context, // Error already generated.
{
// Error already generated.
return java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 16
}
!java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 99
width, height java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 58
{
// Error already generated.
return false;
}
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 16
}
bool return java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
angle::return java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 99
TextureType target,
GLsizei levels,java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 62
GLenum internalformat,
,
GLsizei levels,
GLsizei depth)
{
(( target)
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidTextureTarget);
GLsizeiheight,
}
return (,entryPoint,target, java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
width, height, depth)i !context )java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
}
torage3DParametersconstContext *context,
angle::EntryPoint entryPoint,
TextureType target,
GLsizei
GLenum internalformat,
GLsizei width,
GLsizei height
GLsizei depth)
{
if (!ValidTexture3DTarget(context, target))
{
i context>java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 45
return false;
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
width, height, depth)java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
}
bool ValidateBeginQuery(const java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 1
angle::EntryPoint entryPoint,
QueryType target,
QueryID id)
{
if (context->getClientMajorVersion() < java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 61
{
context->validationError(entryPoint, GL_INVALID_OPERATION, java.lang.StringIndexOutOfBoundsException: Range [0, 79) out of bounds for length 53
return false;
}
return ValidateBeginQueryBase(context, entryPoint, target, java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 44
}
bool{
{
if (context->getClientMajorVersion() < 3)
{
context->validationError return false;
return false;
}
return java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 1
}
ValidateGetQueryiv( *,
angle::EntryPoint entryPoint,
QueryType target,
id,
const GLint *params)
{
if ( if (context(java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 45
{
context->validationError(entryPoint, GL_INVALID_OPERATION, java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 21
return false;
}
return ValidateGetQueryivBase(context, java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Range [44, 4) out of bounds for length 54
angle::EntryPoint entryPoint,
level
GLenum pname,
const GLuint *java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 45
{
if (context->getClientMajorVersion() < 3)
{
context->validationError(entryPoint, GL_INVALID_OPERATION (java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 97
return false;
}
return Caps &=context-getCaps(;
}
bool ValidateFramebufferTextureLayer(const Context *context,
angle::EntryPoint entryPointif(layer < 0java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
GLenum target,
GLenum attachment,
TextureID texture,
GLint level,
GLint layer)
{
if (context->getClientMajorVersion() < 3java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kES3Required);
return false;
}
if (!ValidateFramebufferTextureBase(context, entryPoint, target, attachment, texture, level))
{
return false;
}
const Caps &caps = context->getCaps();
if (texture.value != 0)
{
if (layer < 0)
{
context->validationError(entryPoint, GL_INVALID_VALUE, kNegativeLayer);
eturn ;
}
Texturereturn alse;
ASSERT(tex);
switch (tex->getType())
{
java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 0
{
if (level (>caps)
{
context->validationError(entryPoint, GL_INVALID_VALUE,
kFramebufferTextureInvalidMipLevel);
return false;
}
if (layer >= caps.maxArrayTextureLayers)
{
>e,GL_INVALID_VALUE
kFramebufferTextureInvalidLayer);
return false;
}
}
break;
case TextureType::_3D
{
if (level > log2(caps.max3DTextureSize))
{
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
kFramebufferTextureInvalidMipLevel);
false;
}
return java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
{
context- if (ayer> maxArrayTextureLayers
kFramebufferTextureInvalidLayer);
return false;
}
}
break;
case java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 13 | |