getMemoryNative(vkd, *device, *memory, config.externalType, handleA);
{
+ const vk::Unique<vk::VkBuffer> bufferA (createExternalBuffer(vkd, *device, queueFamilyIndex, config.externalType, bufferSize, 0u, usage));
+ const vk::Unique<vk::VkBuffer> bufferB (createExternalBuffer(vkd, *device, queueFamilyIndex, config.externalType, bufferSize, 0u, usage));
NativeHandle handleB (handleA);
- const vk::Unique<vk::VkDeviceMemory> memoryA (importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handleA));
- const vk::Unique<vk::VkDeviceMemory> memoryB (importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handleB));
+ const vk::Unique<vk::VkDeviceMemory> memoryA (config.dedicated
+ ? importDedicatedMemory(vkd, *device, *bufferA, requirements, config.externalType, exportedMemoryTypeIndex, handleA)
+ : importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handleA));
+ const vk::Unique<vk::VkDeviceMemory> memoryB (config.dedicated
+ ? importDedicatedMemory(vkd, *device, *bufferB, requirements, config.externalType, exportedMemoryTypeIndex, handleB)
+ : importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handleB));
if (config.hostVisible)
{
for (size_t ndx = 0; ndx < count; ndx++)
{
+ const vk::Unique<vk::VkBuffer> bufferB (createExternalBuffer(vkd, *device, queueFamilyIndex, config.externalType, bufferSize, 0u, usage));
NativeHandle handleB (handleA);
- const vk::Unique<vk::VkDeviceMemory> memoryB (importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handleB));
+ const vk::Unique<vk::VkDeviceMemory> memoryB (config.dedicated
+ ? importDedicatedMemory(vkd, *device, *bufferB, requirements, config.externalType, exportedMemoryTypeIndex, handleB)
+ : importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handleB));
}
return tcu::TestStatus::pass("Pass");
TCU_CHECK_MSG(newFd.getFd() >= 0, "Failed to call dup() for memorys fd");
{
- const vk::Unique<vk::VkDeviceMemory> newMemory (importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, newFd));
+ const vk::Unique<vk::VkBuffer> newBuffer (createExternalBuffer(vkd, *device, queueFamilyIndex, config.externalType, bufferSize, 0u, usage));
+ const vk::Unique<vk::VkDeviceMemory> newMemory (config.dedicated
+ ? importDedicatedMemory(vkd, *device, *newBuffer, requirements, config.externalType, exportedMemoryTypeIndex, newFd)
+ : importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, newFd));
if (config.hostVisible)
{
TCU_CHECK_MSG(newFd >= 0, "Failed to call dup2() for memorys fd");
{
- const vk::Unique<vk::VkDeviceMemory> newMemory (importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, secondFd));
+ const vk::Unique<vk::VkBuffer> newBuffer (createExternalBuffer(vkd, *device, queueFamilyIndex, config.externalType, bufferSize, 0u, usage));
+ const vk::Unique<vk::VkDeviceMemory> newMemory (config.dedicated
+ ? importDedicatedMemory(vkd, *device, *newBuffer, requirements, config.externalType, exportedMemoryTypeIndex, secondFd)
+ : importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, secondFd));
if (config.hostVisible)
{
TCU_CHECK_MSG(newFd >= 0, "Failed to call dup3() for memorys fd");
{
- const vk::Unique<vk::VkDeviceMemory> newMemory (importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, secondFd));
+ const vk::Unique<vk::VkBuffer> newBuffer (createExternalBuffer(vkd, *device, queueFamilyIndex, config.externalType, bufferSize, 0u, usage));
+ const vk::Unique<vk::VkDeviceMemory> newMemory (config.dedicated
+ ? importDedicatedMemory(vkd, *device, *newBuffer, requirements, config.externalType, exportedMemoryTypeIndex, secondFd)
+ : importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, secondFd));
if (config.hostVisible)
{
TCU_CHECK_MSG(newFd.getFd() >= 0, "Didn't receive valid fd from socket");
{
- const vk::Unique<vk::VkDeviceMemory> newMemory (importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, newFd));
+ const vk::Unique<vk::VkBuffer> newBuffer (createExternalBuffer(vkd, *device, queueFamilyIndex, config.externalType, bufferSize, 0u, usage));
+ const vk::Unique<vk::VkDeviceMemory> newMemory (config.dedicated
+ ? importDedicatedMemory(vkd, *device, *newBuffer, requirements, config.externalType, exportedMemoryTypeIndex, newFd)
+ : importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, newFd));
if (config.hostVisible)
{
getMemoryNative(vkd, *device, *memoryA, config.externalType, handle);
{
- const vk::Unique<vk::VkDeviceMemory> memoryB (importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handle));
const vk::Unique<vk::VkBuffer> bufferB (createExternalBuffer(vkd, *device, queueFamilyIndex, config.externalType, bufferSize, 0u, usage));
+ const vk::Unique<vk::VkDeviceMemory> memoryB (config.dedicated
+ ? importDedicatedMemory(vkd, *device, *bufferB, requirements, config.externalType, exportedMemoryTypeIndex, handle)
+ : importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handle));
VK_CHECK(vkd.bindBufferMemory(*device, *bufferB, *memoryB, 0u));
}
VK_CHECK(vkd.bindBufferMemory(*device, *bufferA, *memoryA, 0u));
{
- const vk::Unique<vk::VkDeviceMemory> memoryB (importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handle));
const vk::Unique<vk::VkBuffer> bufferB (createExternalBuffer(vkd, *device, queueFamilyIndex, config.externalType, bufferSize, 0u, usage));
+ const vk::Unique<vk::VkDeviceMemory> memoryB (config.dedicated
+ ? importDedicatedMemory(vkd, *device, *bufferB, requirements, config.externalType, exportedMemoryTypeIndex, handle)
+ : importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handle));
VK_CHECK(vkd.bindBufferMemory(*device, *bufferB, *memoryB, 0u));
}
getMemoryNative(vkd, *device, *memoryA, config.externalType, handle);
{
- const vk::Unique<vk::VkDeviceMemory> memoryB (importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handle));
const vk::Unique<vk::VkBuffer> bufferB (createExternalBuffer(vkd, *device, queueFamilyIndex, config.externalType, bufferSize, 0u, usage));
+ const vk::Unique<vk::VkDeviceMemory> memoryB (config.dedicated
+ ? importDedicatedMemory(vkd, *device, *bufferB, requirements, config.externalType, exportedMemoryTypeIndex, handle)
+ : importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handle));
VK_CHECK(vkd.bindBufferMemory(*device, *bufferA, *memoryA, 0u));
VK_CHECK(vkd.bindBufferMemory(*device, *bufferB, *memoryB, 0u));