From: Jarkko Pöyry Date: Mon, 27 Jul 2015 21:35:27 +0000 (-0700) Subject: Rename queueIndex to queueFamilyIndex. X-Git-Tag: upstream/0.1.0~812^2~609^2~14^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa8d8350fe202ecc4697be1d08f2047c90e91332;p=platform%2Fupstream%2FVK-GL-CTS.git Rename queueIndex to queueFamilyIndex. Change-Id: I84222dbf95e74097d850c1fabef44691fa4e2d60 --- diff --git a/external/vulkancts/modules/vulkan/api/vktApiTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiTests.cpp index 15fda00..9ef863c 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiTests.cpp @@ -130,7 +130,7 @@ tcu::TestStatus renderTriangleTest (Context& context) const VkDevice vkDevice = context.getDevice(); const DeviceInterface& vk = context.getDeviceInterface(); const VkQueue queue = context.getUniversalQueue(); - const deUint32 queueIndex = context.getUniversalQueueIndex(); + const deUint32 queueFamilyIndex = context.getUniversalQueueFamilyIndex(); SimpleAllocator memAlloc (vk, vkDevice, getPhysicalDeviceMemoryProperties(context.getInstanceInterface(), context.getPhysicalDevice())); const tcu::IVec2 renderSize (256, 256); @@ -150,7 +150,7 @@ tcu::TestStatus renderTriangleTest (Context& context) 0u, // VkBufferCreateFlags flags; VK_SHARING_MODE_EXCLUSIVE, // VkSharingMode sharingMode; 1u, // deUint32 queueFamilyCount; - &queueIndex, // const deUint32* pQueueFamilyIndices; + &queueFamilyIndex, // const deUint32* pQueueFamilyIndices; }; const Unique vertexBuffer (createBuffer(vk, vkDevice, &vertexBufferParams)); const UniquePtr vertexBufferMemory (memAlloc.allocate(getBufferMemoryRequirements(vk, vkDevice, *vertexBuffer), VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT)); @@ -165,7 +165,7 @@ tcu::TestStatus renderTriangleTest (Context& context) 0u, // VkBufferCreateFlags flags; VK_SHARING_MODE_EXCLUSIVE, // VkSharingMode sharingMode; 1u, // deUint32 queueFamilyCount; - &queueIndex, // const deUint32* pQueueFamilyIndices; + &queueFamilyIndex, // const deUint32* pQueueFamilyIndices; }; const Unique readImageBuffer (createBuffer(vk, vkDevice, &readImageBufferParams)); const UniquePtr readImageBufferMemory (memAlloc.allocate(getBufferMemoryRequirements(vk, vkDevice, *readImageBuffer), VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT)); @@ -185,7 +185,7 @@ tcu::TestStatus renderTriangleTest (Context& context) 0u, // VkImageCreateFlags flags; VK_SHARING_MODE_EXCLUSIVE, // VkSharingMode sharingMode; 1u, // deUint32 queueFamilyCount; - &queueIndex, // const deUint32* pQueueFamilyIndices; + &queueFamilyIndex, // const deUint32* pQueueFamilyIndices; }; const Unique image (createImage(vk, vkDevice, &imageParams)); @@ -549,8 +549,8 @@ tcu::TestStatus renderTriangleTest (Context& context) 0u, // VkMemoryInputFlags inputMask; VK_IMAGE_LAYOUT_UNDEFINED, // VkImageLayout oldLayout; VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, // VkImageLayout newLayout; - queueIndex, // deUint32 srcQueueFamilyIndex; - queueIndex, // deUint32 destQueueFamilyIndex; + queueFamilyIndex, // deUint32 srcQueueFamilyIndex; + queueFamilyIndex, // deUint32 destQueueFamilyIndex; *image, // VkImage image; { VK_IMAGE_ASPECT_COLOR, // VkImageAspect aspect; @@ -599,8 +599,8 @@ tcu::TestStatus renderTriangleTest (Context& context) VK_MEMORY_INPUT_TRANSFER_BIT, // VkMemoryInputFlags inputMask; VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, // VkImageLayout oldLayout; VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL, // VkImageLayout newLayout; - queueIndex, // deUint32 srcQueueFamilyIndex; - queueIndex, // deUint32 destQueueFamilyIndex; + queueFamilyIndex, // deUint32 srcQueueFamilyIndex; + queueFamilyIndex, // deUint32 destQueueFamilyIndex; *image, // VkImage image; { VK_IMAGE_ASPECT_COLOR, // VkImageAspect aspect; @@ -638,8 +638,8 @@ tcu::TestStatus renderTriangleTest (Context& context) DE_NULL, // const void* pNext; VK_MEMORY_OUTPUT_TRANSFER_BIT, // VkMemoryOutputFlags outputMask; VK_MEMORY_INPUT_HOST_READ_BIT, // VkMemoryInputFlags inputMask; - queueIndex, // deUint32 srcQueueFamilyIndex; - queueIndex, // deUint32 destQueueFamilyIndex; + queueFamilyIndex, // deUint32 srcQueueFamilyIndex; + queueFamilyIndex, // deUint32 destQueueFamilyIndex; *readImageBuffer, // VkBuffer buffer; 0u, // VkDeviceSize offset; imageSizeBytes // VkDeviceSize size; diff --git a/external/vulkancts/modules/vulkan/vktTestCase.cpp b/external/vulkancts/modules/vulkan/vktTestCase.cpp index e70384b..b9d5a8e 100644 --- a/external/vulkancts/modules/vulkan/vktTestCase.cpp +++ b/external/vulkancts/modules/vulkan/vktTestCase.cpp @@ -49,7 +49,7 @@ namespace vkt using std::vector; using namespace vk; -static deUint32 findQueueNodeIndexWithCaps (const InstanceInterface& vkInstance, VkPhysicalDevice physicalDevice, VkQueueFlags requiredCaps) +static deUint32 findQueueFamilyIndexWithCaps (const InstanceInterface& vkInstance, VkPhysicalDevice physicalDevice, VkQueueFlags requiredCaps) { const vector queueProps = getPhysicalDeviceQueueProperties(vkInstance, physicalDevice); @@ -95,19 +95,19 @@ struct DeviceCreateInfoHelper class DefaultDevice { public: - DefaultDevice (const PlatformInterface& vkPlatform, const tcu::CommandLine& cmdLine); - ~DefaultDevice (void); + DefaultDevice (const PlatformInterface& vkPlatform, const tcu::CommandLine& cmdLine); + ~DefaultDevice (void); - VkInstance getInstance (void) const { return *m_instance; } - const InstanceInterface& getInstanceInterface (void) const { return m_instanceInterface; } + VkInstance getInstance (void) const { return *m_instance; } + const InstanceInterface& getInstanceInterface (void) const { return m_instanceInterface; } - VkPhysicalDevice getPhysicalDevice (void) const { return m_physicalDevice; } + VkPhysicalDevice getPhysicalDevice (void) const { return m_physicalDevice; } - VkDevice getDevice (void) const { return *m_device; } - const DeviceInterface& getDeviceInterface (void) const { return m_deviceInterface; } + VkDevice getDevice (void) const { return *m_device; } + const DeviceInterface& getDeviceInterface (void) const { return m_deviceInterface; } - deUint32 getUniversalQueueIndex (void) const { return m_universalQueueIndex; } - VkQueue getUniversalQueue (void) const; + deUint32 getUniversalQueueFamilyIndex (void) const { return m_universalQueueFamilyIndex; } + VkQueue getUniversalQueue (void) const; private: const Unique m_instance; @@ -115,7 +115,7 @@ private: const VkPhysicalDevice m_physicalDevice; - const deUint32 m_universalQueueIndex; + const deUint32 m_universalQueueFamilyIndex; const DeviceCreateInfoHelper m_deviceCreateInfo; const Unique m_device; @@ -123,13 +123,13 @@ private: }; DefaultDevice::DefaultDevice (const PlatformInterface& vkPlatform, const tcu::CommandLine& cmdLine) - : m_instance (createDefaultInstance(vkPlatform)) - , m_instanceInterface (vkPlatform, *m_instance) - , m_physicalDevice (chooseDevice(m_instanceInterface, *m_instance, cmdLine)) - , m_universalQueueIndex (findQueueNodeIndexWithCaps(m_instanceInterface, m_physicalDevice, VK_QUEUE_GRAPHICS_BIT|VK_QUEUE_COMPUTE_BIT|VK_QUEUE_DMA_BIT)) - , m_deviceCreateInfo (m_universalQueueIndex) - , m_device (createDevice(m_instanceInterface, m_physicalDevice, &m_deviceCreateInfo.deviceInfo)) - , m_deviceInterface (m_instanceInterface, *m_device) + : m_instance (createDefaultInstance(vkPlatform)) + , m_instanceInterface (vkPlatform, *m_instance) + , m_physicalDevice (chooseDevice(m_instanceInterface, *m_instance, cmdLine)) + , m_universalQueueFamilyIndex (findQueueFamilyIndexWithCaps(m_instanceInterface, m_physicalDevice, VK_QUEUE_GRAPHICS_BIT|VK_QUEUE_COMPUTE_BIT|VK_QUEUE_DMA_BIT)) + , m_deviceCreateInfo (m_universalQueueFamilyIndex) + , m_device (createDevice(m_instanceInterface, m_physicalDevice, &m_deviceCreateInfo.deviceInfo)) + , m_deviceInterface (m_instanceInterface, *m_device) { } @@ -140,7 +140,7 @@ DefaultDevice::~DefaultDevice (void) VkQueue DefaultDevice::getUniversalQueue (void) const { VkQueue queue = 0; - VK_CHECK(m_deviceInterface.getDeviceQueue(*m_device, m_universalQueueIndex, 0, &queue)); + VK_CHECK(m_deviceInterface.getDeviceQueue(*m_device, m_universalQueueFamilyIndex, 0, &queue)); return queue; } @@ -161,13 +161,13 @@ Context::~Context (void) delete m_device; } -vk::VkInstance Context::getInstance (void) const { return m_device->getInstance(); } -const vk::InstanceInterface& Context::getInstanceInterface (void) const { return m_device->getInstanceInterface(); } -vk::VkPhysicalDevice Context::getPhysicalDevice (void) const { return m_device->getPhysicalDevice(); } -vk::VkDevice Context::getDevice (void) const { return m_device->getDevice(); } -const vk::DeviceInterface& Context::getDeviceInterface (void) const { return m_device->getDeviceInterface(); } -deUint32 Context::getUniversalQueueIndex (void) const { return m_device->getUniversalQueueIndex(); } -vk::VkQueue Context::getUniversalQueue (void) const { return m_device->getUniversalQueue(); } +vk::VkInstance Context::getInstance (void) const { return m_device->getInstance(); } +const vk::InstanceInterface& Context::getInstanceInterface (void) const { return m_device->getInstanceInterface(); } +vk::VkPhysicalDevice Context::getPhysicalDevice (void) const { return m_device->getPhysicalDevice(); } +vk::VkDevice Context::getDevice (void) const { return m_device->getDevice(); } +const vk::DeviceInterface& Context::getDeviceInterface (void) const { return m_device->getDeviceInterface(); } +deUint32 Context::getUniversalQueueFamilyIndex (void) const { return m_device->getUniversalQueueFamilyIndex(); } +vk::VkQueue Context::getUniversalQueue (void) const { return m_device->getUniversalQueue(); } // TestCase diff --git a/external/vulkancts/modules/vulkan/vktTestCase.hpp b/external/vulkancts/modules/vulkan/vktTestCase.hpp index e6acca3..937c3d2 100644 --- a/external/vulkancts/modules/vulkan/vktTestCase.hpp +++ b/external/vulkancts/modules/vulkan/vktTestCase.hpp @@ -58,23 +58,23 @@ class DefaultDevice; class Context { public: - Context (tcu::TestContext& testCtx, - const vk::PlatformInterface& platformInterface, - vk::ProgramCollection& progCollection); - ~Context (void); + Context (tcu::TestContext& testCtx, + const vk::PlatformInterface& platformInterface, + vk::ProgramCollection& progCollection); + ~Context (void); - tcu::TestContext& getTestContext (void) const { return m_testCtx; } - const vk::PlatformInterface& getPlatformInterface (void) const { return m_platformInterface; } - vk::ProgramCollection& getBinaryCollection (void) const { return m_progCollection; } + tcu::TestContext& getTestContext (void) const { return m_testCtx; } + const vk::PlatformInterface& getPlatformInterface (void) const { return m_platformInterface; } + vk::ProgramCollection& getBinaryCollection (void) const { return m_progCollection; } // Default instance & device, selected with --deqp-vk-device-id=N - vk::VkInstance getInstance (void) const; - const vk::InstanceInterface& getInstanceInterface (void) const; - vk::VkPhysicalDevice getPhysicalDevice (void) const; - vk::VkDevice getDevice (void) const; - const vk::DeviceInterface& getDeviceInterface (void) const; - deUint32 getUniversalQueueIndex (void) const; - vk::VkQueue getUniversalQueue (void) const; + vk::VkInstance getInstance (void) const; + const vk::InstanceInterface& getInstanceInterface (void) const; + vk::VkPhysicalDevice getPhysicalDevice (void) const; + vk::VkDevice getDevice (void) const; + const vk::DeviceInterface& getDeviceInterface (void) const; + deUint32 getUniversalQueueFamilyIndex (void) const; + vk::VkQueue getUniversalQueue (void) const; protected: tcu::TestContext& m_testCtx; @@ -84,8 +84,8 @@ protected: DefaultDevice* const m_device; private: - Context (const Context&); // Not allowed - Context& operator= (const Context&); // Not allowed + Context (const Context&); // Not allowed + Context& operator= (const Context&); // Not allowed }; class TestInstance;