Use fill data that varies within 4 bytes boundaries
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 4 Oct 2017 15:34:16 +0000 (16:34 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 17 Oct 2017 08:04:56 +0000 (04:04 -0400)
We found a driver issue in the Intel Mesa driver where we used
R8G8B8A8 format to fill buffers which means it was swizzling the bytes
of the data given through the vulkan API.

This changes fills the data with different values for every byte so we
can detect such issues.

VK-GL-CTS issue: 743

Affects: dEQP-VK.api.fill_and_update_buffer*
Components: Vulkan
Change-Id: Id8ac8958b443f7384e93a8fbe11bf49202332f7c

external/vulkancts/modules/vulkan/api/vktApiFillBufferTests.cpp

index 7c5e226..135ee42 100644 (file)
@@ -421,7 +421,9 @@ tcu::TestCaseGroup*                                 createFillAndUpdateBufferTests  (tcu::TestContext&                      test
        for (deUint32 buffersAllocationNdx = 0u; buffersAllocationNdx < DE_LENGTH_OF_ARRAY(bufferAllocators); ++buffersAllocationNdx)
        {
                DE_ASSERT(params.dstSize <= TestParams::TEST_DATA_SIZE);
-               deMemset(params.testData, 0xFFu, (size_t)params.dstSize);
+               deUint8* data = (deUint8*) params.testData;
+               for (deUint32 b = 0u; b < (params.dstSize * sizeof(params.testData[0])); b++)
+                       data[b] = (deUint8) (b % 255);
                params.bufferAllocator = bufferAllocators[buffersAllocationNdx];
                const deUint32                          testCaseGroupNdx                                        = buffersAllocationNdx;
                tcu::TestCaseGroup*                     currentTestsGroup                                       = bufferViewAllocationGroupTests[testCaseGroupNdx];