From 063900d488df37372d468db157447125bf1ee0a5 Mon Sep 17 00:00:00 2001 From: scygan Date: Mon, 4 Apr 2016 16:17:12 +0200 Subject: [PATCH] Fix non-square cube image faces in dEQP-VK.image.atomic_operations.*.cube* tests --- .../vulkancts/modules/vulkan/image/vktImageAtomicOperationTests.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/external/vulkancts/modules/vulkan/image/vktImageAtomicOperationTests.cpp b/external/vulkancts/modules/vulkan/image/vktImageAtomicOperationTests.cpp index 7376027..c3d61eb 100644 --- a/external/vulkancts/modules/vulkan/image/vktImageAtomicOperationTests.cpp +++ b/external/vulkancts/modules/vulkan/image/vktImageAtomicOperationTests.cpp @@ -756,7 +756,9 @@ void BinaryAtomicIntermValuesInstance::prepareResources (void) Allocator& allocator = m_context.getDefaultAllocator(); const UVec3 layerSize = getLayerSize(m_imageType, m_imageSize); - const UVec3 extendedLayerSize = UVec3(NUM_INVOCATIONS_PER_PIXEL * layerSize.x(), layerSize.y(), layerSize.z()); + const bool isCubeBasedImage = (m_imageType == IMAGE_TYPE_CUBE || m_imageType == IMAGE_TYPE_CUBE_ARRAY); + const UVec3 extendedLayerSize = isCubeBasedImage ? UVec3(NUM_INVOCATIONS_PER_PIXEL * layerSize.x(), NUM_INVOCATIONS_PER_PIXEL * layerSize.y(), layerSize.z()) + : UVec3(NUM_INVOCATIONS_PER_PIXEL * layerSize.x(), layerSize.y(), layerSize.z()); const VkImageCreateInfo imageParams = { -- 2.7.4