Skip to content

Commit

Permalink
Fix macOS build and add required extensions for dEQP-VK.api.object_ma…
Browse files Browse the repository at this point in the history
…nagement.single.device

Affects:
dEQP-VK.api.object_management.single.device

VK-GL-CTS issue: 4923
Components: Vulkan

Change-Id: Ia4c3034d5f320426ad5a6dccbcb50680e7c59c5c
  • Loading branch information
aitor-lunarg authored and lordalcol committed Jan 31, 2024
1 parent 1a1b02b commit d13582a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
12 changes: 12 additions & 0 deletions external/vulkancts/framework/vulkan/vkPipelineConstructionUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,18 @@ PipelineLayoutWrapper::PipelineLayoutWrapper (PipelineConstructionType pipelineC
m_pipelineLayout = createPipelineLayout(vk, device, &createInfo);
}

PipelineLayoutWrapper::PipelineLayoutWrapper(PipelineLayoutWrapper&& rhs) noexcept
: m_pipelineConstructionType (rhs.m_pipelineConstructionType)
, m_vk (rhs.m_vk)
, m_device (rhs.m_device)
, m_flags (rhs.m_flags)
, m_setLayoutCount (rhs.m_setLayoutCount)
, m_setLayouts (std::move(rhs.m_setLayouts))
, m_pushConstantRangeCount (rhs.m_pushConstantRangeCount)
, m_pushConstantRanges (std::move(rhs.m_pushConstantRanges))
, m_pipelineLayout (rhs.m_pipelineLayout)
{ }

PipelineLayoutWrapper& PipelineLayoutWrapper::operator= (PipelineLayoutWrapper&& rhs)
{
m_pipelineConstructionType = rhs.m_pipelineConstructionType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,12 @@ class PipelineLayoutWrapper
PipelineLayoutWrapper (PipelineConstructionType pipelineConstructionType, const DeviceInterface& vk, VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* = DE_NULL);
PipelineLayoutWrapper (PipelineConstructionType pipelineConstructionType, const DeviceInterface& vk, const VkDevice device, const deUint32 setLayoutCount, const VkDescriptorSetLayout* descriptorSetLayout, const deUint32 pushConstantRangeCount, const VkPushConstantRange* pPushConstantRanges, const VkPipelineLayoutCreateFlags flags = (VkPipelineLayoutCreateFlags)0u);
PipelineLayoutWrapper (const PipelineLayoutWrapper& rhs) = delete;
PipelineLayoutWrapper (PipelineLayoutWrapper&& rhs) noexcept;
~PipelineLayoutWrapper () = default;

const VkPipelineLayout operator* (void) const { return *m_pipelineLayout; }
const VkPipelineLayout get (void) const { return *m_pipelineLayout; }
PipelineLayoutWrapper& operator= (const PipelineLayoutWrapper& rhs) = delete;
PipelineLayoutWrapper& operator= (PipelineLayoutWrapper&& rhs);
void destroy (void) { m_pipelineLayout = vk::Move<VkPipelineLayout>{}; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ struct Instance

Parameters (void) {}

Parameters (vector<string>& extensions)
Parameters (vector<string> extensions)
: instanceExtensions (extensions)
{}
};
Expand Down Expand Up @@ -595,7 +595,7 @@ struct Device
deUint32 queueFamilyIndex;

Resources (const Environment& env, const Parameters& params)
: instance (env, Instance::Parameters())
: instance (env, Instance::Parameters(vector<string>{ string{"VK_KHR_get_physical_device_properties2"} }))
#ifndef CTS_USES_VULKANSC
, vki(env.vkp, *instance.object)
#else
Expand Down Expand Up @@ -3522,6 +3522,11 @@ void checkImageCubeArraySupport (Context& context, const ImageView::Parameters p
TCU_THROW(NotSupportedError, "imageCubeArray feature is not supported by this implementation");
}

void checkGetPhysicalDevicePropertiesExtension (Context& context, const Device::Parameters)
{
context.requireInstanceFunctionality("VK_KHR_get_physical_device_properties2");
}

void checkEventSupport (Context& context, const Event::Parameters)
{
#ifndef CTS_USES_VULKANSC
Expand Down Expand Up @@ -3766,7 +3771,7 @@ tcu::TestCaseGroup* createObjectManagementTests (tcu::TestContext& testCtx)
const CaseDescriptions s_createSingleGroup =
{
CASE_DESC(createSingleTest <Instance>, s_instanceCases, DE_NULL),
CASE_DESC(createSingleTest <Device>, s_deviceCases, DE_NULL),
CASE_DESC(createSingleTest <Device>, s_deviceCases, checkGetPhysicalDevicePropertiesExtension),
CASE_DESC(createSingleTest <DeviceGroup>, s_deviceGroupCases, DE_NULL),
CASE_DESC(createSingleTest <DeviceMemory>, s_deviceMemCases, DE_NULL),
CASE_DESC(createSingleTest <Buffer>, s_bufferCases, DE_NULL),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ TestInstance *Robustness1AccessTest::createInstance (Context &context) const
Move<VkDevice> device = createRobustBufferAccessDevice(context);
DeviceDriverPtr deviceDriver = DeviceDriverPtr (new DeviceDriver(context.getPlatformInterface(), context.getInstance(), *device, context.getUsedApiVersion(), context.getTestContext().getCommandLine()));
#else
de::MovePtr<CustomInstance> customInstance = de::MovePtr(new CustomInstance(createCustomInstanceFromContext(context)));
de::MovePtr<CustomInstance> customInstance = de::MovePtr<CustomInstance>(new CustomInstance(createCustomInstanceFromContext(context)));
Move<VkDevice> device = createRobustBufferAccessDevice(context, *customInstance);
DeviceDriverPtr deviceDriver = DeviceDriverPtr (new DeviceDriverSC(context.getPlatformInterface(), *customInstance, *device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties(), context.getUsedApiVersion()), vk::DeinitDeviceDeleter( context.getResourceInterface().get(), *device ));
#endif // CTS_USES_VULKANSC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ void DrawIndexedTestCase::createDeviceAndDriver (Context& context,
device = createRobustBufferAccessDevice(context, &features2);
driver = DeviceDriverPtr(new DeviceDriver(context.getPlatformInterface(), context.getInstance(), *device, context.getUsedApiVersion(), context.getTestContext().getCommandLine()));
#else
customInstance = de::MovePtr(new CustomInstance(createCustomInstanceFromContext(context)));
customInstance = de::MovePtr<CustomInstance>(new CustomInstance(createCustomInstanceFromContext(context)));
device = createRobustBufferAccessDevice(context, *customInstance, &features2);
driver = DeviceDriverPtr(new DeviceDriverSC(context.getPlatformInterface(), *customInstance, *device, context.getTestContext().getCommandLine(),
context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties(), context.getUsedApiVersion()),
Expand Down Expand Up @@ -623,7 +623,7 @@ TestInstance* BindIndexBuffer2TestCase::createInstance (Context& context) const
#ifndef CTS_USES_VULKANSC
createDeviceAndDriver(context, device, deviceDriver);
#else
de::MovePtr<CustomInstance> customInstance = de::MovePtr(new CustomInstance(createCustomInstanceFromContext(context)));
de::MovePtr<CustomInstance> customInstance = de::MovePtr<CustomInstance>(new CustomInstance(createCustomInstanceFromContext(context)));
createDeviceAndDriver(context, customInstance, device, deviceDriver);
#endif // CTS_USES_VULKANSC

Expand Down

0 comments on commit d13582a

Please sign in to comment.