summaryrefslogtreecommitdiffstats
path: root/gfx/angle/src/libANGLE/Texture.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-11 18:11:13 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-11 18:11:13 +0200
commit4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0 (patch)
treef000dd831240707a03b8c806db292c2a15cde3ce /gfx/angle/src/libANGLE/Texture.cpp
parent3b7ffb477eec078c7036c92c6a51bb5de6de4f28 (diff)
downloadUXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.gz
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.lz
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.xz
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.zip
Roll back to ANGLE/2845
Diffstat (limited to 'gfx/angle/src/libANGLE/Texture.cpp')
-rwxr-xr-xgfx/angle/src/libANGLE/Texture.cpp67
1 files changed, 2 insertions, 65 deletions
diff --git a/gfx/angle/src/libANGLE/Texture.cpp b/gfx/angle/src/libANGLE/Texture.cpp
index edba11bd4..ae46973d0 100755
--- a/gfx/angle/src/libANGLE/Texture.cpp
+++ b/gfx/angle/src/libANGLE/Texture.cpp
@@ -301,13 +301,9 @@ bool TextureState::computeSamplerCompleteness(const SamplerState &samplerState,
// 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-
// fication filter is neither NEAREST nor NEAREST_MIPMAP_NEAREST.
- if (baseImageDesc.format.info->depthBits > 0 && data.getClientMajorVersion() >= 3)
+ if (baseImageDesc.format.info->depthBits > 0 && data.getClientMajorVersion() > 2)
{
- // Note: we restrict this validation to sized types. For the OES_depth_textures
- // extension, due to some underspecification problems, we must allow linear filtering
- // for legacy compatibility with WebGL 1.
- // See http://crbug.com/649200
- if (samplerState.compareMode == GL_NONE && baseImageDesc.format.sized)
+ if (samplerState.compareMode == GL_NONE)
{
if ((samplerState.minFilter != GL_NEAREST &&
samplerState.minFilter != GL_NEAREST_MIPMAP_NEAREST) ||
@@ -516,7 +512,6 @@ Texture::~Texture()
void Texture::setLabel(const std::string &label)
{
mLabel = label;
- mDirtyBits.set(DIRTY_BIT_LABEL);
}
const std::string &Texture::getLabel() const
@@ -532,7 +527,6 @@ GLenum Texture::getTarget() const
void Texture::setSwizzleRed(GLenum swizzleRed)
{
mState.mSwizzleState.swizzleRed = swizzleRed;
- mDirtyBits.set(DIRTY_BIT_SWIZZLE_RED);
}
GLenum Texture::getSwizzleRed() const
@@ -543,7 +537,6 @@ GLenum Texture::getSwizzleRed() const
void Texture::setSwizzleGreen(GLenum swizzleGreen)
{
mState.mSwizzleState.swizzleGreen = swizzleGreen;
- mDirtyBits.set(DIRTY_BIT_SWIZZLE_GREEN);
}
GLenum Texture::getSwizzleGreen() const
@@ -554,7 +547,6 @@ GLenum Texture::getSwizzleGreen() const
void Texture::setSwizzleBlue(GLenum swizzleBlue)
{
mState.mSwizzleState.swizzleBlue = swizzleBlue;
- mDirtyBits.set(DIRTY_BIT_SWIZZLE_BLUE);
}
GLenum Texture::getSwizzleBlue() const
@@ -565,7 +557,6 @@ GLenum Texture::getSwizzleBlue() const
void Texture::setSwizzleAlpha(GLenum swizzleAlpha)
{
mState.mSwizzleState.swizzleAlpha = swizzleAlpha;
- mDirtyBits.set(DIRTY_BIT_SWIZZLE_ALPHA);
}
GLenum Texture::getSwizzleAlpha() const
@@ -576,7 +567,6 @@ GLenum Texture::getSwizzleAlpha() const
void Texture::setMinFilter(GLenum minFilter)
{
mState.mSamplerState.minFilter = minFilter;
- mDirtyBits.set(DIRTY_BIT_MIN_FILTER);
}
GLenum Texture::getMinFilter() const
@@ -587,7 +577,6 @@ GLenum Texture::getMinFilter() const
void Texture::setMagFilter(GLenum magFilter)
{
mState.mSamplerState.magFilter = magFilter;
- mDirtyBits.set(DIRTY_BIT_MAG_FILTER);
}
GLenum Texture::getMagFilter() const
@@ -598,7 +587,6 @@ GLenum Texture::getMagFilter() const
void Texture::setWrapS(GLenum wrapS)
{
mState.mSamplerState.wrapS = wrapS;
- mDirtyBits.set(DIRTY_BIT_WRAP_S);
}
GLenum Texture::getWrapS() const
@@ -609,7 +597,6 @@ GLenum Texture::getWrapS() const
void Texture::setWrapT(GLenum wrapT)
{
mState.mSamplerState.wrapT = wrapT;
- mDirtyBits.set(DIRTY_BIT_WRAP_T);
}
GLenum Texture::getWrapT() const
@@ -620,7 +607,6 @@ GLenum Texture::getWrapT() const
void Texture::setWrapR(GLenum wrapR)
{
mState.mSamplerState.wrapR = wrapR;
- mDirtyBits.set(DIRTY_BIT_WRAP_R);
}
GLenum Texture::getWrapR() const
@@ -631,7 +617,6 @@ GLenum Texture::getWrapR() const
void Texture::setMaxAnisotropy(float maxAnisotropy)
{
mState.mSamplerState.maxAnisotropy = maxAnisotropy;
- mDirtyBits.set(DIRTY_BIT_MAX_ANISOTROPY);
}
float Texture::getMaxAnisotropy() const
@@ -642,7 +627,6 @@ float Texture::getMaxAnisotropy() const
void Texture::setMinLod(GLfloat minLod)
{
mState.mSamplerState.minLod = minLod;
- mDirtyBits.set(DIRTY_BIT_MIN_LOD);
}
GLfloat Texture::getMinLod() const
@@ -653,7 +637,6 @@ GLfloat Texture::getMinLod() const
void Texture::setMaxLod(GLfloat maxLod)
{
mState.mSamplerState.maxLod = maxLod;
- mDirtyBits.set(DIRTY_BIT_MAX_LOD);
}
GLfloat Texture::getMaxLod() const
@@ -664,7 +647,6 @@ GLfloat Texture::getMaxLod() const
void Texture::setCompareMode(GLenum compareMode)
{
mState.mSamplerState.compareMode = compareMode;
- mDirtyBits.set(DIRTY_BIT_COMPARE_MODE);
}
GLenum Texture::getCompareMode() const
@@ -675,7 +657,6 @@ GLenum Texture::getCompareMode() const
void Texture::setCompareFunc(GLenum compareFunc)
{
mState.mSamplerState.compareFunc = compareFunc;
- mDirtyBits.set(DIRTY_BIT_COMPARE_FUNC);
}
GLenum Texture::getCompareFunc() const
@@ -683,17 +664,6 @@ GLenum Texture::getCompareFunc() const
return mState.mSamplerState.compareFunc;
}
-void Texture::setSRGBDecode(GLenum sRGBDecode)
-{
- mState.mSamplerState.sRGBDecode = sRGBDecode;
- mDirtyBits.set(DIRTY_BIT_SRGB_DECODE);
-}
-
-GLenum Texture::getSRGBDecode() const
-{
- return mState.mSamplerState.sRGBDecode;
-}
-
const SamplerState &Texture::getSamplerState() const
{
return mState.mSamplerState;
@@ -704,7 +674,6 @@ void Texture::setBaseLevel(GLuint baseLevel)
if (mState.setBaseLevel(baseLevel))
{
mTexture->setBaseLevel(mState.getEffectiveBaseLevel());
- mDirtyBits.set(DIRTY_BIT_BASE_LEVEL);
}
}
@@ -716,7 +685,6 @@ GLuint Texture::getBaseLevel() const
void Texture::setMaxLevel(GLuint maxLevel)
{
mState.setMaxLevel(maxLevel);
- mDirtyBits.set(DIRTY_BIT_MAX_LEVEL);
}
GLuint Texture::getMaxLevel() const
@@ -737,7 +705,6 @@ GLuint Texture::getImmutableLevels() const
void Texture::setUsage(GLenum usage)
{
mState.mUsage = usage;
- mDirtyBits.set(DIRTY_BIT_USAGE);
}
GLenum Texture::getUsage() const
@@ -932,21 +899,6 @@ Error Texture::copySubTexture(const Offset &destOffset,
unpackUnmultiplyAlpha, source);
}
-Error Texture::copyCompressedTexture(const Texture *source)
-{
- // Release from previous calls to eglBindTexImage, to avoid calling the Impl after
- releaseTexImageInternal();
- orphanImages();
-
- ANGLE_TRY(mTexture->copyCompressedTexture(source));
-
- ASSERT(source->getTarget() != GL_TEXTURE_CUBE_MAP && getTarget() != GL_TEXTURE_CUBE_MAP);
- const auto &sourceDesc = source->mState.getImageDesc(source->getTarget(), 0);
- mState.setImageDesc(getTarget(), 0, sourceDesc);
-
- return NoError();
-}
-
Error Texture::setStorage(GLenum target, GLsizei levels, GLenum internalFormat, const Extents &size)
{
ASSERT(target == mState.mTarget);
@@ -961,14 +913,6 @@ Error Texture::setStorage(GLenum target, GLsizei levels, GLenum internalFormat,
mState.mImmutableLevels = static_cast<GLuint>(levels);
mState.clearImageDescs();
mState.setImageDescChain(0, static_cast<GLuint>(levels - 1), size, Format(internalFormat));
-
- // 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);
-
mDirtyChannel.signal();
return NoError();
@@ -991,7 +935,6 @@ Error Texture::generateMipmap()
if (maxLevel > baseLevel)
{
- syncImplState();
ANGLE_TRY(mTexture->generateMipmap());
const ImageDesc &baseImageInfo =
@@ -1140,12 +1083,6 @@ GLuint Texture::getId() const
return id();
}
-void Texture::syncImplState()
-{
- mTexture->syncState(mDirtyBits);
- mDirtyBits.reset();
-}
-
rx::FramebufferAttachmentObjectImpl *Texture::getAttachmentImpl() const
{
return mTexture;