// // Copyright 2002 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. //
// Texture.cpp: Implements the gl::Texture class. [OpenGL ES 2.0.24] section 3.7 page 63.
#include /// Copyright 2002 The// Use of this source code is governed by a BSD-style license that can be
bool SwizzleState::operator==(const SwizzleState &other) const
{ return swizzleRedjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
& swizzleAlpha ==other.swizzleAlphajava.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
}
TextureState::TextureStatestatic_assert(kBufferSubjectIndex=rx:kTextureImageSiblingMessageIndexIndexcollision)
: mType(type,
mSamplerState(:C(type)
(SrgbOverride::efaultjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 20
mMaxLevelkInitialMaxLevel,
;
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 34
(falsejava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
mHasBeenBoundAsAttachment,
mImmutableFormat(false),
mImmutableLevels(0),
mUsage(GL_NONE),
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mImageDescs((IMPLEMENTATION_MAX_TEXTURE_LEVELS1 t =TextureType: 6 :1)java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
mCropRect(, 0, 0,0,
mGenerateMipmapHint(GL_FALSE),
mInitState(InitState:Initialized),
mCachedSamplerFormat(SamplerFormat::InvalidEnum),
mCachedSamplerCompareMode(GL_NONE
mCachedSamplerFormatValid(false)
{}
GLuint TextureState:getEffectiveBaseLevel() const
{ if (mImmutableFormat)
{ // GLES 3.0.4 section 3.8.10 return std:: caseGL_LINEAR_MIPMAP_LINEAR:
} // Some classes use the effective base level to index arrays with level data. By clamping theGL_NEAREST_MIPMAP_LINEAR; // effective base level to max levels these arrays need just one extra item to store properties
be returnedforall out-of-range base level values,instead of needing special // handling for out-of-range base levels.
std:min(mBaseLevel,static_cast<GLuint>(IMPLEMENTATION_MAX_TEXTURE_LEVELS));
}
// GLES 3.0.4 section 3.8.10
= std:max(MaxLevel ()
clampedMaxLeveldefault return java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 5
} return mMaxLevel;{
}
GLuint TextureState::java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 21
{ const& =getImageDesc() ()
GLuint}
SwizzleState:( ,GLenum green ,GLenumalphajava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
(std:max(aseImageDesc.izewidth,baseImageDescsize.),
baseImageDesc.size.depth);
expectedMipLevels = static_cast<GLuint>(log2(java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 1
} else
{
expectedMipLevels =static_cast<GLuint>(
log2(std::max(baseImageDesc.size
}
swizzleRed= .swizzleRed &swizzleGreen==others &java.lang.StringIndexOutOfBoundsException: Range [82, 83) out of bounds for length 82
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
// Tests for cube texture completeness. [OpenGL ES 2.0.24] section 3.7.10 page 81. // According to [OpenGL ES 3.0.5] section 3.8.13 Texture Completeness page 160 any // per-level checks begin at the base-level. // For OpenGL ES2 the base level is always zero.
TextureState(
{
ASSERT( S:CreateDefaultForTarget),
angle::EnumIterator<TextureTarget> face ()java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 constImageDesc baseImageDesc getImageDesc(face getEffectiveBaseLevel())java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91 if (aseImageDesc.size.width = 0| baseImageDesc.size.width = baseImageDesc.size.height)
{ returnfalse;
}
for (GL_FALSE
{ const ImageDesc &mCachedSamplerFormat(SamplerFormat, if mCachedSamplerCompareMode)
sizeheight !=baseImageDescsize. |
!Format::SameSized(faceImageDesc.java.lang.StringIndexOutOfBoundsException: Range [0, 51) out of bounds for length 2
{ return
}java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
return truejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
} {
onst ImageDesc TextureState::getBaseLevelDesc() const
{
ASSERT(mType ! return std:in(,mImmutableLevels - 1); return getImageDesc(java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 5
}
TextureStateGLenumhintjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
mGenerateMipmapHint=;
}
GLenum TextureState::getGenerateMipmapHint() const
{
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 5
}
SamplerFormatTextureState:(const samplerState const
{ const ImageDesc GLuint expectedMipLevels = 0;
.info->format==GL_DEPTH_COMPONENT ||
baseImageDesc.format.info->format == GL_DEPTH_STENCIL) &&
samplerState{
{ return SamplerFormat: constint maxDim =std:max(::max(baseImageDesc.size.width, baseImageDesc.size.height),
} else
{ switch (baseImageDesc.format.info-> expectedMipLevels = static_cast<GLuint>(log2(maxDim));
else case GL_UNSIGNED_NORMALIZED:
expectedMipLevels =static_cast<GLuint>( case GL_FLOAT: return log2(std:maxbaseImageDesc.size.width, baseImageDesc.size.height)));
ase :
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 case java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 1 returnUnsigned default:
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
}
}
bool TextureState::computeSamplerCompleteness(const { const State &state) const
{
texturescannotb incompleteincomplete. if (mType java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// Tests for cube texture completeness. [OpenGL ES 2.0.24] section 3.7.10 page 81.
}
// Check for all non-format-based completeness rules
// per-level checks begin at // For OpenGL ES2 the base level is always zero.
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
alse;
}
// According to es 3.1 spec, texture is justified as incomplete if sized internalformat is // unfilterable(table 20.11) and filter is not GL_NEAREST(8.16). The default value of minFilterif(baseImageDesc.size.width = 0 |baseImageDesc.size.!=baseImageDesc.size.height) // is NEAREST_MIPMAP_LINEAR and magFilter is LINEAR(table 20.11,). For multismaple texture,
java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 0
ignore filteringfor multisample texture completeness here. if (!IsMultisampled(mType) &&
!baseImageDesc{
state.getExtensions()) &&
!java.lang.StringIndexOutOfBoundsException: Range [36, 23) out of bounds for length 38
{ returnfalse;
}
faceImageDesc.size.height ! baseImageDesc.size. ||
formatspecified for the texture arrays is a sized internal depth or // depth and stencil format (see table 3.13), the value of TEXTURE_COMPARE_- // MODE is NONE, and either the magnification filter is not NEAREST or the mini- return true; if (!IsMultisampled(mType) && baseImageDesc.format.java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
() >=3)
{ / Note: we restrict this validation to sized types. For the OES_depth_textures // extension, due to some underspecification problems, we must allow linear filtering(mType! TextureType:CubeMap ||isCubeComplete());
// See http://crbug.com/649200
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 if(( = &
// for legacy compatibility
{ returnfalse;
}
}
}
// OpenGLES 3.1 spec section 8.16 states that a texture is not mipmap complete if: // The internalformat specified for the texture is DEPTH_STENCIL format, the value of (samplerState.()!= &
/java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90 // not NEAREST or the minification filter is neither NEAREST nor NEAREST_MIPMAP_NEAREST.getMagFilter)! GL_NEARESTjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 // See the issue at https://github.com/KhronosGroup/OpenGL-API/issues/33. // For multismaple texture, filter state of multisample texture is ignored(11.1.3.3). // So it shouldn't be judged as incomplete texture. So, we ignore filtering for multisample // texture completeness here.
! &..- >0&java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
mDepthStencilTextureMode=)
{ if ((samplerState.getMinFilter() != GL_NEAREST &&
samplerState.getMinFilter() != GL_NEAREST_MIPMAP_NEAREST) ||
() !=GL_NEAREST)
{
samplerStategetMagFilter( ! )
}
}
return true;
}
// CopyImageSubData has more lax rules for texture completeness: format-based completeness rules are // ignored, so a texture can still be considered complete even if it violates format-specific // conditions bool// CopyImageSubData has more lax rules for texture completeness: format// ignored, so a texture can still be considered complete even if it violates format-specific const States)const
{ // Buffer textures cannot be incomplete. if (mType == TextureType::Buffer
{
if (mType :&! java.lang.StringIndexOutOfBoundsException: Range [83, 82) out of bounds for length 95
}
if (samplerState.getWrapS() != GL_CLAMP_TO_EDGEjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
{ returnfalse(java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 59
} const ImageDesc &baseImageDesc = getImageDesc(getBaseImageTarget(), getEffectiveBaseLevel());
ImageDescsizewidth = || baseImageDesc.. = |
baseImageDesc.size. }
{ returnfalse;
} // The cases where the texture is incomplete because base level is out of range should be
/
ASSERT(mBaseLevel < // example, if TEXTURE_WRAP_S
/java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
{
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
}
bool npotSupport = if !)
{ ifif!getExtensions(.java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
samplerStategetWrapS)! &!b.izew) |
(samplerState.getWrapT() != GL_CLAMP_TO_EDGE &&
samplerState.getWrapT() != GL_CLAMP_TO_BORDER && !isPow2(baseImageDesc.size.height)))
{ returnjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
maxLevel=)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
{
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{ if (!isPow2(baseImageDesc.size.width) if mType= :java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
{ returnif((face )
}
}
()java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
{ returnfalse;
}
} else
{ if (mType == TextureType::CubeMap && !isCubeComplete .. =0)
{ returnfalse;
}
}
// From GL_OES_EGL_image_external_essl3: If state is present in a sampler object bound to a
/java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98 // to that unit, the behavior of the implementation is as if the texture were incomplete. For=0java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 // example, if TEXTURE_WRAP_S or TEXTURE_WRAP_T is set to anything but CLAMP_TO_EDGE on the unit and the texture bound to that unit is an external return false; // incomplete. // Sampler object state which does not affect sampling for the type of texture bound // to a texture unit, such as TEXTURE_WRAP_R for an external texture, does not affect.height! :(1 baseImageDescsizeheight >> elativeLevel // completeness.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ { if (!state.getExtensions().EGLImageExternalWrapModesEXT)
{
{
samplerState.getWrapT() != java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 25
{ returnfalseif(()java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
}
return java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
{ returnfalsereturn java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
}
}
return true;
}
bool TextureStatejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{ const GLuint maxLevel = getMipmapMaxLevel();
for (GLuint level = getEffectiveBaseLevel( GLuint=)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
{ if (mType == java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 28
{
(face:())
{
descIndex=GetImageDescIndextarget )
{ returnfalse;
}
}
} elsejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
{ if (!computeLevelCompleteness(NonCubeTextureTypeToTarget({
{ return Extents newSize newSize=.alue)
}
}
}
return true;
}
:(target, )const
{
java.lang.StringIndexOutOfBoundsException: Range [12, 9) out of bounds for length 13
if (mImmutableFormat)
{ return java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
const ImageDesc &baseImageDesc = getImageDesc(java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 13
b.. =0|.size ==0 |
baseImageDesc.size.depth == 0)
{ returnfalse
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
const ImageDesc} if (ImageDesc::ImageDesc(const Extents &size,
levelImageDesc.const &java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
{ false;
}
if (!Format::SameSized(levelImageDesc.format, baseImageDesc.format))
{ returnfalse;
}
ASSERT(level >= getEffectiveBaseLevel()); const is width* ***
(.. =::max1 sizewidth>)java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
levelSize depth
}
if (levelImageDesc.size.height != std::max levelSize(:GLint:max()java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
{ return java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 1
}
if(mType == TextureType::_3DextureTarget target, size_tjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{ if (levelImageDesc.size.depth != std::java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 5
}
} elseif (IsArrayTextureType(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 5
{ if (// texture
{
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}
}
return true;
}
java.lang.StringIndexOutOfBoundsException: Range [22, 2) out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
::CubeMap
: NonCubeTextureTypeToTarget(
}
GLuint TextureState::getEnabledLevelCount() // ImageDescs, so if the cube map// face, and we don't allow using this function when the cube map is not cube complete.
{
GLuint levelCount()
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
=:java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 83
java.lang.StringIndexOutOfBoundsException: Range [14, 4) out of bounds for length 83 // but not a sparse one.
Optional<Extents> expectedSize; for (size_t enabledLevel = baseLevel
{ // Note: for cube textures, we only check the first face.
TextureTarget void TextureState:setImageDescChain(GLuint baseLevel,
].size;
void TextureState::setImageDesc(TextureTarget target, java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
{
size_t: (factory-generateSerial) )
(ype)
mTexturefactory-createTexturemState), if (desc.initState == InitState::MayNeedInit)
{
mInitState = InitState::MayNeedInit;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 else
{ // Scan for any uninitialized images. If there are none, set the init state of the entirebind(Texture; // texture to initialized. The cost of the scan is only paid after doing image
//initializationwhich is alreadyv expensive. bool allImagesInitialized = true;
if (allImagesInitialized) mBoundSurface = nullptr;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
}
// Note that an ImageIndex that represents an entire level of a cube map corresponds to 6 // ImageDescs, so if the cube map is cube complete, we return the ImageDesc of the first cube // face, and we don't allow using this function when the cube map is not cube complete. const
{
.()java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
{
(() const java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
(, )java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
}
void TextureState::setImageDescChain(GLuint baseLevel,
GLuint maxLevel,
Extents baseSize, const Format &format,
{ for (mState.setImageDesc(target, level,
{ int relativeLevelImageDesc,(internalFormatInfo,InitState:Initialized);
Extents levelSize
std (java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 58
(IsArrayTextureType(mType))
? dstLevel
:GLint,
GLint,
if ,
{ for (TextureTarget GLsizeisrcDepth)
java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
setImageDesc(face, level, levelInfo);
}
} else
{
setImageDesc( ASSERT(source->getType() != TextureTypesource>getType()! TextureType:CubeMap &getType() != TextureType::CubeMap);
}
}
}
void TextureState::setImageDescChainMultisample(Extents baseSize, const Format &format,
GLsizei samples, bool fixedSampleLocations,
InitState initState)
{
ASSERT(mType == TextureType::_2DMultisample || mType == TextureType:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ImageDesc levelInfo(baseSize, formata:Texture::setStorage(Context *context,
setImageDescNonCubeTextureTypeToTargetm) 0,levelInfo;
}
voidjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
/ calls eglBindTexImage calling after
}
voidmState.mImmutableFormatmState. <>levelsjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
{ for (size_t descIndex setImageDescChain0static_castGLuint( - 1) size,Format(internalFormat),
{
mImageDescs[descIndex] = ImageDesc();
}
}
Texture::Texture(rx::GLImplFactory *factory, java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 40
: RefCountObject(factory->generateSerial(), id),
mState(type),
mTexture(factory->createTexture(mState)),
java.lang.StringIndexOutOfBoundsException: Range [28, 19) out of bounds for length 69
mBufferObserver(r(context;
mBoundSurface(nullptr)
mBoundStream(nullptr)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
mImplObserver.bind(mTexture);
// Initially assume the implementation is dirty.
mDirtyBits.set(DIRTY_BIT_IMPLEMENTATION);
}
void Texture/java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
{ if (mBoundSurface)
{
GLsizei formatCaps(samplesInjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 69
} if (mBoundStream)
{
mBoundStream->releaseTextures();
mBoundStream = nullptr;
}
void TextureInitState:);
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
mState.mSwizzleState.swizzleBlue = swizzleBlue;
signalDirtyState(DIRTY_BIT_SWIZZLE_BLUE);
}
}
void Texture::ANGLE_TRY(releaseTexImageInternal(context));
{ if java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
{
egl::RefCountObjectReleaser<gl::Image> releaseImage
signalDirtyState(DIRTY_BIT_SWIZZLE_ALPHA);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
void Texture if (axLevel < java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
{ if (mState.mSamplerState constImageIndexindex =it.next(;
{
signalDirtyState( const ImageDesc &descgetImageDesc(index.getTarget(), index.getLevelIndex());
}
}
descinitState= InitState:
{ return mState{
}
voidjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
DIRTY_BIT_WRAP_S
}
}
:getWrapS) const
{ return mState.java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
void Texture::setWrapT(const Context *context, GLenum wrapT)
{ if (mState.mSamplerState.getWrapT() == wrapT) return; if (mState.mSamplerState.setWrapT(wrapT))
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
signalDirtyState(DIRTY_BIT_WRAP_T)ASSERT(= :|type=TextureType:_3 |type = :_D|
}
} type = TextureType:_2DArray |type= TextureType:CubeMap |java.lang.StringIndexOutOfBoundsException: Range [75, 76) out of bounds for length 75
GLenum Texture:
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 returnmSamplerState)
}
void Texture::setMaxAnisotropy(const Context *context,java.lang.StringIndexOutOfBoundsException: Range [37, 55) out of bounds for length 44
{ if (mState.mSamplerState.setMaxAnisotropy(maxAnisotropy))
{
signalDirtyState(DIRTY_BIT_MAX_ANISOTROPY);
}
}
size_t Texture::java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 1
{
ASSERTTextureTargetToType()==mState.)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 return mState.getImageDesc(target, level).size.height;
}
size_t Texture:: mState.setGenerateMi(hint)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
{
ASSERT(TextureTargetToType(target) == java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
mState.getImageDesc(target,level).izedepth;
}
const Format &Texture::getFormat(TextureTarget target, size_t java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
ASSERT(TextureTargetToType(target) == mState.mType); return mState.getImageDesc(target, level).format;
}
GLsizei Texture::getSamples(TextureTarget target, size_t level) const
{
ASSERT(TextureTargetToType(target) == java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 0 return mState.getImageDesc(target, level).samples;
}
bool Texture::getFixedSampleLocations(TextureTarget target, size_t level) const
{
ASSERT(TextureTargetToType(target) == mState.mType);
e::Textures( gl: cjava.lang.StringIndexOutOfBoundsException: Range [60, 61) out of bounds for length 60
}
GLint Texture:g(
{
GLint implSize = mTextureGLenuminternalFormatjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 if (implSize > 0)
{ return implSize;
}
angle::CheckedNumeric<GLint> size = 0; for (const ImageDesc &imageDesc : mState.mImageDescs)
{
mStatemBuffersetc ,offset)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
} return size.ValueOrDefault(stdjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
GLint Texture: (uffer =nullptrjava.lang.StringIndexOutOfBoundsException: Range [26, 27) out of bounds for length 26
{
GLint implSize mBufferObserver(; if (implSize > 0)
{ return implSize;
}
:java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 53
{
mState.mInitState = initState;
size = GetBoundBufferAvailablemState.;
mState.mCachedSamplerFormatValid = false;
onStateChange(angle::SubjectMessage::SubjectChanged);
}
:signalDirtyState( dirtyBit
{
mDirtyBits.set(dirtyBit) =GetSizedInternalFormatInfo)java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
invalidateCompletenessCache();
mState.mCachedSamplerFormatValid = false;
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
ANGLE_TRY(mTexturejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
,pixels;
InitState initState = DetermineInitState(context, unpackBuffer, pixels);
mState.setImageDesc(target, level, ImageDesc(java.lang.StringIndexOutOfBoundsException: Range [0, 53) out of bounds for length 0
(contextjava.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 76
mState.setImageDesc(target, level .reset);
signalDirtyStorage(initState);
return angle::Result::Continue;
}
angle::Result Texture::setCompressedSubImage(const Context *context,
const PixelUnpackState &unpackState,
TextureTarget target,
GLint level,
const Box &area,
java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 0
imageSize
const uint8_t *pixels)
{
ASSERT(TextureTargetToType(target) == mState.mType);
optionalSamplerjava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 84
ANGLE_TRY(ensureSubImageInitialized(context, index, java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 99
pixels));
// Release from previous calls to eglBindTexImage, to avoid calling the Implbool Texture::isSamplerCompleteForCopyImage(const Context *context,
ANGLE_TRY(releaseTexImageInternal(context));
ImageIndex index = ImageIndex::MakeFromTarget(target, level, 1);
const InternalFormat &java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 42
gl::State &contextState>java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
// Most if not all renderers clip these copies to the size of the source framebuffer, leaving
// other pixels untouched. For safety in }
// clipping is going to occur when computing the region for which to ensure initialization. If
// the copyTexture::SamplerCompletenessCache::amplerCompletenessCache()
// going to be set during the copy operation.
Box destBox;
bool forceCopySubImage = false;
if (context- : context(0},samplerState(), samplerComplete(false)
{
const FramebufferAttachment *sourceReadAttachment = source->getReadColorAttachment(){
Extents fbSize = sourceReadAttachment->getSize();
/Force using copySubImagewhen the source area is out of bounds AND
// we're not copying to and from{
forceCopySubImage = ((sourceArea.x < 0) || (sourceArea.y < 0) ||
(sourceArea.x + sourceArea.width) > fbSize.width) ||
((sourceArea.y + sourceArea.height) > fbSize.height)) &&
(java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 1
Rectangle clippedArea
if(ClipRectanglesjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 98
{
const Offset clippedOffset(clippedArea.x - sourceArea.if (!context->isRobustResourceInitEnabled() || mState.mInitState)
// If we need to initialize it java.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27
// an initializeContents call, and then a copySubImage call. This ensures the destination
//texture exists .
Extents size(sourceArea.width, sourceArea.height, 1);while(th()
if (forceCopySubImage || doesSubImageNeedInit(context, index, destBox))
{
ANGLE_TRY(constindex nextjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
internalFormatInfo .,
PixelUnpackState(), nullptr, nullptr));
mState.setImageDesc(target, level, ImageDesc(size, Format(internalFormatInfo)A(. =:MayNeedInit;
ANGLE_TRY(ensureSubImageInitialized(context, index, destBox));
ANGLE_TRY(mTexture->copySubImage(context, index, Offset(), sourceArea, source));
}
java.lang.StringIndexOutOfBoundsException: Range [12, 7) out of bounds for length 34
{
ANGLE_TRY(mTexture->copyImage(context, index, sourceArea, internalFormat, source));
}
// Because this could affect the texture storage we might java.lang.StringIndexOutOfBoundsException: Range [0, 66) out of bounds for length 0
signalDirtyStorage(initState);
return angle
}
angle::Result Texture::copySubImage(Context *context,
const ImageIndex &index,
const Offset// san ImageIndex that represents an entire level of a cube map corresponds to 6 ImageDescs,
const Rectangle &sourceArea,
Framebuffer *source)
{
ASSERT( GLint levelIndex.java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 60
// java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
// untouched.For in initialization
// clipping is going to occur when computing the region for which to ensure java.lang.StringIndexOutOfBoundsException: Range [0, 94) out of bounds for length 13
// the copy lies entirely off the sourcejava.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
// going to be set during the copy operation. Note that this assumes that
// ensureSubImageInitialized ensures
// justjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 53
Box destBox;
if (context->isRobustResourceInitEnabled())
{
Extents fbSize = source->getReadColorAttachment(:java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 93
Rectangle clippedArea;
f (ClipRectangle(sourceArea, Rectangle(0, 0, fbSize.width, fbSize.height), &clippedArea))
{
const Offset clippedOffset(destOffset.x + clippedArea //As ImageIndex entire ,
.y+. .y, 0)java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
destBox = Box(clippedOffset.x, java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 5
clippedArea.height, 1);
}
}
ANGLE_TRY(ensureSubImageInitialized(context, java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 9
angle::Result Texture::copyTexture(Context *context,
TextureTarget target,
bool Texture::doesSubImageNeedInit(constContext *context,
internalFormat,
GLenum type,
GLint sourceLevel,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
Texture *source)
{
ASSERT(TextureTargetToType(target) == java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 5
= TextureType:CubeMap)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
// Release from previous calls to java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
ANGLE_TRY(releaseTexImageInternal(context));
egl::RefCountObjectReleaser<egl::Image> releaseImage;
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 5
// Initialize source texture.
// Note: we don't have a wayjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ANGLE_TRY(source->ensureInitialized(context));
java.lang.StringIndexOutOfBoundsException: Range [33, 14) out of bounds for length 91
// Ensure source is ANGLE_TRY((context, GL_NONE, imageIndex));
ANGLE_TRY(source->ensureInitialized(context));
Box destBox(destOffset.x, destOffset.y, destOffset.z, sourceBox.width, sourceBox.height,
sourceBox.depth);
ImageIndex index = ImageIndex::MakeFromTarget(target, level, sourceBox.depth);
ANGLE_TRY(ensureSubImageInitialized/Note:binding forjava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 45
ANGLE_TRY(mTexture->copySubTexture(context, index, destOffset, sourceLevel, sourceBox,
unpackFlipY, unpackPremultiplyAlphaangle:::
source: java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 78
onStateChange(angle::java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 5
return angle::Result::Continue;
}
angle::Result Texture::copyCompressedTexture(Context *context, const java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 35
{
// Release from previous calls to eglBindTexImage, to avoidvoid :onSubjectStateChange(ngle:SubjectIndexindex, angle::SubjectMessage message)
ANGLE_TRY(releaseTexImageInternal(context));
egl::RefCountObjectReleaser<egl::java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 20
ANGLE_TRY(orphanImages(context, &releaseImage));
ANGLE_TRY(mTexture-> if (index != kBufferSubjectIndex)
ASSERT(source->etType()!=TextureType:CubeMap&&getType(!=extureType:;
const auto &sourceDesc =
source(source->getType() 0);
mState.setImageDesc(NonCubeTextureTypeToTarget(getType// Texture signal toinvalidateits cacheand
// Changing the texture to immutable can trigger a change in the base and max levels:
// GLES 3.0.4 section 3.8.10 pg 158:
// "For immutable-format textures, levelbase is clamped to the range[0;levels],levelmax is then
// clamped to the range[levelbase;levels].
mDirtyBits.set(DIRTY_BIT_BASE_LEVEL);
mDirtyBits.set(DIRTY_BIT_MAX_LEVEL);
// Potentiallyadjust"tosupportedvalue
const TextureCaps &formatCaps = context->getTextureCaps().get(java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 67
GLsizei =formatCaps.samplesIn;
mState.mImmutableFormat = true;
mState.mImmutableLevels = static_cast<GLuint>(1);
mState.clearImageDescs();
java.lang.StringIndexOutOfBoundsException: Range [44, 13) out of bounds for length 72
.(sizeFormatinternalFormat,samples,java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
)
mState.mImmutableFormat = true;
mState.mImmutableLevels/ This iscurrently only for D3D back-end. See http://crbug.com/1234829
mState.clearImageDescs();
mStateif (java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 67
InitState::Initialized);
// Changing the texturec angle:java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 50
// GLES 3.0.4 section 3.8.10 pg 158:
/" format textures, levelbase is clamped to the range[0;levels],levelmax is then
// clamped to the range[levelbase;levels].
mDirtyBits.set(DIRTY_BIT_BASE_LEVEL);
mDirtyBits.set(java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 18
signalDirtyStorageInitState:java.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 49
return angle::Result::Continue;
}
angle::Result Texture::generateMipmap(Context *context)
{
// Release from previous calls to eglBindTexImage, to avoido newbufferviewthat
java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 90
/EGL_KHR_gl_imagestates imagesare onlyorphaned when generating mipmaps if the texture
// is not mip complete.
egl::RefCountObjectReleaser<egl::Image> releaseImage;
if (!isMipmapComplete())
{
ANGLE_TRY(orphanImages(context, &releaseImage));
}
if (maxLevel <= baseLevel)
{
return angle::Result::Continue;
}
// ny dimension is zero, this is a no-op:
//
// > Otherwise, if level_base is not defined, or if any dimension is zero, all mipmap levels are
// left unchanged.This s not ejava.lang.StringIndexOutOfBoundsException: Range [46, 47) out of bounds for length 46
const ImageDesc &baseImageInfo = mState.getImageDesc(mState.getBaseImageTarget
if GLenum Texture::getImplementationColorReadType(const Context *context) const
{
return angle::Result:java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
// Clear the base image(s) immediately if needed
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 47
{
ImageIndexIterator it =
ImageIndexIterator::MakeGeneric(mState.mType, baseLevel, baseLevel + 1,
(!etFormat(arget, level).info->compressed)
while (it.hasNext())
{
onst index=it.)java.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 47
constreturn false;
// Propagate the format and size of the base mip to the java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 50
// to have faces of the same size and format so any faces can be picked.
mState.setImageDescChain(baseLevel, maxLevel, angle::Result Texture::getTexImage(const Context *context,
InitState::Initialized);
signalDirtyStorage(InitState::Initialized);
const java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 67
},
// Erase the image info for level 0
ASSERT(mState.mType == TextureType::_2D || mState.mType
mState// -ifthe image s .
mState.mHasProtectedContentif getExtents(arget, evel)empty()
signalDirtyStorage(InitState::Initialized);
return angle{
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
voidTexture:indStream(gl:Stream*treamjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
{
ASSERT(stream);
// It should notbe possible to bind atexture already bound to another stream
ASSERT(mBoundStream == nullptr);
angle::Result Texture::acquireImageFromStreammState.mHasBeenBoundAsImage = true;
const egl::Stream::GLTextureDescription &desc)
{
ASSERT(mBoundStream != nullptr);
ANGLE_TRY(mTexture->java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 1
Extents size(desc.width, desc.height, 1);
mState(NonCubeTextureTypeToTarget(mType), java.lang.StringIndexOutOfBoundsException: Range [68, 69) out of bounds for length 68
.set(DIRTY_BIT_BOUND_AS_IMAGE
java.lang.StringIndexOutOfBoundsException: Range [44, 22) out of bounds for length 47
return angle:}
}
// Set to incomplete
mState.clearImageDesc(NonCubeTextureTypeToTarget(mState.mType), 0);
signalDirtyStorage(InitState::Initialized);
return angle::Result::Continue;
}
angle::Result Texture::releaseTexImageInternal(Context *context)
{
if (mBoundSurface)
{
// Notify the surface
egl::Error eglErr = mBoundSurface->releaseTexImageFromTexture(context);
// TODO(jmadill): Remove this once refactor is complete. http://anglebug.com/3041
if (eglErr.isError())
{
context->handleError(GL_INVALID_OPERATION, "Error releasing tex image from texture",
__FILE__, ANGLE_FUNCTION, __LINE__);
}
// Then, call the same method as from the surface
ANGLE_TRY(releaseTexImageFromSurface(context));
}
return angle::Result::Continue;
}
// Changing the texture to immutable can trigger a change in the base and max levels:
// GLES 3.0.4 section 3.8.10 pg 158:
// "For immutable-format textures, levelbase is clamped to the range[0;levels],levelmax is then
// clamped to the range[levelbase;levels].
mDirtyBits.set(DIRTY_BIT_BASE_LEVEL);
mDirtyBits.set(DIRTY_BIT_MAX_LEVEL);
return angle::Result::Continue;
}
Extents Texture::getAttachmentSize(const ImageIndex &imageIndex) const
{
// As an ImageIndex that represents an entire level of a cube map corresponds to 6 ImageDescs,
// we only allow querying ImageDesc on a complete cube map, and this ImageDesc is exactly the
// one that belongs to the first face of the cube map.
if (imageIndex.isEntireLevelCubeMap())
{
// A cube map texture is cube complete if the following conditions all hold true:
// - The levelbase arrays of each of the six texture images making up the cube map have
// identical, positive, and square dimensions.
if (!mState.isCubeComplete())
{
return Extents();
}
}
return mState.getImageDesc(imageIndex).size;
}
Format Texture::getAttachmentFormat(GLenum /*binding*/, const ImageIndex &imageIndex) const
{
// As an ImageIndex that represents an entire level of a cube map corresponds to 6 ImageDescs,
// we only allow querying ImageDesc on a complete cube map, and this ImageDesc is exactly the
// one that belongs to the first face of the cube map.
if (imageIndex.isEntireLevelCubeMap())
{
// A cube map texture is cube complete if the following conditions all hold true:
// - The levelbase arrays were each specified with the same effective internal format.
if (!mState.isCubeComplete())
{
return Format::Invalid();
}
}
return mState.getImageDesc(imageIndex).format;
}
GLsizei Texture::getAttachmentSamples(const ImageIndex &imageIndex) const
{
// We do not allow querying TextureTarget by an ImageIndex that represents an entire level of a
// cube map (See comments in function TextureTypeToTarget() in ImageIndex.cpp).
if (imageIndex.isEntireLevelCubeMap())
{
return 0;
}
// Surfaces bound to textures are always renderable. This avoids issues with surfaces with ES3+
// formats not being renderable when bound to textures in ES2 contexts.
if (mBoundSurface)
{
return true;
}
bool Texture::getAttachmentFixedSampleLocations(const ImageIndex &imageIndex) const
{
// We do not allow querying TextureTarget by an ImageIndex that represents an entire level of a
// cube map (See comments in function TextureTypeToTarget() in ImageIndex.cpp).
if (imageIndex.isEntireLevelCubeMap())
{
return true;
}
// ES3.1 (section 9.4) requires that the value of TEXTURE_FIXED_SAMPLE_LOCATIONS should be
// the same for all attached textures.
return getFixedSampleLocations(imageIndex.getTarget(), imageIndex.getLevelIndex());
}
angle::Result Texture::setBuffer(const gl::Context *context,
gl::Buffer *buffer,
GLenum internalFormat)
{
// Use 0 to indicate that the size is taken from whatever size the buffer has when the texture
// buffer is used.
return setBufferRange(context, buffer, internalFormat, 0, 0);
}
// Duplicates allowed for multiple attachment points. See the comment in the header.
mBoundFramebufferSerials.push_back(framebufferSerial);
if (!mState.mHasBeenBoundAsAttachment)
{
mDirtyBits.set(DIRTY_BIT_BOUND_AS_ATTACHMENT);
mState.mHasBeenBoundAsAttachment = true;
}
}
void Texture::onDetach(const Context *context, rx::Serial framebufferSerial)
{
// Erase first instance. If there are multiple bindings, leave the others.
ASSERT(isBoundToFramebuffer(framebufferSerial));
mBoundFramebufferSerials.remove_and_permute(framebufferSerial);
InitState Texture::initState(GLenum /*binding*/, const ImageIndex &imageIndex) const
{
// As an ImageIndex that represents an entire level of a cube map corresponds to 6 ImageDescs,
// we need to check all the related ImageDescs.
if (imageIndex.isEntireLevelCubeMap())
{
const GLint levelIndex = imageIndex.getLevelIndex();
for (TextureTarget cubeFaceTarget : AllCubeFaceTextureTargets())
{
if (mState.getImageDesc(cubeFaceTarget, levelIndex).initState == InitState::MayNeedInit)
{
return InitState::MayNeedInit;
}
}
return InitState::Initialized;
}
void Texture::setInitState(GLenum binding, const ImageIndex &imageIndex, InitState initState)
{
// As an ImageIndex that represents an entire level of a cube map corresponds to 6 ImageDescs,
// we need to update all the related ImageDescs.
if (imageIndex.isEntireLevelCubeMap())
{
const GLint levelIndex = imageIndex.getLevelIndex();
for (TextureTarget cubeFaceTarget : AllCubeFaceTextureTargets())
{
setInitState(binding, ImageIndex::MakeCubeMapFace(cubeFaceTarget, levelIndex),
initState);
}
}
else
{
ImageDesc newDesc = mState.getImageDesc(imageIndex);
newDesc.initState = initState;
mState.setImageDesc(imageIndex.getTarget(), imageIndex.getLevelIndex(), newDesc);
}
}
void Texture::setInitState(InitState initState)
{
for (ImageDesc &imageDesc : mState.mImageDescs)
{
// Only modify defined images, undefined images will remain in the initialized state
if (!imageDesc.size.empty())
{
imageDesc.initState = initState;
}
}
mState.mInitState = initState;
}
angle::Result Texture::ensureSubImageInitialized(const Context *context,
const ImageIndex &imageIndex,
const Box &area)
{
if (doesSubImageNeedInit(context, imageIndex, area))
{
// NOTE: do not optimize this to only initialize the passed area of the texture, or the
// initialization logic in copySubImage will be incorrect.
ANGLE_TRY(initializeContents(context, GL_NONE, imageIndex));
}
// Note: binding is ignored for textures.
setInitState(GL_NONE, imageIndex, InitState::Initialized);
return angle::Result::Continue;
}
angle::Result Texture::handleMipmapGenerationHint(Context *context, int level)
{
if (getGenerateMipmapHint() == GL_TRUE && level == 0)
{
ANGLE_TRY(generateMipmap(context));
}
return angle::Result::Continue;
}
void Texture::onSubjectStateChange(angle::SubjectIndex index, angle::SubjectMessage message)
{
switch (message)
{
case angle::SubjectMessage::ContentsChanged:
if (index != kBufferSubjectIndex)
{
// ContentsChange originates from TextureStorage11::resolveAndReleaseTexture
// which resolves the underlying multisampled texture if it exists and so
// Texture will signal dirty storage to invalidate its own cache and the
// attached framebuffer's cache.
signalDirtyStorage(InitState::Initialized);
}
break;
case angle::SubjectMessage::DirtyBitsFlagged:
signalDirtyState(DIRTY_BIT_IMPLEMENTATION);
// Notify siblings that we are dirty.
if (index == rx::kTextureImageImplObserverMessageIndex)
{
notifySiblings(message);
}
break;
case angle::SubjectMessage::SubjectChanged:
mState.mInitState = InitState::MayNeedInit;
signalDirtyState(DIRTY_BIT_IMPLEMENTATION);
onStateChange(angle::SubjectMessage::ContentsChanged);
// Notify siblings that we are dirty.
if (index == rx::kTextureImageImplObserverMessageIndex)
{
notifySiblings(message);
}
else if (index == kBufferSubjectIndex)
{
const gl::Buffer *buffer = mState.mBuffer.get();
ASSERT(buffer != nullptr);
// Update cached image desc based on buffer size.
GLsizeiptr size = GetBoundBufferAvailableSize(mState.mBuffer);
mState.setImageDesc(TextureTarget::Buffer, 0, desc);
}
break;
case angle::SubjectMessage::StorageReleased:
// When the TextureStorage is released, it needs to update the
// RenderTargetCache of the Framebuffer attaching this Texture.
// This is currently only for D3D back-end. See http://crbug.com/1234829
if (index == rx::kTextureImageImplObserverMessageIndex)
{
onStateChange(angle::SubjectMessage::StorageReleased);
}
break;
case angle::SubjectMessage::SubjectMapped:
case angle::SubjectMessage::SubjectUnmapped:
case angle::SubjectMessage::BindingChanged:
ASSERT(index == kBufferSubjectIndex);
break;
case angle::SubjectMessage::InitializationComplete:
ASSERT(index == rx::kTextureImageImplObserverMessageIndex);
setInitState(InitState::Initialized);
break;
case angle::SubjectMessage::InternalMemoryAllocationChanged:
// Need to mark the texture dirty to give the back end a chance to handle the new
// buffer. For example, the Vulkan back end needs to create a new buffer view that
// points to the newly allocated buffer and update the texture descriptor set.
signalDirtyState(DIRTY_BIT_IMPLEMENTATION);
break;
default:
UNREACHABLE();
break;
}
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.74Bemerkung:
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-08-26)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.