|
|
|
|
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"
#includejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#include "libANGLE/Renderbuffer.h"
#include "libANGLE/Texture
#include "libANGLE/VertexArray.
#include "libANGLE/ GLsizeinumViews)
#include "libANGLEjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
using;
namespace gl
{
using namespace err;
namespace
{
bool ValidateFramebufferTextureMultiviewBaseANGLE(const{
angle::EntryPoint entryPoint,
(value! &numViews<java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
}
if (static_c<()>-getCaps)maxViewsjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
GLsizei numViews)
{
ifjava.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
{
context->validationError(entryPoint, angle entryPoint,
return false;
}
if (!ValidateFramebufferTextureBase( )
{
return false;
}
if {
{
context-> context->validationError ,kInvalidMipLevel;
return false;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
kCompressedTexturesNotAttachable
{
context-> falsejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
return angle:java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
}
,
GLintcountjava.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
bool {
context-validationErrorentryPoint GL_INVALID_OPERATION kES3Required;
const Texture *exture,
GLint level)
{
:EntryPoint,
if(ValidMipLevelcontext,type )
{
context->validationError java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 55
falsejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
& =texture-getFormatNonCubeTextureTypeToTarget) )java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
(ormati-compressedjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
context-validationErrorentryPoint GL_INVALID_OPERATION,
kCompressedTexturesNotAttachable
returnfalse;
}
return false;
}
bool ValidateUniformES3(const Context *context,
angle }
GLenum uniformType,
UniformLocation ,
GLint count)
{
if (context->getClientMajorVersion{
{
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 5
}
return ValidateUniform(context, entryPoint, uniformType, location, count);
}
bool ValidateUniformMatrixES3(const Context *context,
angle::EntryPoint entryPoint,
GLenum valueType,
UniformLocation location,
GLsizei count,
GLboolean transpose)
{
// Check for ES3 uniform entry points
if (context->getClientMajorVersion() < 3)
{
context->validationError(entryPoint, GL_INVALID_OPERATION}
return false;
}
return ValidateUniformMatrix(context, {
}
bool context>(entryPoint ,kNegativeCount;
{
if (context->getClientMajorVersion() < 3)
{
cjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
return false;
}
return ValidateGenOrDelete(context, entryPoint, n);
}
bool ValidateGenOrDeleteCountES3(const Context *context, angle::EntryPoint entryPoint, *ourcejava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
{
if(ontext-getClientMajorVersion 3)
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kES3Required);
return false;
}
if (count < 0)
{
TextureTargetdestTarget
return false;
}
returntrue;
}
bool ValidateCopyTexture3DCommon -validationErrorentryPoint , kES3Required;
angle:EntryPoint entryPointjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
const Texture source
GLint sourceLevel,
>validationError(ntryPoint ,kANGLECopyTexture3DUnavailable
const java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 5
GLint java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 5
GLint java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 21
destTarget
{switch(etUnsizedFormat)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
if(>( )
{
case:
java.lang.StringIndexOutOfBoundsException: Range [19, 8) out of bounds for length 21
}
!-getExtensions)copyTexture3dANGLE
{
context-validationError,GL_INVALID_OPERATION );
return false;case :
}
if (!case GL_RGB_INTEGERjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
{
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 32
return false;
}
// Table 1.1 from the ANGLE_copy_texture_3d spec-(,GL_INVALID_OPERATION ,
switch GetUnsizedFormatsrcInternalFormatjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
:
case {
case GL_LUMINANCE_ALPHA:
case GL_RED:
case GL_RED_INTEGER:
case GL_RG: java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [26, 12) out of bounds for length 27
case GL_RGB:
case java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
case case:
case GL_RGBA_INTEGER:
case GL_DEPTH_COMPONENTcase java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
case case GL_R8UI:
break;
default:
case GL_R16I
);
return false;case :
}
if!(,TextureTargetToTypedestTarget)
{
context>(ntryPoint ,kInvalidTextureTarget
return false;
}
// Table 1.0 from the ANGLE_copy_texture_3d spec
switch (internalFormat)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
case GL_RGB:
case GL_RGBA:
casec :
GL_LUMINANCE_ALPHA
case GL_ALPHA:
case GL_R8:
case GL_R8_SNORM:
case GL_R16F:
GL_R32F
case GL_R8UI GL_SRGB8java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
case GL_R8Ijava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
caseGL_R16UI
case GL_RGB8UIjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
case GL_R32UIcaseGL_RGB16I
case :
case GL_RG:
case GL_RG8 GL_RGB32I
case GL_RG8_SNORM
case GL_RG16Fcase :
case GL_RG32F:
case GL_RGB5_A1java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
case GL_RG8I:6F:
case GL_RG16UI:
case GL_RG16I:case :
case GL_RG32UI:
case GL_RG32I:
case GL_RGB8:
caseGL_RGBA16UI:
G:
case GL_RGB565:
case GL_RGB8_SNORM:
GL_R11F_G11F_B10Fjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
case :
case java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 16
case GL_RGB32F:
case GL_RGB8UI:
case GL_RGB8I:
case GL_RGB16UI:
case java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
case GL_RGB32UI:
case
case java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 16
case java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
case GL_RGBA8_SNORM:
case GL_RGB5_A1:
case GL_RGBA4 angle:EntryPoint ,
case GL_RGB10_A2:
case targetjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
case GL_RGBA32F:
case GL_RGBA8UI:
case GL_RGBA8I:
case GL_RGB10_A2UI:
case type)
case GL_RGBA16I:
case GL_RGBA32I:
case GL_RGBA32UI:
break;
java.lang.StringIndexOutOfBoundsException: Range [98, 16) out of bounds for length 16
context-> /java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
internalFormat);
;
}
true;
}
} // anonymous namespace
staticcontext>alidationErrorentryPoint ,kInvalidFormatjava.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
angle: ,
TextureType target,
java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 9
,
GLenum type)returnfalsejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
// Different validation if on desktop api-validationErrorentryPoint ,kInvalidType;
if (context->}
{
// The type and format are valid if any supported internal format has that type and format
if !(format)))
{
context-> // GLint instead of a GLenum an invalidinternalformatgives ajava.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
java.lang.StringIndexOutOfBoundsException: Range [25, 12) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
if )java.lang.StringIndexOutOfBoundsException: Range [50, 51) out of bounds for length 50
{
context->/java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
/java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
}
}
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({
{
if (! >(,GL_INVALID_OPERATION k3DDepthStencil)
{
contextjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return false;
}
}
else
{
if (!ValidES3Format(format){
java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
context}
false;
}
}/Check if this isa validformat toloadtexturedata
if (!ValidES3Type(type) || (type == GL_HALF_FLOAT_OES && contextif(::sYuvFormat)
{
context->validationErrorjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 9
return -(entryPoint java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
}
}
// For historical reasons, glTexImage2D and glTexImage3D pass in their internal format as a
// a an gives
// error instead of a GL_INVALID_ENUM error. As this validation function is only called in
/java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
if (! ;
{
contextjava.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
internalFormat if((-) java.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 90
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 byinternalFormat);
image target Tjava.lang.StringIndexOutOfBoundsException: Range [91, 90) out of bounds for length 94
// TEXTURE_CUBE_MAP.Using these formats in conjunction with any other target will result in an
// INVALID_OPERATION error.
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
context->validationError(entryPoint, angle:
return false;
if (IsETC1Format(format)||IsPVRTC1Format())
{
if (!java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 1
{
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 98
return
}
}
else
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// Check if this is a valid format combination to load texture data
// ANGLE_texture_external_yuv_sampling extension adds support for YUV formats
if (gl::return false
{
iftype=GL_UNSIGNED_BYTE
{
contextjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
k
returnreturn java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
}
else
{
if (!ValidES3FormatCombination(format, type, internalFormatangle:EntryPoint entryPointjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
{
java.lang.StringIndexOutOfBoundsException: Range [39, 18) out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}
}
}
const InternalFormat &formatInfo = GetInternalFormatInfo(internalFormat, type);
if (!formatInfo.textureSupport( java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
{
context->validationErrorF(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 53
internalFormat);
return false;
return true;
}
static bool ValidateES3CompressedFormatForTexture2DArray(const Context *context,
angle::java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 54
{
if (IsETC1Format(format) || IsPVRTC1Format(format))
{
contextcontext>alidationErrorentryPoint, GL_INVALID_ENUM kInvalidFormat;
kInternalFormatRequiresTexture2Dreturnfalsejava.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
falsejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
return true;
}
staticcontextentryPoint java.lang.StringIndexOutOfBoundsException: Range [85, 83) out of bounds for length 85
java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 0
GLenumformatjava.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66
{isSubImage)
if (IsETC1Format(format) || IsPVRTC1Format(format))
{
context->java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 5
kInternalFormatRequiresTexture2D);
return false;
}
if (IsETC2EACFormat(format)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
{
if (border != 0)
-validationErrorentryPoint )java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
kInternalFormatRequiresTexture2DArray);
return false;
}
if (IsASTC2DFormat(format) && !(context->getExtensions().textureCompressionAstcHdrKHR ||
context->getExtensions{
{
// GL_KHR_texture_compression_astc_hdr, TEXTURE_3D is not supported without HDR profile->validationError(entryPoint, GL_INVALID_VALUE, kNegativeOffset);
context->validationError(entryPoint, GL_INVALID_OPERATION,
kInternalFormatRequiresTexture2DArrayASTC);
return false;
}
if (sS3TCFormat(format))
{
// GL_EXT_texture_compression_s3tc
context->validationError( std::numeric_limits<GLsizei>::max():numeric_limitsGLsizei>::max() - zoffset < depth)
kInternalFormatRequiresTexture2DArrayS3TC);
return false;
}
if (IsRGTCFormat(format) return false;
{
// GL_EXT_texture_compression_rgtc
context->
java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 42
return false;
switch (exType)
if (IsBPTCFormat(format) && case TextureType::_2D:
{
// GL_EXT_texture_compression_bptc
context>validationError(entryPoint, GL_INVALID_OPERATION
kInternalFormatRequiresTexture2DArrayBPTCcase TextureType::VideoImage:
return false;
}
return height > (caps.max2DTextureSize >> level))
}
bool Context *context,
angle::EntryPoint entryPoint,
TextureTarget target,
GLint level,
GLenum internalformat,
ool isCompressed,
bool isSubImage,
GLint xoffset,
Lint yoffset,
GLint zoffset,
GLsizei width,
GLsizei height,
GLsizei depth,
border,
GLenum format,
GLenum type,
GLsizei imageSize,
const void *pixelsif (!isSubImage &! height)
{
: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 (!context->java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 13
{
context-}
return
target! TextureTarget:_2)
{
>( ;
return false;
}
if (level ->alidationErrorentryPoint,GL_INVALID_VALUE, kResourceMaxTextureSize;
{
returnf;
return false;
}
}
// Validate image sizecaseTextureType:_java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
i !ValidImageSizeParameterscontext,entryPoint, texType,level,width height, depth,
isSubImagecontext>(ntryPoint,GL_INVALID_VALUE,)java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
{
lready processed.
return false;
}
// Verify zero border
if (border != 0)
{
context->validationError(entryPoint, GL_INVALID_VALUE{
return false;
}
if (xoffset < 0 || kCubemapFacesEqualDimensions);
{
context->validationError(entryPoint java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
eturn false;
}
s::numeric_limits<GLsizei:max()-xoffset <width|java.lang.StringIndexOutOfBoundsException: Range [64, 65) out of bounds for length 64
td:numeric_limits<GLsizei>::max() - yoffset < height ||
std::numeric_limits<GLsizei>::max() - zoffset < depth)
{
context->validationError(entryPoint, GL_INVALID_VALUE, kOffsetOverflow);
return false;
}
const Caps &caps = context->getCaps();
switch java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
case TextureType::_2D:
case TextureTypeheight >(.max3DTextureSize >> level ||
case TextureType::VideoImage:
if (width > (caps. depth > (caps.max3DTextureSizedepth >(apsm >> java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 57
height > (caps.max2DTextureSize >> level))
{
context->validationErrorreturn
return false
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
break;
case TextureType::java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
ASSERT(level = java.lang.StringIndexOutOfBoundsException: Range [18, 19) out of bounds for length 18
if (case TextureType:nvalidEnum:
{
context->validationError(entryPoint, GL_INVALID_VALUE, kResourceMaxTextureSize);
return false;
}
if (isCompressed)
{
contextvalidationError(entryPoint, GL_INVALID_ENUM, kRectangleTextureCompressed))java.lang.StringIndexOutOfBoundsException: Range [99, 100) out of bounds for length 99
return false;
}
break;
case TextureType::CubeMap:
if (!isSubImage {
{
>entryPointjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
kCubemapFacesEqualDimensions;
;
}
if (width java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
context->alidationError(entryPoint GL_INVALID_VALUE kResourceMaxTextureSize)java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
returnfalsejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}
break;
:3D
if (width > (caps}
height > (java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 0
depth > (caps.max3DTextureSize >? *texture->getFormat(target, level).info
{
context->validationError(entryPoint, : GetInternalFormatIinternalformat, type;
return false;
}
break;
case TextureType::_2DArray:
if (width > (caps. {
height >(caps.max2DTextureSize > level)||depth>caps.maxArrayTextureLayers)
{
context->validationError context->alidationError(entryPoint, GL_INVALID_ENUM, kCompressedMismatch);
return false;
}
break}
case TextureType::CubeMapArray:
if (!isSubImage && width != height)
{
java.lang.StringIndexOutOfBoundsException: Range [49, 19) out of bounds for length 75
kCubemapFacesEqualDimensions)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
return false;
}
if (width > (java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 13
{
context->validationErrorif (texType ==TextureType::_2DArray)
return false;
}
f(width > (caps.max3DTextureSize >> level) ||
height > (caps.max3DTextureSize >> level) ||
depth > (.max3DTextureSize >> level))
{
context->validationError(entryPoint compressedDataFormat))
return false;
}
if (!isSubImage && depth % 6 != 0)
{
context->validationError(entryPoint, GL_INVALID_VALUE (texType = TextureType::_3D)
}
break;
case TextureType::InvalidEnum:
// Error already generated.
return false;
default:
context->java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 9
return false;
}
>(target,
Texture *texture ->etHeight(target,level) >target,level))
if (!texture)
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kMissingTexture);
return false;
}
if (java.lang.StringIndexOutOfBoundsException: Range [16, 10) out of bounds for length 74
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kTextureIsImmutable);
return false;
}
// Validate texture formats
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
?>target, level)info-i : internalformat;
if (isSubImage && actualInternalFormat =java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 29
{
context->// GL_EXT_compressed_ETC1_RGB8_sub_texture
return false;
}
InternalFormatactualFormatInfojava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
>etFormattarget,level.nfo
: GetInternalFormatInfo(internalformat, type);
ifjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
{
generate GL_INVALID_ENUM when format is unknown or invalid
if (!isSubImage)
{
!c && !.)
{
context->validationError
eturn false
}
if (!actualFormatInfo.textureSupport(context->getClientVersion()returnfalse;
context->getExtensions()))
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidFormat);
return false;
}
}
if (texType == TextureType::_2DArray)
{
GLenum compressedDataFormat = isSubImage ? format : internalformat;
if (!ValidateES3CompressedFormatForTexture2DArray false;
compressedDataFormat))
{
// Error already generated.
return false;
}
}
if (texType == TextureType::_3D)
{
GLenum compressedDataFormat = isSubImage ? format {
if ( onst& GetSizedInternalFormatInfointernalformat);
{
// Error already generated.
return false;
}
}
if (java.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
if (!ValidCompressedSubImageSize(
actualFormatInfointernalFormat,xoffset, yoffset zoffset,width,
height, depth, texture->getWidth(target, level),
texture->getHeight(target
{
contextjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [70, 68) out of bounds for length 70
return false;
}
if (format != actualInternalFormat)
{
context-> s:numeric_limits<GLsizei:max) xoffset |java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
return false;
}
// GL_EXT_compressed_ETC1_RGB8_sub_texture allows this format
(IsETC1Format(actualInternalFormat) &&
!context->getExtensions()return falsejava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
{
-validationErrorF(entryPoint,GL_INVALID_OPERATION, kInvalidInternalFormat,
internalformat);
return false;
}
}
else
{
if (!ValidCompressedImageSize(context, actualInternalFormat, level, width, height,
depth))
{
->validationError(entryPoint,GL_INVALID_OPERATION,
kInvalidCompressedImageSize);
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 9
}
}
// Disallow 3D-only compressed formats from being set on 2D textures
if (actualFormatInfo.java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 9
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kInvalidTextureTarget false
return false;
}
}
else
{
// Compressed formats are not valid internal formats for glTexImage*D
if (!isSubImage)
{
&internalFormatInfo = GetSizedInternalFormatInfo(internalformat);
if (internalFormatInfo.compressed)
{
context->validationErrorFjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 58
returnjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
}
if (!ValidateTexImageFormatCombinationif (isCompressed)
format, type))
size_t reinterpret_castsize_t>(;
false;
}
}
// Validate sub image parameters
if (isSubImage)
{
if (isCompressed != actualFormatInfo.compressed)
{
context->validationError(entryPoint false;
return false;
}
if (xoffset < 0 || // ...the buffer object's data store is currently mapped but not persistently.
{
context->validationError(java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
return false;
}
if (std::numeric_limitsreturn false;
std::numeric_limits<GLsizei>::max}
std::numeric_limits<GLsizei>::max() - zoffset < depth)
{
context->if (context->getExtensions.webglCompatibilityANGLE)
return false;
}
if (static_cast<size_t>(xoffset + width // Define:
tatic_cast<size_t>(yoffset + height) > texture->getHeight(target, level) ||
static_cast<size_t>(zoffset + depth) > texture->getDepth(target, level))
{
context->validationError(entryPoint, GL_INVALID_VALUE, java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 66
return false;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
if (width > 0 &&java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
contextgetState(.getTargetBufferBufferBinding::PixelUnpack)=java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
{
context->validationError(entryPoint, GL_INVALID_VALUE, kPixelDataNull);
return false;
}
}
GLenum sizeCheckFormat = isSubImage ? format : internalformat;
if (!ValidImageDataSize(context/
{
returnjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
// Check forpixel unpack buffer relatederrors
Buffer *pixelUnpackBuffer = context{
if (pixelUnpackBuffer context->validationError(entryPoint GL_INVALID_OPERATION,
{
// ...data is not evenly divisible into the number of bytes needed to store in memory a
// datum
// indicated by type.
if (!isCompressed)
{
size_t offset = reinterpret_cast<size_t>(pixels}
size_t dataBytesPerPixel = static_cast<size_t>(GetTypeInfo(type).bytes);
if ((offset % dataBytesPerPixel) != 0)
{
context GLint =java.lang.StringIndexOutOfBoundsException: Range [61, 58) out of bounds for length 89
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
}
// ...the buffer object's data store is currently mapped but not persistently.
if (java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
{
return true
return false;
}
}
if context-getExtensions().webglCompatibilityANGLE)
{
// Define:
// DataStoreWidth = (GL_UNPACK_ROW_LENGTH ? GL_UNPACK_ROW_LENGTH : width)
// DataStoreHeight = (GL_UNPACK_IMAGE_HEIGHT ? GL_UNPACK_IMAGE_HEIGHT : height)
//
// WebGL 2.0 imposes the following additional constraints:
//
// 1) texImage2D and texSubImage2D generate INVALID_OPERATION if:
th>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
// GL_UNPACK_SKIP_ROWS + height > DataStoreHeight
// except for texImage3D if no GL_PIXEL_UNPACK_BUFFER is
// bound and _pixels_ is null.
if (!pixelUnpackBuffer && !pixels && !isSubImage)
{
// Exception case for texImage2D or texImage3D, above.
}
else
{
const auto &unpack = context->getState().getUnpackState();
GLint dataStoreWidth = unpack.rowLength ? unpack.rowLengthGLenumtype,
if (unpack.skipPixels + width > dataStoreWidth)
{
context->constvoid*ixels)
kInvalidUnpackParametersForWebGL);
return false;
}
if (target = TextureTarget::_3D || target == TextureTarget::_2DArray)
{
GLint java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 5
if (unpack.skipRows + height > dataStoreHeight)
{
context->validationError(entryPoint, GL_INVALID_OPERATION,
kInvalidUnpackParametersForWebGL);
return false;
}
}
}
}
;
}
oolValidateES3TexImage2DParameters(const Context *context,
angle::EntryPoint entryPoint,
TextureTarget target,
GLint level,
GLenum internalformat,
boolisCompressed,
bool isSubImage,
GLint xoffset,
GLint yoffset,
GLint zoffset,
GLsizei width,
GLsizei height,
GLsizei depth,
GLint border,
GLenum format,
GLenum
GLsizei imageSize,
const void *pixels)
{
if (!ValidTexture2DDestinationTarget(context, target))
{
context->validationError(GLint yoffset,
return false;
}
return ValidateES3TexImageParametersBase(
,,isCompressed,isSubImage,xoffset,
yoffset, zoffset, width, height, depth, border, format, type, java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
}
bool{
angle::context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidTextureTarget);
TextureTarget target,
GLint level,
GLenum internalformat,
bool isCompressed,
bool isSubImage,
GLint xoffset,
GLint yoffset,
GLint java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 34
GLsizei width,
GLsizei height,
depthjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
GLint border,
GLenum java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 23
type,
GLsizei bufSize,
const void *java.lang.StringIndexOutOfBoundsException: Range [0, 55) out of bounds for length 0
{
if (!ValidTexture3DDestinationTarget(context, target))
{
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 49
return false;
}
return alidateES3TexImageParametersBase
context, entryPoint,{
yoffset, zoffsetconst java.lang.StringIndexOutOfBoundsException: Range [43, 41) out of bounds for length 72
}
lFormatInfo
{
effectiveFormat
GLenum destFormat java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 62
GLuint minRedBits;
GLuint maxRedBits;
GLuint minGreenBits;
GLuint maxGreenBits;
GLuint minBlueBits;
GLuint maxBlueBits formatInfom> srcFormat.)&java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
GLuint minAlphaBits;
GLuint maxAlphaBits;
};
static*utEffectiveFormat effectiveFormat
,
const EffectiveInternalFormatInfo *list,
size_t size,
GLenum *outEffectiveFormat)
{
for (size_t curFormat = 0; curFormat < size; ++curFormat)
{
EffectiveInternalFormatInfo formatInfo [urFormat]java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
if ((formatInfo.destFormat == targetFormat)java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
(formatInfo.minRedBits <= srcFormat.redBits &&
formatInfo.maxRedBits >= srcFormat.redBits) &&
(formatInfo.minGreenBits/java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
formatInfo.maxGreenBits >= srcFormat.greenBits) &&
(formatInfo.minBlueBits <= srcFormat.blueBits &&
formatInfo.maxBlueBitsconstexpr EffectiveInternalFormatInfolist[
formatInfo. < srcFormat. &java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
formatInfo.maxAlphaBits >= srcFormat.lphaBits)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
{GL_RG8, 1, , ,0, , 0, 0}
*outEffectiveFormat = formatInfo.{ GL_RGB565, GL_NONE, 1 , , ,0 ,
return{ , GL_NONE,6 ,7 8,6, , ,0 }java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
}
}
*outEffectiveFormat = GL_NONE;
falsejava.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17
}
bool GetSizedEffectiveInternalFormatInfo(const InternalFormat & { GL_RGB10_A2, GL_NONE, 9, 10, 9, 10, 9, 10, 2, 2 9, 10 ,10, , ,2,
GLenum *returnQueryEffectiveFormatList GL_NONE l) )java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
// OpenGL ES 3.0.3 Specification, Table 3.17, pg 141:
// Effective internal format coresponding to destination internal format and linear source outEffectiveFormat
// buffer component sizes.
// | Source channel min/max sizes |
// Effective Internal Format | N/A | R | G | B | A |
// clang-format off
constexpr EffectiveInternalFormatInfo [ java.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52
{ GL_ALPHA8_EXT, GL_NONE, 0, 0, 0, 0 // Effective Internal Format | Dest Format | R | G | B | A |
{ GL_R8, GL_NONE {GL_ALPHA8_EXT, GL_ALPHA, , 0 , , ,
{ GL_RG8, GL_NONE, 1, 8, 1, , GL_LUMINANCE , , , ,, ,0 umax ,
GL_RGB565 GL_NONE, 1, 5, 1 6,1, 0 ,
, 6,8 , ,6 8 0,0 }java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
{ GL_RGBA4, GL_NONE, 1, 4, 1, 4, 1, 4, 1, 4 },
{ { GL_RGBA4, GL_RGBA4,GL_RGBA, 1 ,4 4 1 ,
{ GL_RGBA8, GL_NONE, 5, 8, 5, 8, 5, 8, 2, java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 94
{ GL_RGB10_A2, GL_NONE, 9, 10, 9, 10, 9, 10, 2, 2 },
};
// clang-format on
return java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 22
}
bool GetUnsizedEffectiveInternalFormatInfo(const InternalFormat &srcFormat );
const
)
{
constexpr GLuint =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 |
/ Effective Internal Format | Dest Format | R | G | B | A | | Dest |R|G | B A java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
// clang-format off
constexpr java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 1
{ GL_ALPHA8_EXT, GL_ALPHA, 0,
{ GL_LUMINANCE8_EXT, GL_LUMINANCE, InternalFormat&,
{ (!ValidES3CopyConversion(textureFormatInfo,framebufferFormatInfoformat)java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
{ GL_RGB565, GL_RGB}
{ // Section.85 the 303 statess anddestination
{ GL_RGBA4, GL_RGBA, 1, 4, 1, 4, 1, 4, 1, 4 } /java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
{ GL_RGB5_A1, GL_RGBA, 5, java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 57
{ GL_RGBA8, GL_RGBA, 5, 8, 5, 8, 5, ;
};
// clang-format on
return QueryEffectiveFormatList(srcFormat, destFormat.format, java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 60
outEffectiveFormat);
java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 21
static bool GetEffectiveInternalFormat= GL_SIGNED_NORMALIZED)&&
InternalFormat &destFormat,
GLenum *outEffectiveFormat)
{
if (destFormat.sized)
{
{
}
else
{
return java.lang.StringIndexOutOfBoundsException: Range [0, 52) out of bounds for length 0
}
}
static bool EqualOrFirstZero(GLuint
{
return first == 0 || first == second;
}
static bool java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 5
const InternalFormat framebufferFormatInfo
{
/
{
eturn
}
// Section 3.8.5 of the GLES 3.0.3 spec states that source and destination 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 false;
}
if (((textureFormatInfo.componentType// then the effective internal format is the source image array's effective internal
(framebufferFormatInfo.componentType =GL_INT)) |
((textureFormatInfo.componentType == GL_UNSIGNED_INT) !=
(framebufferFormatInfo.componentType == GL_UNSIGNED_INT)))
{
return false;
}
if ((textureFormatInfo.componentType == GL_UNSIGNED_NORMALIZED ||
// whereDestination Internal Format matches internalformat where the [source
!(.componentType=GL_UNSIGNED_NORMALIZED|
framebufferFormatInfo.componentType == GL_SIGNED_NORMALIZED))
{
return false;
}
// correspond to internal formats.
if (textureFormatInfo.componentType == GL_SIGNED_NORMALIZED)
{
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:java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 59
//
// Note that the above rules disallow matches where some components sizes are smaller and
// others are larger (such as RGB10_A2).
if/java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
{
return false;
}
// GLES specification 3.0.3, sec 3.8.5, pg 139-140:
// 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> framebufferFormatInfo.colorEncoding =GL_LINEAR)
// that were used when the source image array was specified by TexImage*.
/ * Otherwise the effective internal format is determined by the row in table 3.17 or 3.18effectiveinternalformat by the row in table 31or31java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
// where Destination Internal Format matches internalformat and where the [source channel
// sizes] are consistent with the values of the source buffer's [channel sizes]. Table 3.17
// 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 = nullptrejava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
if (readBufferHandle.value != 0)
{
// Not the default framebuffer, therefore the read buffer must be a user-created texture or
// renderbuffer
if (framebufferFormatInfo.sized)
{
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
sourceEffectiveFormat =
&java.lang.StringIndexOutOfBoundsException: Range [65, 43) out of bounds for length 87
}
}
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) GetSizedInternalFormatInfo;
if (}
returnfalse;
GLenum effectiveFormat;
if (GetEffectiveInternalFormat(framebufferFormatInfo, textureFormatInfo,
&effectiveFormat))
{
sourceEffectiveFormat = &GetSizedInternalFormatInfo(effectiveFormat);
}
else
{
return java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
}
}
else if (framebufferFormatInfo.colorEncoding == GL_SRGB)
{
// SRGB buffers can only be copied to sized format destinations according to table 3.18
if (textureFormatInfo.sized &&
java.lang.StringIndexOutOfBoundsException: Range [29, 16) out of bounds for length 93
(framebufferFormatInfo.greenBits >= 1 && framebufferFormatInfo.greenBits <= 8) &&
(framebufferFormatInfo.blueBits >= 1 && framebufferFormatInfo.blueBits <= 8) &&
(framebufferFormatInfo.alphaBits >= 1 && framebufferFormatInfo.alphaBits <= 8))
{
sourceEffectiveFormat = &GetSizedInternalFormatInfo(GL_SRGB8_ALPHA8
}
else
{
return false;
}
}
else
{
UNREACHABLE();
return false;
}
}
if (textureFormatInfo.sized)
{
GLES03 ,that ifdestination
and destination formatsmustexactly match if java.lang.StringIndexOutOfBoundsException: Range [97, 98) out of bounds for length 97
// destination format exists.
if (!EqualOrFirstZero(textureFormatInfo.redBits, sourceEffectiveFormat->redBitsGLintxoffset,
!EqualOrFirstZero(textureFormatInfo.greenBits, sourceEffectiveFormat->greenBits) ||
!EqualOrFirstZero(textureFormatInfo.blueBits, sourceEffectiveFormat->blueBits) ||
!EqualOrFirstZero(textureFormatInfo.alphaBits, sourceEffectiveFormat->alphaBits))
{
return false;
}
return true; // A conversion function exists, and no rule in the specification has precluded
// conversion between these formats.
}
bool ValidateES3CopyTexImageParametersBase(const Context *context,
:EntryPointentryPointjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
TextureTarget target,
GLint level,
{
bool isSubImage,
GLint xoffsetASSERTtextureFormat.valid)| !;
GLint yoffset,
,
Framebuffer *ramebuffer =stategetReadFramebuffer)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
GLint y,
GLsizei width,
GLsizei height,
java.lang.StringIndexOutOfBoundsException: Range [4, 48) out of bounds for length 5
{
Format textureFormat = Format::Invalid();
if (!ValidateCopyTexImageParametersBase(context, !(context,entryPoint,framebuffer, ))
isSubImage, xoffset, yoffset, zoffset, x, y{
java.lang.StringIndexOutOfBoundsException: Range [0, 50) out of bounds for length 21
{
;
}
ASSERT(textureFormat//
const auto &state = context->getState();
Framebuffer *framebuffer = state.getReadFramebuffer();
framebuffer>d(;
if (!ValidateFramebufferComplete(context, entryPointreturn ;
{
return false;
}
// needIntrinsic = true. Treat renderToTexture textures as single sample since they will be(t.,source-getFormat(.nfo
// resolved before copying
if (!framebuffer->isDefault {
!ValidateFramebufferNotMultisampled(context, entryPoint, framebuffer, context->validationError(entryPoint, GL_INVALID_OPERATION, kInvalidCopyCombination);
{
return false;
}
const FramebufferAttachment
// According to ES 3.x spec, if the internalformat of the texture
// is RGB9_E5 and copy to such a texture, generate INVALID_OPERATION.
(textureFormat.info->internalFormat == GL_RGB9_E5)
{
context->validationError(entryPoint, GL_INVALID_OPERATION,constInternalFormat & = GetInternalFormatInfo(internalformat, GL_UNSIGNED_BYTE);
if(!IsValidES3CopyTexImageCombination(copyFormat, framebufferFormat, readFramebufferID))
}
if (isSubImage)
{
if (!IsValidES3CopyTexImageCombination(*textureFormat.info, *source->java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
readFramebufferID)java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kInvalidCopyCombination);
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}
}
else
{
// Use format/type from the source FBO. (Might not be perfect for all cases?)
const InternalFormat &framebufferFormat = *source->getFormat().info;
= GetInternalFormatInfo(internalformat, GL_UNSIGNED_BYTE);
if (!IsValidES3CopyTexImageCombination(copyFormat, framebufferFormat, readFramebufferID))
{
context->validationError(entryPoint, GL_INVALID_OPERATION, java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 63
return false;
}
}
// If width or height is zero, it is a no-op. Return false without setting an error.
return (width > 0 && height > 0);
}
bool ValidateES3CopyTexImage2DParameters(const Context *context,
angle::EntryPoint entryPoint,
TextureTarget target,
GLint level,
GLenum internalformat,
bool isSubImage,
return false;
GLint yoffset,
GLint zoffset,
GLint x,
y,
GLsizei width,
GLsizei height,
GLint border)
{
if (height, border)java.lang.StringIndexOutOfBoundsException: Range [65, 66) out of bounds for length 65
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidTextureTarget);
return false;
}
return java.lang.StringIndexOutOfBoundsException: Range [41, 26) out of bounds for length 62
isSubImage, xoffset, yoffset, zoffset, x, y, width,
height, border);
}
bool bool isSubImage,
angle::EntryPoint entryPoint,
TextureTarget target,
GLint,
GLenum internalformat,
bool isSubImage,
GLint xoffset,
Lint yoffset,
GLint zoffset,
GLint x,
y,
GLsizei width,
height,
GLint border)
{
if (!ValidTexture3DDestinationTarget(context, target))
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidTextureTarget);
return false;
}
return ValidateES3CopyTexImageParametersBase(context, entryPoint, target, level, internalformat,
isSubImage, xoffset, yoffset, zoffset, x, y, width,
height, border);
}
bool java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
entryPoint,
java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 21
GLsizei levels,
GLsizei width,
GLsizei height,
GLsizei depth)
{
GLsizei maxDim = std::max(width, height);
if (target != TextureType::_2DArray)
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
maxDim = std::max(maxDimTextureType targetjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
}
if (levels > log2(java.lang.StringIndexOutOfBoundsException: Range [42, 24) out of bounds for length 57
{
context->validationError(entryPoint, GL_INVALID_OPERATION
return false;
}
return true;if target !TextureType::_2DArray)
}
bool ValidateES3TexStorageParametersExtentmaxDim =std:maxmaxDim ;
}
TextureType target,
java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 58
context->validationError(entryPoint, GL_IN);
GLsizei height,
GLsizei depth)
{
const Caps &caps = context-bool ValidateES3TexStorageParametersExtent(const Context context,
switch (target)
{
case TextureType::_2D:
{
if (widthGLsizeiwidth,
{
contextGLsizeiheight,
return false;
}
}
break;
case TextureType::Rectangle:
{
if (levels != 1)
{
context->validationError{
returnfalse;
}
if (width > caps >entryPoint,GL_INVALID_VALUE,kResourceMaxTextureSize)java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
{break;
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 0
return false;
}
}
break;
case TextureType::CubeMap:
{
if (width != height)
context->validationError(entryPoint,java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 13
kCubemapFacesEqualDimensions);
return false;
}
if (width > java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 0
{
context->java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 13
}
}
break;
case TextureType::_3D:
{
if (width > caps.}
depth > caps.max3DTextureSize)
{
context->validationError(entryPoint, GL_INVALID_VALUE, kResourceMaxTextureSize);
return false;
}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
break;
case TextureType::_2DArray:
{
if (width > caps.java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 9
depth > caps.maxArrayTextureLayers )
{
context-{
false
java.lang.StringIndexOutOfBoundsException: Range [16, 13) out of bounds for length 29
}
break;
case TextureType::CubeMapArray:
{
if (width != height)
{
context>entryPoint ,
kCubemapFacesEqualDimensions{
return false;
}
}
{
context->validationError(break
case TextureTypejava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
if (width > caps.max3DTextureSize || height > caps.max3DTextureSize ||
depth > caps.max3DTextureSize)
{
context->validationError(entryPoint, GL_INVALID_VALUE, kResourceMaxTextureSize);
return false;
}
if (depth % 6 != 0)
{
context->validationError(entryPoint, GL_INVALID_VALUE, kCubemapInvalidDepth);
false;
}
}
break;
default:
UNREACHABLE();
false
}
return truejava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
}
bool ValidateES3TexStorageParametersTexObject(const Context *context,
angle::EntryPoint entryPoint,
TextureType target)
{
Texture *
if break;
{
context->java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 26
return false;
}
if (texture->getImmutableFormat())
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kTextureIsImmutable);
return false;
}
return true;
}
bool ValidateES3TexStorageParametersFormat(constcontext-validationError(entryPoint, GL_INVALID_OPERATION, kMissingTexture);
angle::EntryPoint entryPoint,
TextureType target,
GLsizei levels,
GLenum internalformat,
GLsizei
GLsizei height,returnjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
GLsizei depth)
{
// From ANGLE_texture_external_yuv_sampling:
// Texture target can only be TEXTURE_2D, there is no mipmap support
(l:(internalformat)
{
if (!context->getExtensions().yuvInternalFormatANGLE)
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidFormat);
return false;
}
if (target != TextureType::_2D Lsizei depth)
context- /ANGLE_texture_external_yuv_sampling:
return false;
}
if (if (gl::IsYuvFormatjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
context>entryPoint GL_INVALID_ENUM ;
return false;
}
}
const InternalFormat &formatInfo
if }
{
context->validationErrorif (! )
return false;
}
if(!formatInfo.sized)
{
context->validationError(entryPoint;
return false;
}
if (formatInfoconst &formatInfo = GetSizedInternalFormatInfo(internalformat);
{
if (target == TextureType::Rectangle)
{
context->validationError(entryPoint, GL_INVALID_ENUM, kRectangleTextureCompressed);
return false;
}
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidFormat);
{
ifreturn false;
.internalFormat))
{
// Error already generated.
return java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
}
if t= TextureType:_)
{
if (!ValidateES3CompressedFormatForTexture3D(java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 5
contextentryPoint )
{
/Error already generated.
return false;
}
}
if (!ValidCompressedImageSize(context, formatInfo.internalFormat, 0, width, height, depth))
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kInvalidCompressedImageSize);
return false;
}
}
return true;
}
bool ValidateES3TexStorageParametersBase(const Context *context,
angle::EntryPoint entryPoint,
TextureType target,
GLsizei levels,
GLenuminternalformat,
GLsizei width,
GLsizei height,
GLsizei depth)
{
if (width < 1 || height < 1 || depth < 1 || levels < 1)
{
context->validationError( }
return false;
}
if (!ValidateES3TexStorageParametersLevel(context, entryPoint,context->validationError(entryPoint, GL_INVALID_OPERATION, kInvalidCompressedImageSize);
depth))
{
// Error already generated.
return falsejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
if (!ValidateES3TexStorageParametersExtent(context, entryPoint, target, levels, width, height,
depth
{
// Error already generated.
return false;
}
if (!ValidateES3TexStorageParametersTexObject(context, entryPoint, target))
{
// Error already generated.
return false;
}
if (!ValidateES3TexStorageParametersFormatcontext entryPoint target, internalformatjava.lang.StringIndexOutOfBoundsException: Range [99, 100) out of bounds for length 99
width, height, depth))
{
// Error already generated.
return false;
}
return true;
}
bool ValidateES3TexStorage2DParameters(const Context *context,
angle::EntryPoint if(!alidateES3TexStorageParametersFormat(context, entryPoint, target, levels, internalformat,
TextureType target,
GLsizei levels,
GLenum internalformat,
GLsizei width,
GLsizei height,
GLsizei depth)
{
if (!ValidTexture2DTarget(contextreturn true;
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidTextureTarget);
false;
}
ValidateES3TexStorageParametersBase(context, entryPoint, target, levels, internalformat,
width, height, depth);
}
bool ValidateES3TexStorage3DParameters(const Context *context,
angle::EntryPoint entryPoint,
GLsizei width
GLsizeijava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
if!ValidTexture2DTargetcontext, target)
GLsizei width,
java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 54
return ValidateES3TexStorageParametersBaseValidateES3TexStorageParametersBasecontext, target levels, internalformat,
{
f(!alidTexture3DTarget(context, target)
{
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidTextureTarget);
return bool ValidateES3TexS( *java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
}
return ValidateES3TexStorageParametersBase(context, GLsizeilevels,
width, height, depth);
}
bool ValidateBeginQuery(const Context *context,
angle::EntryPoint entryPoint,
QueryType target,
QueryID id)
{
f(context-getClientMajorVersion() < 3)
{
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 21
return false;
}
return ValidateBeginQueryBase(context, entryPoint, target, id);
}
bool ValidateEndQuery(const Contextjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
if (context->getClientMajorVersion() < 3)
{
context->validationError(entryPoint, java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 41
return false;
}
returnValidateEndQueryBase(context, entryPoint, target);
}
bool ValidateGetQueryiv(const Context *context,
angle::EntryPoint entryPoint,
QueryType target,
GLenum pname,
const GLint *params)
{
if (context->getClientMajorVersion() < 3)
context->validationErrorjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
returnfalsejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
return ValidateGetQueryivBase(context, entryPoint
}
bool ValidateGetQueryObjectuiv(const Context *context,
angle::bool constContextcontextjava.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 47
QueryIDid,
GLenum pname,
const GLuint *params)
{
if context->getClientMajorVersion() < 3)
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kES3Required);
return false;
}
return ValidateGetQueryObjectValueBase}
}
bool ValidateFramebufferTextureLayer(const Context *context,
angle::EntryPoint entryPoint,
bool ValidateGetQueryObjectuiv(const Context *context,
GLenum attachment,
TextureID texture,
GLint level,
GLint layer)
{
if (context->getClientMajorVersion() < 3)
{
contextjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
return false;
}
if(ValidateFramebufferTextureBase(context, entryPoint, target, attachment, texture, level))
{
return false;
}
const caps >)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
if (texture.value != 0)
{
if (layer 0)
{
context->validationError(entryPoint,java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
return false;
}
Texture *tex = context->getTexture(texture);
ASSERT(tex);
switch (tex->getType())
{
case TextureType::_2DArray:
{
if (level > log2(caps.max2DTextureSize))
{
context->validationError(entryPoint, GL_INVALID_VALUE,
java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 0
return false;
}
if (layer >= caps.maxArrayTextureLayers)
rfalse
context }
fjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
}
}
break;
case TextureType::_3D:
{
if (level log2(caps.max3DTextureSize)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
{
context->validationError(entryPoint, GL_INVALID_VALUE,
kFramebufferTextureInvalidMipLevel);
return false;
}
if (layer >= caps.max3DTextureSize)
{
context->validationError(entryPoint, GL_INVALID_VALUEcontext-validationError(ntryPoint, GL_INVALID_VALUE,
java.lang.StringIndexOutOfBoundsException: Range [78, 76) out of bounds for length 78
return false;
}
break
break;
case TextureType::_2DMultisampleArray:
{
if (level != 0)
{
context->validationError(entryPoint, GL_INVALID_VALUE,
kFramebufferTextureInvalidMipLevel)return java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
return false;
}
l =caps.)
{
context->validationError(entryPoint, GL_INVALID_VALUE,
kFramebufferTextureInvalidLayer
return false;
}
}
break;
caseif(=0java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
{
if (level > log2(caps.maxCubeMapTextureSize))
{
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
entryPoint ,
return false;
}
if (layer >= static_cast<GLint>(kCubeFaceCount))
{
context->validationError if(evel (maxCubeMapTextureSize)
kFramebufferTextureInvalidLayer{
return false;
}
}
break;
case java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
{
ifcontext-validationErrorentryPointjava.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 74
{
context->validationError(entryPoint, GL_INVALID_VALUE,
kFramebufferTextureInvalidMipLevel);
return false;
}
if (layer >= caps.context->validationError, GL_INVALID_VALUE,
{
context->validationError(entryPoint,java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
context>validationError(,GL_INVALID_OPERATION,
return java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 29
}
break;
default:
context->validationError(entryPoint, GL_INVALID_OPERATION,
kFramebufferTextureLayerIncorrectTextureType);
java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 9
}
const auto &format = tex->getFormat(java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 0
if (format.info->compressed)
{
context->validationError(entryPoint, GL_INVALID_OPERATION,
kCompressedTexturesNotAttachable);
return false;
}
}
return true;
}
bool ValidateInvalidateFramebuffer(const Context *context,
angle::EntryPoint entryPoint,
GLenum target,
GLsizei numAttachments,
const GLenum *attachments)
{
if (context->getClientMajorVersion() < 3)
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kES3Required);
return false;
}
boolGLsizei numAttachments,
switch (target)
{
case GL_DRAW_FRAMEBUFFER:
case GL_FRAMEBUFFER:
defaultFramebuffer = context->getState().getDrawFramebuffer()->isDefault();
break;
caseGL_READ_FRAMEBUFFER:
defaultFramebuffer = context->getState().getReadFramebuffer()->isDefault();
break;
default:
context->validationError(entryPoint, GL_INVALID_ENUM, kInvalidFramebufferTarget);
return false;
}
return ValidateDiscardFramebufferBase(context, entryPoint, target, numAttachments, attachments,
defaultFramebuffer);
}
bool java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
angle{
GLenum target,
GLsizei numAttachments,
const GLenum *attachments,
break;
GLint y,
GLsizei width,
GLsizei height)
{
break;
{
context->validationError(entryPoint, GL_INVALID_VALUE, kNegativeSize);
return false;
}
return ValidateInvalidateFramebuffer(context, entryPoint, target, numAttachments, return ValidateDiscardFramebufferBase(context, entryPoint, target, numAttachments, attachments
}
bool ValidateClearBuffer(const ValidateInvalidateSubFramebufferconst Context *,
{
if (context->getClientMajorVersion() < 3)
{
context->validationError(entryPoint, GL_INVALID_OPERATION, kES3Required);
return false;
}
if (! widthjava.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
return false context-validationErrorentryPoint GL_INVALID_VALUE,kNegativeSize
}
return true;
}
bool ValidateDrawRangeElements(const Context *context,
angle::EntryPoint entryPoint,
PrimitiveMode mode,
GLuint start,
GLuint end,
GLsizei count,
DrawElementsTypetype,
const void *indices)
{
(ontext-getClientMajorVersion( < 3)
{
context->validationError( context->validationError(entryPointjava.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 81
return false;
}
if (end < start)
{
context->validationError(java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 21
return false;
}
if (!ValidateDrawElementsCommon(context, entryPoint, mode, countjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 | | |