return sampleLevelArray1DOffset(levels, numLevels, sampler, s, lod, IVec2(0, depth)); // y-offset in 1D textures is layer selector
}
-Vec4 sampleLevelArray2D (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, float t, int depth, float lod)
+Vec4 sampleLevelArray2D (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, float t, int depth, float lod, bool es2)
{
- return sampleLevelArray2DOffset(levels, numLevels, sampler, s, t, lod, IVec3(0, 0, depth)); // z-offset in 2D textures is layer selector
+ return sampleLevelArray2DOffset(levels, numLevels, sampler, s, t, lod, IVec3(0, 0, depth), es2); // z-offset in 2D textures is layer selector
}
Vec4 sampleLevelArray3D (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, float t, float r, float lod)
}
}
-Vec4 sampleLevelArray2DOffset (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, float t, float lod, const IVec3& offset)
+Vec4 sampleLevelArray2DOffset (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, float t, float lod, const IVec3& offset, bool es2)
{
- bool magnified = lod <= sampler.lodThreshold;
+ bool magnified;
+
+ if (es2 && sampler.magFilter == Sampler::LINEAR &&
+ (sampler.minFilter == Sampler::NEAREST_MIPMAP_NEAREST || sampler.minFilter == Sampler::NEAREST_MIPMAP_LINEAR))
+ magnified = lod <= 0.5;
+ else
+ magnified = lod <= sampler.lodThreshold;
Sampler::FilterMode filterMode = magnified ? sampler.magFilter : sampler.minFilter;
switch (filterMode)
// Texture2D
-Texture2D::Texture2D (const TextureFormat& format, int width, int height)
+Texture2D::Texture2D (const TextureFormat& format, int width, int height, bool es2)
: TextureLevelPyramid (format, computeMipPyramidLevels(width, height))
, m_width (width)
, m_height (height)
- , m_view (getNumLevels(), getLevels())
+ , m_view (getNumLevels(), getLevels(), es2)
{
}
: TextureLevelPyramid (other)
, m_width (other.m_width)
, m_height (other.m_height)
- , m_view (getNumLevels(), getLevels())
+ , m_view (getNumLevels(), getLevels(), other.getView().isES2())
{
}
m_width = other.m_width;
m_height = other.m_height;
- m_view = Texture2DView(getNumLevels(), getLevels());
+ m_view = Texture2DView(getNumLevels(), getLevels(), other.getView().isES2());
return *this;
}
m_levels[ndx] = DE_NULL;
}
-TextureCubeView::TextureCubeView (int numLevels, const ConstPixelBufferAccess* const (&levels) [CUBEFACE_LAST])
+TextureCubeView::TextureCubeView (int numLevels, const ConstPixelBufferAccess* const (&levels) [CUBEFACE_LAST], bool es2)
: m_numLevels(numLevels)
+ , m_es2(es2)
{
for (int ndx = 0; ndx < CUBEFACE_LAST; ndx++)
m_levels[ndx] = levels[ndx];
if (sampler.seamlessCubeMap)
return sampleLevelArrayCubeSeamless(m_levels, m_numLevels, coords.face, sampler, coords.s, coords.t, 0 /* depth */, lod);
else
- return sampleLevelArray2D(m_levels[coords.face], m_numLevels, sampler, coords.s, coords.t, 0 /* depth */, lod);
+ return sampleLevelArray2D(m_levels[coords.face], m_numLevels, sampler, coords.s, coords.t, 0 /* depth */, lod, m_es2);
}
float TextureCubeView::sampleCompare (const Sampler& sampler, float ref, float s, float t, float r, float lod) const
// TextureCube
-TextureCube::TextureCube (const TextureFormat& format, int size)
+TextureCube::TextureCube (const TextureFormat& format, int size, bool es2)
: m_format (format)
, m_size (size)
{
levels[face] = &m_access[face][0];
}
- m_view = TextureCubeView(numLevels, levels);
+ m_view = TextureCubeView(numLevels, levels, es2);
}
TextureCube::TextureCube (const TextureCube& other)
levels[face] = &m_access[face][0];
}
- m_view = TextureCubeView(numLevels, levels);
+ m_view = TextureCubeView(numLevels, levels, other.getView().isES2());
for (int levelNdx = 0; levelNdx < numLevels; levelNdx++)
{
m_format = other.m_format;
m_size = other.m_size;
- m_view = TextureCubeView(numLevels, levels);
+ m_view = TextureCubeView(numLevels, levels, other.getView().isES2());
for (int levelNdx = 0; levelNdx < numLevels; levelNdx++)
{
// Texture1DArrayView
-Texture1DArrayView::Texture1DArrayView (int numLevels, const ConstPixelBufferAccess* levels)
+Texture1DArrayView::Texture1DArrayView (int numLevels, const ConstPixelBufferAccess* levels, bool es2 DE_UNUSED_ATTR)
: m_numLevels (numLevels)
, m_levels (levels)
{
// Texture2DArrayView
-Texture2DArrayView::Texture2DArrayView (int numLevels, const ConstPixelBufferAccess* levels)
+Texture2DArrayView::Texture2DArrayView (int numLevels, const ConstPixelBufferAccess* levels, bool es2 DE_UNUSED_ATTR)
: m_numLevels (numLevels)
, m_levels (levels)
{
// Texture3DView
-Texture3DView::Texture3DView (int numLevels, const ConstPixelBufferAccess* levels)
+Texture3DView::Texture3DView (int numLevels, const ConstPixelBufferAccess* levels, bool es2 DE_UNUSED_ATTR)
: m_numLevels (numLevels)
, m_levels (levels)
{
// TextureCubeArrayView
-TextureCubeArrayView::TextureCubeArrayView (int numLevels, const ConstPixelBufferAccess* levels)
+TextureCubeArrayView::TextureCubeArrayView (int numLevels, const ConstPixelBufferAccess* levels, bool es2 DE_UNUSED_ATTR)
: m_numLevels (numLevels)
, m_levels (levels)
{
} DE_WARN_UNUSED_TYPE;
Vec4 sampleLevelArray1D (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, int level, float lod);
-Vec4 sampleLevelArray2D (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, float t, int depth, float lod);
+Vec4 sampleLevelArray2D (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, float t, int depth, float lod, bool es2 = false);
Vec4 sampleLevelArray3D (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, float t, float r, float lod);
Vec4 sampleLevelArray1DOffset (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, float lod, const IVec2& offset);
-Vec4 sampleLevelArray2DOffset (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, float t, float lod, const IVec3& offset);
+Vec4 sampleLevelArray2DOffset (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, float t, float lod, const IVec3& offset, bool es2 = false);
Vec4 sampleLevelArray3DOffset (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, float t, float r, float lod, const IVec3& offset);
float sampleLevelArray1DCompare (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float ref, float s, float lod, const IVec2& offset);
class Texture1DView
{
public:
- Texture1DView (int numLevels, const ConstPixelBufferAccess* levels);
+ Texture1DView (int numLevels, const ConstPixelBufferAccess* levels, bool es2);
int getNumLevels (void) const { return m_numLevels; }
int getWidth (void) const { return m_numLevels > 0 ? m_levels[0].getWidth() : 0; }
const ConstPixelBufferAccess& getLevel (int ndx) const { DE_ASSERT(de::inBounds(ndx, 0, m_numLevels)); return m_levels[ndx]; }
const ConstPixelBufferAccess* getLevels (void) const { return m_levels; }
+ bool isES2 (void) const { return false; }
Vec4 sample (const Sampler& sampler, float s, float lod) const;
Vec4 sampleOffset (const Sampler& sampler, float s, float lod, deInt32 offset) const;
const ConstPixelBufferAccess* m_levels;
} DE_WARN_UNUSED_TYPE;
-inline Texture1DView::Texture1DView (int numLevels, const ConstPixelBufferAccess* levels)
+inline Texture1DView::Texture1DView (int numLevels, const ConstPixelBufferAccess* levels, bool es2 DE_UNUSED_ATTR = false)
: m_numLevels (numLevels)
, m_levels (levels)
{
class Texture2DView
{
public:
- Texture2DView (int numLevels, const ConstPixelBufferAccess* levels);
+ Texture2DView (int numLevels, const ConstPixelBufferAccess* levels, bool es2 = false);
int getNumLevels (void) const { return m_numLevels; }
int getWidth (void) const { return m_numLevels > 0 ? m_levels[0].getWidth() : 0; }
int getHeight (void) const { return m_numLevels > 0 ? m_levels[0].getHeight() : 0; }
const ConstPixelBufferAccess& getLevel (int ndx) const { DE_ASSERT(de::inBounds(ndx, 0, m_numLevels)); return m_levels[ndx]; }
const ConstPixelBufferAccess* getLevels (void) const { return m_levels; }
+ bool isES2 (void) const { return m_es2; }
Vec4 sample (const Sampler& sampler, float s, float t, float lod) const;
Vec4 sampleOffset (const Sampler& sampler, float s, float t, float lod, const IVec2& offset) const;
protected:
int m_numLevels;
const ConstPixelBufferAccess* m_levels;
+ bool m_es2;
} DE_WARN_UNUSED_TYPE;
-inline Texture2DView::Texture2DView (int numLevels, const ConstPixelBufferAccess* levels)
+inline Texture2DView::Texture2DView (int numLevels, const ConstPixelBufferAccess* levels, bool es2)
: m_numLevels (numLevels)
, m_levels (levels)
+ , m_es2 (es2)
{
DE_ASSERT(m_numLevels >= 0 && ((m_numLevels == 0) == !m_levels));
}
inline Vec4 Texture2DView::sample (const Sampler& sampler, float s, float t, float lod) const
{
- return sampleLevelArray2D(m_levels, m_numLevels, sampler, s, t, 0 /* depth */, lod);
+ return sampleLevelArray2D(m_levels, m_numLevels, sampler, s, t, 0 /* depth */, lod, m_es2);
}
inline Vec4 Texture2DView::sampleOffset (const Sampler& sampler, float s, float t, float lod, const IVec2& offset) const
class Texture2D : private TextureLevelPyramid
{
public:
- Texture2D (const TextureFormat& format, int width, int height);
+ Texture2D (const TextureFormat& format, int width, int height, bool es2 = false);
Texture2D (const TextureFormat& format, int width, int height, int mipmaps);
Texture2D (const Texture2D& other);
~Texture2D (void);
{
public:
TextureCubeView (void);
- TextureCubeView (int numLevels, const ConstPixelBufferAccess* const (&levels)[CUBEFACE_LAST]);
+ TextureCubeView (int numLevels, const ConstPixelBufferAccess* const (&levels)[CUBEFACE_LAST], bool es2 = false);
int getNumLevels (void) const { return m_numLevels; }
+ bool isES2 (void) const { return m_es2; }
int getSize (void) const { return m_numLevels > 0 ? m_levels[0][0].getWidth() : 0; }
const ConstPixelBufferAccess& getLevelFace (int ndx, CubeFace face) const { DE_ASSERT(de::inBounds(ndx, 0, m_numLevels)); return m_levels[face][ndx]; }
const ConstPixelBufferAccess* getFaceLevels (CubeFace face) const { return m_levels[face]; }
protected:
int m_numLevels;
const ConstPixelBufferAccess* m_levels[CUBEFACE_LAST];
+ bool m_es2;
} DE_WARN_UNUSED_TYPE;
/*--------------------------------------------------------------------*//*!
class TextureCube
{
public:
- TextureCube (const TextureFormat& format, int size);
+ TextureCube (const TextureFormat& format, int size, bool es2 = false);
TextureCube (const TextureCube& other);
~TextureCube (void);
const TextureFormat& getFormat (void) const { return m_format; }
int getSize (void) const { return m_size; }
+ const TextureCubeView& getView (void) const { return m_view; }
int getNumLevels (void) const { return (int)m_access[0].size(); }
const ConstPixelBufferAccess& getLevelFace (int ndx, CubeFace face) const { DE_ASSERT(de::inBounds(ndx, 0, getNumLevels())); return m_access[face][(size_t)ndx]; }
class Texture1DArrayView
{
public:
- Texture1DArrayView (int numLevels, const ConstPixelBufferAccess* levels);
+ Texture1DArrayView (int numLevels, const ConstPixelBufferAccess* levels, bool es2 = false);
int getWidth (void) const { return m_numLevels > 0 ? m_levels[0].getWidth() : 0; }
int getNumLayers (void) const { return m_numLevels > 0 ? m_levels[0].getHeight() : 0; }
int getNumLevels (void) const { return m_numLevels; }
const ConstPixelBufferAccess& getLevel (int ndx) const { DE_ASSERT(de::inBounds(ndx, 0, m_numLevels)); return m_levels[ndx]; }
const ConstPixelBufferAccess* getLevels (void) const { return m_levels; }
+ bool isES2 (void) const { return false; }
Vec4 sample (const Sampler& sampler, float s, float t, float lod) const;
Vec4 sampleOffset (const Sampler& sampler, float s, float t, float lod, deInt32 offset) const;
class Texture2DArrayView
{
public:
- Texture2DArrayView (int numLevels, const ConstPixelBufferAccess* levels);
+ Texture2DArrayView (int numLevels, const ConstPixelBufferAccess* levels, bool es2 = false);
int getWidth (void) const { return m_numLevels > 0 ? m_levels[0].getWidth() : 0; }
int getHeight (void) const { return m_numLevels > 0 ? m_levels[0].getHeight() : 0; }
int getNumLevels (void) const { return m_numLevels; }
const ConstPixelBufferAccess& getLevel (int ndx) const { DE_ASSERT(de::inBounds(ndx, 0, m_numLevels)); return m_levels[ndx]; }
const ConstPixelBufferAccess* getLevels (void) const { return m_levels; }
+ bool isES2 (void) const { return false; }
Vec4 sample (const Sampler& sampler, float s, float t, float r, float lod) const;
Vec4 sampleOffset (const Sampler& sampler, float s, float t, float r, float lod, const IVec2& offset) const;
class Texture3DView
{
public:
- Texture3DView (int numLevels, const ConstPixelBufferAccess* levels);
+ Texture3DView (int numLevels, const ConstPixelBufferAccess* levels, bool es2 = false);
int getWidth (void) const { return m_numLevels > 0 ? m_levels[0].getWidth() : 0; }
int getHeight (void) const { return m_numLevels > 0 ? m_levels[0].getHeight() : 0; }
int getNumLevels (void) const { return m_numLevels; }
const ConstPixelBufferAccess& getLevel (int ndx) const { DE_ASSERT(de::inBounds(ndx, 0, m_numLevels)); return m_levels[ndx]; }
const ConstPixelBufferAccess* getLevels (void) const { return m_levels; }
+ bool isES2 (void) const { return false; }
Vec4 sample (const Sampler& sampler, float s, float t, float r, float lod) const;
Vec4 sampleOffset (const Sampler& sampler, float s, float t, float r, float lod, const IVec3& offset) const;
class TextureCubeArrayView
{
public:
- TextureCubeArrayView (int numLevels, const ConstPixelBufferAccess* levels);
+ TextureCubeArrayView (int numLevels, const ConstPixelBufferAccess* levels, bool es2 = false);
int getSize (void) const { return m_numLevels > 0 ? m_levels[0].getWidth() : 0; }
int getDepth (void) const { return m_numLevels > 0 ? m_levels[0].getDepth() : 0; }
int getNumLevels (void) const { return m_numLevels; }
const ConstPixelBufferAccess& getLevel (int ndx) const { DE_ASSERT(de::inBounds(ndx, 0, m_numLevels)); return m_levels[ndx]; }
const ConstPixelBufferAccess* getLevels (void) const { return m_levels; }
+ bool isES2 (void) const { return false; }
Vec4 sample (const Sampler& sampler, float s, float t, float r, float q, float lod) const;
Vec4 sampleOffset (const Sampler& sampler, float s, float t, float r, float q, float lod, const IVec2& offset) const;
{
storage.resize(src.getNumLevels());
- ViewType view = ViewType(src.getNumLevels(), &storage[0]);
+ ViewType view = ViewType(src.getNumLevels(), &storage[0], src.isES2());
for (int levelNdx = 0; levelNdx < src.getNumLevels(); ++levelNdx)
storage[levelNdx] = tcu::getEffectiveDepthStencilAccess(src.getLevel(levelNdx), sampler.depthStencilMode);
&storage[5 * src.getNumLevels()],
};
- tcu::TextureCubeView view = tcu::TextureCubeView(src.getNumLevels(), storagePtrs);
+ tcu::TextureCubeView view = tcu::TextureCubeView(src.getNumLevels(), storagePtrs, false);
for (int faceNdx = 0; faceNdx < tcu::CUBEFACE_LAST; ++faceNdx)
for (int levelNdx = 0; levelNdx < src.getNumLevels(); ++levelNdx)
#if (DE_COMPILER == DE_COMPILER_GCC) || (DE_COMPILER == DE_COMPILER_CLANG)
/* GCC 4.8 and newer warns about unused typedefs. */
-# define DE_UNUSED_TYPEDEF_ATTR __attribute__((unused))
+# define DE_UNUSED_ATTR __attribute__((unused))
#else
-# define DE_UNUSED_TYPEDEF_ATTR
+# define DE_UNUSED_ATTR
#endif
/** Compile-time assertion macro. */
-#define DE_STATIC_ASSERT(X) typedef char DE_UNIQUE_NAME[(X) ? 1 : -1] DE_UNUSED_TYPEDEF_ATTR
-#define DE_HEADER_STATIC_ASSERT(HEADERTOKEN, X) typedef char DE_HEADER_UNIQUE_NAME(HEADERTOKEN)[(X) ? 1 : -1] DE_UNUSED_TYPEDEF_ATTR
+#define DE_STATIC_ASSERT(X) typedef char DE_UNIQUE_NAME[(X) ? 1 : -1] DE_UNUSED_ATTR
+#define DE_HEADER_STATIC_ASSERT(HEADERTOKEN, X) typedef char DE_HEADER_UNIQUE_NAME(HEADERTOKEN)[(X) ? 1 : -1] DE_UNUSED_ATTR
#define DE_UNIQUE_NAME DE_MAKE_NAME(__LINE__, hoax)
#define DE_HEADER_UNIQUE_NAME(HEADERTOKEN) DE_MAKE_NAME(__LINE__, HEADERTOKEN)
inline bool isContextTypeES (ContextType type) { return type.getAPI().getProfile() == PROFILE_ES; }
inline bool isContextTypeGLCore (ContextType type) { return type.getAPI().getProfile() == PROFILE_CORE; }
inline bool isContextTypeGLCompatibility(ContextType type) { return type.getAPI().getProfile() == PROFILE_COMPATIBILITY; }
+inline bool isES2Context (ContextType type) { return isContextTypeES(type) && type.getMajorVersion() == 2; }
bool contextSupports (ContextType ctxType, ApiType requiredApiType);
const char* getApiTypeDescription (ApiType type);
: m_context (context)
, m_isCompressed (false)
, m_format (format)
- , m_refTexture (mapGLTransferFormat(format, dataType), width, height)
+ , m_refTexture (mapGLTransferFormat(format, dataType), width, height, isES2Context(context.getType()))
, m_glTexture (0)
{
const glw::Functions& gl = context.getFunctions();
: m_context (context)
, m_isCompressed (false)
, m_format (sizedFormat)
- , m_refTexture (mapGLInternalFormat(sizedFormat), width, height)
+ , m_refTexture (mapGLInternalFormat(sizedFormat), width, height, isES2Context(context.getType()))
, m_glTexture (0)
{
const glw::Functions& gl = context.getFunctions();
: m_context (context)
, m_isCompressed (true)
, m_format (getGLFormat(levels[0].getFormat()))
- , m_refTexture (getUncompressedFormat(levels[0].getFormat()), levels[0].getWidth(), levels[0].getHeight())
+ , m_refTexture (getUncompressedFormat(levels[0].getFormat()), levels[0].getWidth(), levels[0].getHeight(), isES2Context(context.getType()))
, m_glTexture (0)
{
const glw::Functions& gl = context.getFunctions();
: m_context (context)
, m_isCompressed (true)
, m_format (getGLFormat(levels[0].getFormat()))
- , m_refTexture (getUncompressedFormat(levels[0].getFormat()), levels[0].getWidth())
+ , m_refTexture (getUncompressedFormat(levels[0].getFormat()), levels[0].getWidth(), isES2Context(context.getType()))
, m_glTexture (0)
{
const glw::Functions& gl = m_context.getFunctions();
: m_context (context)
, m_isCompressed (false)
, m_format (format)
- , m_refTexture (mapGLTransferFormat(format, dataType), size)
+ , m_refTexture (mapGLTransferFormat(format, dataType), size, isES2Context(context.getType()))
, m_glTexture (0)
{
const glw::Functions& gl = m_context.getFunctions();
: m_context (context)
, m_isCompressed (false)
, m_format (internalFormat)
- , m_refTexture (mapGLInternalFormat(internalFormat), size)
+ , m_refTexture (mapGLInternalFormat(internalFormat), size, isES2Context(context.getType()))
, m_glTexture (0)
{
const glw::Functions& gl = m_context.getFunctions();
const int clampedBase = de::clamp(baseLevel, 0, view.getNumLevels()-1);
const int clampedMax = de::clamp(maxLevel, clampedBase, view.getNumLevels()-1);
const int numLevels = clampedMax-clampedBase+1;
- return tcu::Texture2DView(numLevels, view.getLevels()+clampedBase);
+ return tcu::Texture2DView(numLevels, view.getLevels()+clampedBase, view.isES2());
}
static tcu::TextureCubeView getSubView (const tcu::TextureCubeView& view, int baseLevel, int maxLevel)
, m_activeTexture (0)
, m_textureUnits (m_limits.maxTextureImageUnits)
, m_emptyTex1D ()
- , m_emptyTex2D ()
+ , m_emptyTex2D (isES2Context(limits.contextType))
, m_emptyTexCube ()
, m_emptyTex2DArray ()
, m_emptyTex3D ()
m_view = tcu::Texture2DView(0, DE_NULL);
}
-Texture2D::Texture2D (deUint32 name)
+Texture2D::Texture2D (deUint32 name, bool es2)
: Texture (name, TYPE_2D)
- , m_view (0, DE_NULL)
+ , m_view (0, DE_NULL, es2)
{
}
class Texture2D : public Texture
{
public:
- Texture2D (deUint32 name = 0);
+ Texture2D (deUint32 name = 0, bool es2 = false);
virtual ~Texture2D (void);
void clearLevels (void) { m_levels.clear(); }
getFormatInfo(format, glFormat, glType, pixelSize);
m_testCtx.getLog() << tcu::TestLog::Message << "Format: " << glu::getTextureFormatStr(glFormat) << ", Type: " << glu::getTypeStr(glType) << tcu::TestLog::EndMessage;
- tcu::Texture2D reference(format, width, height);
+ tcu::Texture2D reference(format, width, height, glu::isES2Context(m_context.getRenderContext().getType()));
reference.allocLevel(0);
GLU_CHECK_CALL(glViewport(0, 0, width, height));
const deUint8 alphaThreshold = (deUint8)deCeilFloatToInt32(256.0f * (2.0f / (float)(1 << deMin32(m_context.getRenderTarget().getPixelFormat().alphaBits, formatBitDepths.w()))));
// bilinearCompare only accepts RGBA, UINT8
- tcu::Texture2D referenceRGBA8 (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::UNORM_INT8), width, height);
- tcu::Texture2D resultRGBA8 (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::UNORM_INT8), width, height);
+ tcu::Texture2D referenceRGBA8 (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::UNORM_INT8), width, height, glu::isES2Context(m_context.getRenderContext().getType()));
+ tcu::Texture2D resultRGBA8 (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::UNORM_INT8), width, height, glu::isES2Context(m_context.getRenderContext().getType()));
referenceRGBA8.allocLevel(0);
resultRGBA8.allocLevel(0);
const int numLevels = deLog2Floor32(de::max(m_width, m_height))+1;
- tcu::Texture2D resultTexture (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::UNORM_INT8), m_texture->getRefTexture().getWidth(), m_texture->getRefTexture().getHeight());
+ tcu::Texture2D resultTexture (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::UNORM_INT8), m_texture->getRefTexture().getWidth(), m_texture->getRefTexture().getHeight(), isES2Context(m_renderCtx.getType()));
vector<float> texCoord;
if (is2d)
{
m_ndx2dOrCube.push_back((int)m_textures2d.size()); // Remember the index this texture has in the 2d array.
- m_textures2d.push_back(new tcu::Texture2D(glu::mapGLTransferFormat(params.format, params.dataType), texWidth, texHeight));
+ m_textures2d.push_back(new tcu::Texture2D(glu::mapGLTransferFormat(params.format, params.dataType), texWidth, texHeight, isES2Context(m_context.getRenderContext().getType())));
}
else
{