Skip to content

Commit

Permalink
tests: Enable pipeline robustness when appropriate
Browse files Browse the repository at this point in the history
Also run debug printf test even without multidraw since the
test checks the feature before using multidraw
Also use the results of GetPhysicalDeviceFeatures2 rather than gpu
  • Loading branch information
TonyBarbour committed Aug 17, 2023
1 parent b4f9e38 commit 61bca32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
11 changes: 5 additions & 6 deletions tests/unit/debug_printf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ TEST_F(NegativeDebugPrintf, BasicUsage) {
TEST_DESCRIPTION("Verify that calls to debugPrintfEXT are received in debug stream");
SetTargetApiVersion(VK_API_VERSION_1_1);
AddRequiredExtensions(VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME);
AddRequiredExtensions(VK_EXT_MULTI_DRAW_EXTENSION_NAME);
AddOptionalExtensions(VK_EXT_MULTI_DRAW_EXTENSION_NAME);
InitDebugPrintfFramework();
if (!AreRequiredExtensionsEnabled()) {
GTEST_SKIP() << RequiredExtensionsNotSupported() << " not supported";
Expand All @@ -43,15 +43,14 @@ TEST_F(NegativeDebugPrintf, BasicUsage) {
GTEST_SKIP() << "At least Vulkan version 1.1 is required";
}

auto features = m_device->phy().features();
if (!features.vertexPipelineStoresAndAtomics || !features.fragmentStoresAndAtomics) {
GTEST_SKIP() << "GPU-Assisted printf test requires vertexPipelineStoresAndAtomics and fragmentStoresAndAtomics";
if (!features2.features.vertexPipelineStoresAndAtomics || !features2.features.fragmentStoresAndAtomics) {
GTEST_SKIP() << "Debug Printf test requires vertexPipelineStoresAndAtomics and fragmentStoresAndAtomics";
}
ASSERT_NO_FATAL_FAILURE(InitViewport());
ASSERT_NO_FATAL_FAILURE(InitRenderTarget());

if (IsPlatform(kMockICD)) {
GTEST_SKIP() << "Test not supported by MockICD, GPU-Assisted validation test requires a driver that can draw";
GTEST_SKIP() << "Test not supported by MockICD, Debug Printf test requires a driver that can draw";
}
// Make a uniform buffer to be passed to the shader that contains the test number
uint32_t qfi = 0;
Expand Down Expand Up @@ -251,7 +250,7 @@ TEST_F(NegativeDebugPrintf, BasicUsage) {
m_errorMonitor->VerifyFound();
}

if (features.shaderInt64) {
if (features2.features.shaderInt64) {
char const *shader_source_int64 =
"#version 450\n"
"#extension GL_EXT_debug_printf : enable\n"
Expand Down
1 change: 0 additions & 1 deletion tests/unit/gpu_av.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,6 @@ TEST_F(VkGpuAssistedLayerTest, GpuRobustBufferOOB) {
if (!pipeline_robustness_features.pipelineRobustness) {
GTEST_SKIP() << "pipelineRobustness feature not supported";
}
pipeline_robustness_features.pipelineRobustness = VK_FALSE;
ASSERT_NO_FATAL_FAILURE(InitState(nullptr, &features2));
ASSERT_NO_FATAL_FAILURE(InitRenderTarget());
VkMemoryPropertyFlags reqs = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
Expand Down

0 comments on commit 61bca32

Please sign in to comment.