Skip to content

Commit a0d21ab

Browse files
CJohnston-AMDlordalcol
authored andcommitted
Fix tests to use custom device interface that they've created.
These test groups create a custom device, but then don't use it. They use the default device instead. Components: Vulkan VK-GL-CTS issue: 5279 Affected tests: dEQP-VK.device_group.afr* dEQP-VK.fragment_shading_rate.*.attachment_rate.setup_with_copying_using_transfer_queue* dEQP-VK.synchronization*.basic.*_semaphore.multi_queue* Change-Id: I96d9f4c33be6b7bba955e010023ac96f199186d7
1 parent aeb7e7d commit a0d21ab

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

external/vulkancts/modules/vulkan/device_group/vktDeviceGroupRendering.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,14 @@ void DeviceGroupTestInstance::submitBufferAndWaitForIdle(const vk::DeviceInterfa
408408

409409
tcu::TestStatus DeviceGroupTestInstance::iterate(void)
410410
{
411-
const InstanceInterface &vki = m_instanceWrapper->instance.getDriver();
412-
const vk::DeviceInterface &vk = m_context.getDeviceInterface();
411+
const InstanceInterface &vki = m_instanceWrapper->instance.getDriver();
412+
413+
de::MovePtr<vk::DeviceDriver> deviceDriver = de::MovePtr<DeviceDriver>(
414+
new DeviceDriver(m_context.getPlatformInterface(), m_instanceWrapper->instance, *m_deviceGroup,
415+
m_context.getUsedApiVersion(), m_context.getTestContext().getCommandLine()));
416+
417+
const DeviceInterface &vk = *deviceDriver;
418+
413419
const uint32_t queueFamilyIndex = m_context.getUniversalQueueFamilyIndex();
414420
const tcu::UVec2 renderSize(256, 256);
415421
const VkFormat colorFormat = VK_FORMAT_R8G8B8A8_UNORM;

external/vulkancts/modules/vulkan/fragment_shading_rate/vktAttachmentRateTests.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class AttachmentRateInstance : public TestInstance
235235
void startRendering(const VkCommandBuffer commandBuffer, const VkRenderPass renderPass,
236236
const VkFramebuffer framebuffer, const VkRect2D &renderArea,
237237
const std::vector<FBAttachmentInfo> &attachmentInfo, const uint32_t srTileWidth = 0,
238-
const uint32_t srTileHeight = 0) const;
238+
const uint32_t srTileHeight = 0, const DeviceInterface *customDevice = nullptr) const;
239239
void finishRendering(const VkCommandBuffer commandBuffer) const;
240240

241241
bool verifyUsingAtomicChecks(uint32_t tileWidth, uint32_t tileHeight, uint32_t rateWidth, uint32_t rateHeight,
@@ -908,9 +908,10 @@ VkDescriptorSetAllocateInfo AttachmentRateInstance::makeDescriptorSetAllocInfo(
908908
void AttachmentRateInstance::startRendering(const VkCommandBuffer commandBuffer, const VkRenderPass renderPass,
909909
const VkFramebuffer framebuffer, const VkRect2D &renderArea,
910910
const std::vector<FBAttachmentInfo> &attachmentInfo,
911-
const uint32_t srTileWidth, const uint32_t srTileHeight) const
911+
const uint32_t srTileWidth, const uint32_t srTileHeight,
912+
const DeviceInterface *customDevice) const
912913
{
913-
const DeviceInterface &vk(m_context.getDeviceInterface());
914+
const DeviceInterface &vk = (customDevice != nullptr) ? *customDevice : m_context.getDeviceInterface();
914915
std::vector<VkClearValue> clearColor(attachmentInfo.size(), makeClearValueColorU32(0, 0, 0, 0));
915916

916917
#ifndef CTS_USES_VULKANSC
@@ -1932,7 +1933,7 @@ bool AttachmentRateInstance::runCopyModeOnTransferQueue(void)
19321933
&cbImageBarrier);
19331934

19341935
startRendering(*graphicsCmdBuffer, *renderPass, *framebuffer, makeRect2D(m_cbWidth, m_cbHeight),
1935-
attachmentInfo, tileWidth, tileHeight);
1936+
attachmentInfo, tileWidth, tileHeight, driver);
19361937

19371938
// draw single triangle to cb
19381939
vk.cmdBindDescriptorSets(*graphicsCmdBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, *graphicsPipelineLayout, 0, 1,

external/vulkancts/modules/vulkan/synchronization/vktSynchronizationBasicSemaphoreTests.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -549,12 +549,6 @@ tcu::TestStatus basicMultiQueueCase(Context &context, TestConfig config)
549549
const VkPhysicalDevice physicalDevice = context.getPhysicalDevice();
550550
bool usingTimelineSemaphores = config.semaphoreType == VK_SEMAPHORE_TYPE_TIMELINE;
551551

552-
de::MovePtr<VideoDevice> videoDevice(
553-
config.videoCodecOperationFlags != 0 ?
554-
getVideoDevice(context, usingTimelineSemaphores, config.videoCodecOperationFlags) :
555-
DE_NULL);
556-
557-
const DeviceInterface &vk = getSyncDeviceInterface(videoDevice, context);
558552
std::vector<VkQueueFamilyVideoPropertiesKHR> videoQueueFamilyProperties2;
559553
#else
560554
const CustomInstance instance(createCustomInstanceFromContext(context));
@@ -748,9 +742,17 @@ tcu::TestStatus basicMultiQueueCase(Context &context, TestConfig config)
748742
context.getPlatformInterface(), instance, instanceInterface, physicalDevice, &deviceInfo);
749743

750744
#ifndef CTS_USES_VULKANSC
745+
de::MovePtr<VideoDevice> videoDevice(
746+
config.videoCodecOperationFlags != 0 ?
747+
getVideoDevice(context, usingTimelineSemaphores, config.videoCodecOperationFlags) :
748+
DE_NULL);
749+
751750
de::MovePtr<vk::DeviceDriver> deviceDriver = de::MovePtr<DeviceDriver>(
752751
new DeviceDriver(context.getPlatformInterface(), instance, *logicalDevice, context.getUsedApiVersion(),
753752
context.getTestContext().getCommandLine()));
753+
754+
const DeviceInterface &vk = (videoDevice != DE_NULL) ? getSyncDeviceInterface(videoDevice, context) : *deviceDriver;
755+
754756
#else
755757
de::MovePtr<vk::DeviceDriverSC, vk::DeinitDeviceDeleter> deviceDriver =
756758
de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(

0 commit comments

Comments
 (0)