From febfbbc2e5fc43b03fe0924ca6e129bc66975170 Mon Sep 17 00:00:00 2001 From: Slawomir Cygan Date: Fri, 27 Oct 2017 12:54:54 +0200 Subject: [PATCH] Test with depth range greater than 1.0 should require extension "_deltalarge" variant of tests was using minDepth/maxDepth outside of valid usage from unextended spec. Added requirement for VK_EXT_depth_range_unrestricted. Affects: dEQP-VK.draw.inverted_depth_ranges.* Components: Vulkan VK-GL-CTS issue: 795 Change-Id: I18f1c73d7250865aaba5ed64e6b8da955fec0aea --- android/cts/master/vk-master.txt | 4 ++-- .../draw/vktDrawInvertedDepthRangesTests.cpp | 28 ++++++++++++++-------- external/vulkancts/mustpass/1.0.3/vk-default.txt | 4 ++-- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/android/cts/master/vk-master.txt b/android/cts/master/vk-master.txt index 41b7ca2..82ec93e 100644 --- a/android/cts/master/vk-master.txt +++ b/android/cts/master/vk-master.txt @@ -205464,10 +205464,10 @@ dEQP-VK.draw.negative_viewport_height.front_cw_cull_both dEQP-VK.draw.inverted_depth_ranges.depthclamp_deltazero dEQP-VK.draw.inverted_depth_ranges.depthclamp_deltasmall dEQP-VK.draw.inverted_depth_ranges.depthclamp_deltaone -dEQP-VK.draw.inverted_depth_ranges.depthclamp_deltalarge +dEQP-VK.draw.inverted_depth_ranges.depthclamp_depth_range_unrestricted dEQP-VK.draw.inverted_depth_ranges.nodepthclamp_deltasmall dEQP-VK.draw.inverted_depth_ranges.nodepthclamp_deltaone -dEQP-VK.draw.inverted_depth_ranges.nodepthclamp_deltalarge +dEQP-VK.draw.inverted_depth_ranges.nodepthclamp_depth_range_unrestricted dEQP-VK.compute.basic.empty_shader dEQP-VK.compute.basic.ubo_to_ssbo_single_invocation dEQP-VK.compute.basic.ubo_to_ssbo_single_group diff --git a/external/vulkancts/modules/vulkan/draw/vktDrawInvertedDepthRangesTests.cpp b/external/vulkancts/modules/vulkan/draw/vktDrawInvertedDepthRangesTests.cpp index ac8a2e1..f0bdbba 100644 --- a/external/vulkancts/modules/vulkan/draw/vktDrawInvertedDepthRangesTests.cpp +++ b/external/vulkancts/modules/vulkan/draw/vktDrawInvertedDepthRangesTests.cpp @@ -86,6 +86,18 @@ InvertedDepthRangesTestInstance::InvertedDepthRangesTestInstance (Context& conte const DeviceInterface& vk = m_context.getDeviceInterface(); const VkDevice device = m_context.getDevice(); + if (m_params.depthClampEnable && !m_context.getDeviceFeatures().depthClamp) + TCU_THROW(NotSupportedError, "DepthClamp device feature not supported."); + + if (params.minDepth > 1.0f || + params.minDepth < 0.0f || + params.maxDepth > 1.0f || + params.maxDepth < 0.0f) + { + if (!de::contains(context.getDeviceExtensions().begin(), context.getDeviceExtensions().end(), "VK_EXT_depth_range_unrestricted")) + throw tcu::NotSupportedError("Test variant with minDepth/maxDepth outside 0..1 requires the VK_EXT_depth_range_unrestricted extension"); + } + // Vertex data { std::vector vertexData; @@ -343,12 +355,6 @@ MovePtr InvertedDepthRangesTestInstance::generateReferenceIma tcu::TestStatus InvertedDepthRangesTestInstance::iterate (void) { - // Check requirements - - if (m_params.depthClampEnable && !m_context.getDeviceFeatures().depthClamp) - TCU_THROW(NotSupportedError, "DepthClamp device feature not supported."); - - // Set up the viewport and draw const VkViewport viewport = @@ -447,10 +453,12 @@ void populateTestGroup (tcu::TestCaseGroup* testGroup) float delta; } delta[] = { - { "deltazero", 0.0f }, - { "deltasmall", 0.3f }, - { "deltaone", 1.0f }, - { "deltalarge", 2.7f }, + { "deltazero", 0.0f }, + { "deltasmall", 0.3f }, + { "deltaone", 1.0f }, + + // Range > 1.0 requires VK_EXT_depth_range_unrestricted extension + { "depth_range_unrestricted", 2.7f }, }; for (int ndxDepthClamp = 0; ndxDepthClamp < DE_LENGTH_OF_ARRAY(depthClamp); ++ndxDepthClamp) diff --git a/external/vulkancts/mustpass/1.0.3/vk-default.txt b/external/vulkancts/mustpass/1.0.3/vk-default.txt index e7b605f..20f3cd2 100644 --- a/external/vulkancts/mustpass/1.0.3/vk-default.txt +++ b/external/vulkancts/mustpass/1.0.3/vk-default.txt @@ -205449,10 +205449,10 @@ dEQP-VK.draw.negative_viewport_height.front_cw_cull_both dEQP-VK.draw.inverted_depth_ranges.depthclamp_deltazero dEQP-VK.draw.inverted_depth_ranges.depthclamp_deltasmall dEQP-VK.draw.inverted_depth_ranges.depthclamp_deltaone -dEQP-VK.draw.inverted_depth_ranges.depthclamp_deltalarge +dEQP-VK.draw.inverted_depth_ranges.depthclamp_depth_range_unrestricted dEQP-VK.draw.inverted_depth_ranges.nodepthclamp_deltasmall dEQP-VK.draw.inverted_depth_ranges.nodepthclamp_deltaone -dEQP-VK.draw.inverted_depth_ranges.nodepthclamp_deltalarge +dEQP-VK.draw.inverted_depth_ranges.nodepthclamp_depth_range_unrestricted dEQP-VK.compute.basic.empty_shader dEQP-VK.compute.basic.ubo_to_ssbo_single_invocation dEQP-VK.compute.basic.ubo_to_ssbo_single_group -- 2.7.4