Reduce GPU workload of pipeline_barrier tests
authorJeff Leger <jleger@codeaurora.org>
Wed, 22 Nov 2017 17:12:58 +0000 (12:12 -0500)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 1 Dec 2017 15:51:16 +0000 (10:51 -0500)
Tests with large buffer sizes will now clamp the
GPU workload to avoid triggering execution timeout
on implementations.

Affects: dEQP-VK-memory.pipeline_barrier.*

Components: Vulkan

VK_GL_CTS issue: 813

Change-Id: I479f6ad04ef2ec6f9d87b65a39a2bc13bcbcc6a2

external/vulkancts/modules/vulkan/memory/vktMemoryPipelineBarrierTests.cpp

index c62db51..29476ab 100644 (file)
@@ -83,7 +83,8 @@ namespace
 enum
 {
        MAX_UNIFORM_BUFFER_SIZE = 1024,
-       MAX_STORAGE_BUFFER_SIZE = (1<<28)
+       MAX_STORAGE_BUFFER_SIZE = (1<<28),
+       MAX_SIZE = (128 * 1024)
 };
 
 // \todo [mika] Add to utilities
@@ -6129,7 +6130,7 @@ void RenderFragmentUniformBuffer::prepare (PrepareRenderPassContext& context)
        const vk::Unique<vk::VkShaderModule>            fragmentShaderModule    (vk::createShaderModule(vkd, device, context.getBinaryCollection().get("uniform-buffer.frag"), 0));
        vector<vk::VkDescriptorSetLayoutBinding>        bindings;
 
-       m_bufferSize    = context.getBufferSize();
+       m_bufferSize    = de::min(context.getBufferSize(), (vk::VkDeviceSize)MAX_SIZE);
        m_targetWidth   = context.getTargetWidth();
        m_targetHeight  = context.getTargetHeight();