Fix memory allocation size in subgroups tests
authorCarl Ritson <carl.ritson@amd.com>
Mon, 11 Feb 2019 15:28:05 +0000 (15:28 +0000)
committerCarl Ritson <carl.ritson@amd.com>
Mon, 11 Feb 2019 16:21:47 +0000 (16:21 +0000)
Many subgroups test shaders are executed using std140 memory layout,
meaning a minimum stride of 16-bytes.  The common allocation path
assumes a packed layout and hence does not allocate sufficient buffer
for uint arrays, etc.
This change increases the allocation request size to address the issue.

Affects:
dEQP-VK.subgroups.*

Components: Vulkan

VK-GL-CTS Issue: 1593

Change-Id: I150cf0bb69029137a44c778c04cecbf2f61515ae

external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.cpp

index 410089f..f6f5d98 100644 (file)
@@ -573,7 +573,7 @@ struct Buffer : public BufferOrImage
                                                                context.getDevice(), &bufferCreateInfo);
                vk::VkMemoryRequirements req = getBufferMemoryRequirements(
                                                                                   context.getDeviceInterface(), context.getDevice(), *m_buffer);
-               req.size *= 2;
+               req.size *= 4;
                m_allocation = context.getDefaultAllocator().allocate(
                                                   req, MemoryRequirement::HostVisible);
                VK_CHECK(context.getDeviceInterface().bindBufferMemory(