Request queue with sparse support only when needed
authorAlexander Galazin <alexander.galazin@arm.com>
Fri, 20 Jul 2018 09:12:17 +0000 (11:12 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 26 Jul 2018 07:10:23 +0000 (03:10 -0400)
Commit a598fe87 added tests for sparse D/S/DS images and
at the same time turned many texture tests into NotSupported
on implementations what do not support sparse.

Components: Vulkan

Affects:
dEQP-VK.texture.compressed.*
dEQP-VK.glsl.texture_functions.texture.sparse*shadow*
dEQP-VK.glsl.texture_gather.*depth32f*sparse*
dEQP-VK.texture.shadow.*sparse*

VK-GL-CTS issue: 1277

Change-Id: I83392d4f1060efbe0b1eebb0dfa8c8d5306113db

external/vulkancts/modules/vulkan/texture/vktTextureTestUtil.cpp

index f508026..dde5a5d 100644 (file)
@@ -299,7 +299,7 @@ void initializePrograms(vk::SourceCollections& programCollection, glu::Precision
 
 TextureBinding::TextureBinding (Context& context)
        : m_context                             (context)
-       , m_queueFamilyIndex    (findQueueFamilyIndexWithCaps(context.getInstanceInterface(), context.getPhysicalDevice(), VK_QUEUE_GRAPHICS_BIT|VK_QUEUE_SPARSE_BINDING_BIT))
+       , m_queueFamilyIndex    (m_context.getUniversalQueueFamilyIndex())
        , m_device                              (createDevice())
        , m_deviceInterface             (context.getInstanceInterface(), *m_device)
        , m_allocator                   (createAllocator())
@@ -308,7 +308,7 @@ TextureBinding::TextureBinding (Context& context)
 
 TextureBinding::TextureBinding (Context& context, const TestTextureSp& textureData, const TextureBinding::Type type, const TextureBinding::ImageBackingMode backingMode)
        : m_context                             (context)
-       , m_queueFamilyIndex    (findQueueFamilyIndexWithCaps(context.getInstanceInterface(), context.getPhysicalDevice(), VK_QUEUE_GRAPHICS_BIT|VK_QUEUE_SPARSE_BINDING_BIT))
+       , m_queueFamilyIndex    ((backingMode == IMAGE_BACKING_MODE_SPARSE) ? (findQueueFamilyIndexWithCaps(context.getInstanceInterface(), context.getPhysicalDevice(),  VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_SPARSE_BINDING_BIT)) : m_context.getUniversalQueueFamilyIndex())
        , m_type                                (type)
        , m_backingMode                 (backingMode)
        , m_textureData                 (textureData)