if ((qpTestLog_getLogFlags(m_log) & QP_TEST_LOG_EXCLUDE_IMAGES) != 0)
return;
- if (depth == 1 && format.type == TextureFormat::UNORM_INT8 &&
- width <= MAX_IMAGE_SIZE_2D && height <= MAX_IMAGE_SIZE_2D &&
- (format.order == TextureFormat::RGB || format.order == TextureFormat::RGBA)
+ if (depth == 1 && format.type == TextureFormat::UNORM_INT8
+ && width <= MAX_IMAGE_SIZE_2D && height <= MAX_IMAGE_SIZE_2D
+ && (format.order == TextureFormat::RGB || format.order == TextureFormat::RGBA)
+ && access.getPixelPitch() == access.getFormat().getPixelSize()
&& pixelBias[0] == 0.0f && pixelBias[1] == 0.0f && pixelBias[2] == 0.0f && pixelBias[3] == 0.0f
&& pixelScale[0] == 1.0f && pixelScale[1] == 1.0f && pixelScale[2] == 1.0f && pixelScale[3] == 1.0f)
{
{
const TextureFormat& format = access.getFormat();
- switch (format.type)
+ switch (getTextureChannelClass(format.type))
{
- case TextureFormat::UNORM_INT8:
- case TextureFormat::UNORM_INT16:
+ case TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT:
// Normalized unsigned formats.
minVal = Vec4(0.0f);
maxVal = Vec4(1.0f);
break;
- case TextureFormat::SNORM_INT8:
- case TextureFormat::SNORM_INT16:
+ case TEXTURECHANNELCLASS_SIGNED_FIXED_POINT:
// Normalized signed formats.
minVal = Vec4(-1.0f);
maxVal = Vec4(+1.0f);
DE_ASSERT(getNumSamples() == 1);
return tcu::PixelBufferAccess(m_access.getFormat(),
- m_access.getHeight(),
- m_access.getDepth(),
- 1,
- m_access.getSlicePitch(),
- m_access.getSlicePitch() * m_access.getDepth(),
+ tcu::IVec3(m_access.getHeight(), m_access.getDepth(), 1),
+ tcu::IVec3(m_access.getRowPitch(), m_access.getSlicePitch(), m_access.getSlicePitch() * m_access.getDepth()),
m_access.getDataPtr());
}
return MultisamplePixelBufferAccess(
tcu::PixelBufferAccess(
original.getFormat(),
- 1,
- original.getWidth(),
- original.getHeight(),
- original.getFormat().getPixelSize(),
- original.getRowPitch(),
+ tcu::IVec3(1, original.getWidth(), original.getHeight()),
+ tcu::IVec3(original.getPixelPitch(), original.getPixelPitch(), original.getRowPitch()),
original.getDataPtr()));
}
DE_ASSERT(getNumSamples() == 1);
return tcu::ConstPixelBufferAccess(m_access.getFormat(),
- m_access.getHeight(),
- m_access.getDepth(),
- 1,
- m_access.getSlicePitch(),
- m_access.getSlicePitch() * m_access.getDepth(),
+ tcu::IVec3(m_access.getHeight(), m_access.getDepth(), 1),
+ tcu::IVec3(m_access.getRowPitch(), m_access.getSlicePitch(), m_access.getSlicePitch() * m_access.getDepth()),
m_access.getDataPtr());
}
return MultisampleConstPixelBufferAccess(
tcu::ConstPixelBufferAccess(
original.getFormat(),
- 1,
- original.getWidth(),
- original.getHeight(),
- original.getFormat().getPixelSize(),
- original.getRowPitch(),
+ tcu::IVec3(1, original.getWidth(), original.getHeight()),
+ tcu::IVec3(original.getPixelPitch(), original.getPixelPitch(), original.getRowPitch()),
original.getDataPtr()));
}