dEQP-VK.draw.depth_clamp.d16_unorm_s8_uint_clamp_input_positive
dEQP-VK.draw.depth_clamp.d16_unorm_s8_uint_depth_bias_clamp_input_negative
dEQP-VK.draw.depth_clamp.d16_unorm_s8_uint_depth_bias_clamp_input_positive
-dEQP-VK.draw.depth_clamp.d16_unorm_s8_uint_depth_range_unrestricted_negative
-dEQP-VK.draw.depth_clamp.d16_unorm_s8_uint_depth_range_unrestricted_positive
dEQP-VK.draw.depth_clamp.d24_unorm_s8_uint
dEQP-VK.draw.depth_clamp.d24_unorm_s8_uint_clamp_input_negative
dEQP-VK.draw.depth_clamp.d24_unorm_s8_uint_clamp_input_positive
dEQP-VK.draw.depth_clamp.d16_unorm_s8_uint_clamp_input_positive
dEQP-VK.draw.depth_clamp.d16_unorm_s8_uint_depth_bias_clamp_input_negative
dEQP-VK.draw.depth_clamp.d16_unorm_s8_uint_depth_bias_clamp_input_positive
-dEQP-VK.draw.depth_clamp.d16_unorm_s8_uint_depth_range_unrestricted_negative
-dEQP-VK.draw.depth_clamp.d16_unorm_s8_uint_depth_range_unrestricted_positive
dEQP-VK.draw.depth_clamp.d24_unorm_s8_uint
dEQP-VK.draw.depth_clamp.d24_unorm_s8_uint_clamp_input_negative
dEQP-VK.draw.depth_clamp.d24_unorm_s8_uint_clamp_input_positive
}
};
+bool isUnormDepthFormat(VkFormat format)
+{
+ switch (format)
+ {
+ case VK_FORMAT_D24_UNORM_S8_UINT:
+ case VK_FORMAT_X8_D24_UNORM_PACK32:
+ case VK_FORMAT_D16_UNORM_S8_UINT:
+ /* Special case for combined depth-stencil-unorm modes for which tcu::getTextureChannelClass()
+ returns TEXTURECHANNELCLASS_LAST */
+ return true;
+ default:
+ return vk::isUnormFormat(format);
+ }
+}
+
class DepthClampTestInstance : public TestInstance {
public:
DepthClampTestInstance (Context& context, const TestParams& params, const VkFormat format, const float epsilon);
};
const tcu::ConstPixelBufferAccess resultImage = draw(viewport);
+ DE_ASSERT((isUnormDepthFormat(m_format) == false) ||
+ (m_params.expectedValue >= 0.0f && m_params.expectedValue <= 1.0f));
+
for(int z = 0; z < resultImage.getDepth(); ++z)
for(int y = 0; y < resultImage.getHeight(); ++y)
for(int x = 0; x < resultImage.getWidth(); ++x)
return de::toLower(de::toString(getFormatStr(format)).substr(10));
}
-bool isUnormDepthFormat(VkFormat format)
-{
- switch(format)
- {
- case VK_FORMAT_D24_UNORM_S8_UINT:
- case VK_FORMAT_X8_D24_UNORM_PACK32:
- /* Special case for combined depth-stencil-unorm modes for which tcu::getTextureChannelClass()
- returns TEXTURECHANNELCLASS_LAST */
- return true;
- default:
- return vk::isUnormFormat(format);
- }
-}
-
void createTests (tcu::TestCaseGroup* testGroup)
{
for(int i = 0; i < DE_LENGTH_OF_ARRAY(depthStencilImageFormatsToTest); ++i)
unsigned int arrayElement)
{
DE_ASSERT(aspect == vk::VK_IMAGE_ASPECT_DEPTH_BIT);
- tcu::TextureFormat tcuFormat = (m_format == vk::VK_FORMAT_D32_SFLOAT_S8_UINT) ? tcu::TextureFormat(tcu::TextureFormat::D, tcu::TextureFormat::FLOAT) : vk::mapVkFormat(m_format);
+ const tcu::TextureFormat tcuFormat = getDepthCopyFormat(m_format);
m_pixelAccessData.resize(width * height * tcuFormat.getPixelSize());
deMemset(m_pixelAccessData.data(), 0, m_pixelAccessData.size());
dEQP-VK.draw.depth_clamp.d16_unorm_s8_uint_clamp_input_positive
dEQP-VK.draw.depth_clamp.d16_unorm_s8_uint_depth_bias_clamp_input_negative
dEQP-VK.draw.depth_clamp.d16_unorm_s8_uint_depth_bias_clamp_input_positive
-dEQP-VK.draw.depth_clamp.d16_unorm_s8_uint_depth_range_unrestricted_negative
-dEQP-VK.draw.depth_clamp.d16_unorm_s8_uint_depth_range_unrestricted_positive
dEQP-VK.draw.depth_clamp.d24_unorm_s8_uint
dEQP-VK.draw.depth_clamp.d24_unorm_s8_uint_clamp_input_negative
dEQP-VK.draw.depth_clamp.d24_unorm_s8_uint_clamp_input_positive