Skip to content

Commit

Permalink
tests: Add GetPipelinePropertiesEXT tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-lunarg committed Jan 10, 2025
1 parent b18ee98 commit 65915e6
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 7 deletions.
32 changes: 30 additions & 2 deletions tests/unit/parent.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2023-2024 Valve Corporation
* Copyright (c) 2023-2024 LunarG, Inc.
* Copyright (c) 2023-2025 Valve Corporation
* Copyright (c) 2023-2025 LunarG, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -627,6 +627,34 @@ TEST_F(NegativeParent, PipelineExecutableInfo) {
m_errorMonitor->VerifyFound();
}

// TODO - https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/9176
TEST_F(NegativeParent, DISABLED_PipelineInfoEXT) {
TEST_DESCRIPTION("Try making calls without pipelineExecutableInfo.");

AddRequiredExtensions(VK_EXT_PIPELINE_PROPERTIES_EXTENSION_NAME);
RETURN_IF_SKIP(InitFramework());

VkPhysicalDevicePipelinePropertiesFeaturesEXT pipeline_features = vku::InitStructHelper();
GetPhysicalDeviceFeatures2(pipeline_features);
RETURN_IF_SKIP(InitState(nullptr, &pipeline_features));
InitRenderTarget();

m_second_device = new vkt::Device(gpu_, m_device_extension_names, nullptr, &pipeline_features);

CreatePipelineHelper pipe(*this);
pipe.CreateGraphicsPipeline();

VkPipelineInfoEXT pipeline_info = vku::InitStructHelper();
pipeline_info.sType = VK_STRUCTURE_TYPE_PIPELINE_PROPERTIES_IDENTIFIER_EXT;
pipeline_info.pipeline = pipe.Handle();

VkBaseOutStructure out_struct;
out_struct.sType = VK_STRUCTURE_TYPE_PIPELINE_PROPERTIES_IDENTIFIER_EXT;
m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "VUID-vkGetPipelinePropertiesEXT-pipeline-06738");
vk::GetPipelinePropertiesEXT(*m_second_device, &pipeline_info, &out_struct);
m_errorMonitor->VerifyFound();
}

TEST_F(NegativeParent, UpdateDescriptorSetsBuffer) {
RETURN_IF_SKIP(Init());
InitRenderTarget();
Expand Down
27 changes: 22 additions & 5 deletions tests/unit/pipeline_positive.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* Copyright (c) 2015-2024 The Khronos Group Inc.
* Copyright (c) 2015-2024 Valve Corporation
* Copyright (c) 2015-2024 LunarG, Inc.
* Copyright (c) 2015-2024 Google, Inc.
* Copyright (c) 2015-2025 The Khronos Group Inc.
* Copyright (c) 2015-2025 Valve Corporation
* Copyright (c) 2015-2025 LunarG, Inc.
* Copyright (c) 2015-2025 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -1905,4 +1905,21 @@ TEST_F(PositivePipeline, DepthClampControlNullRange) {
CreatePipelineHelper pipe(*this);
pipe.vp_state_ci_.pNext = &clamp_control;
pipe.CreateGraphicsPipeline();
}
}

TEST_F(PositivePipeline, GetPipelinePropertiesEXT) {
AddRequiredExtensions(VK_EXT_PIPELINE_PROPERTIES_EXTENSION_NAME);
AddRequiredFeature(vkt::Feature::pipelinePropertiesIdentifier);
RETURN_IF_SKIP(Init());
InitRenderTarget();

CreatePipelineHelper pipe(*this);
pipe.CreateGraphicsPipeline();

VkPipelineInfoEXT pipeline_info = vku::InitStructHelper();
pipeline_info.pipeline = pipe.Handle();

VkBaseOutStructure out_struct;
out_struct.sType = VK_STRUCTURE_TYPE_PIPELINE_PROPERTIES_IDENTIFIER_EXT;
vk::GetPipelinePropertiesEXT(device(), &pipeline_info, &out_struct);
}

0 comments on commit 65915e6

Please sign in to comment.