Merge vk-gl-cts/vulkan-cts-1.1.1 into vk-gl-cts/vulkan-cts-next-dev
authorAlexander Galazin <alexander.galazin@arm.com>
Thu, 22 Feb 2018 14:23:23 +0000 (15:23 +0100)
committerAlexander Galazin <alexander.galazin@arm.com>
Thu, 22 Feb 2018 14:23:23 +0000 (15:23 +0100)
Change-Id: I34f59a239f54a494734f6934cdadf9cc45d02fcb

external/fetch_sources.py
external/vulkancts/modules/vulkan/api/vktApiBufferTests.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineImageUtil.cpp
external/vulkancts/modules/vulkan/ycbcr/vktYCbCrUtil.cpp

index 3d81aad..4102ee5 100644 (file)
@@ -257,12 +257,12 @@ PACKAGES = [
        GitRepo(
                "https://gitlab.khronos.org/GLSL/glslang.git",
                "git@gitlab.khronos.org:GLSL/glslang.git",
-               "vulkan-1.1-rc7",
+               "vulkan-1.1-rc8",
                "glslang"),
        GitRepo(
                "https://gitlab.khronos.org/spirv/SPIRV-Headers.git",
                "git@gitlab.khronos.org:spirv/SPIRV-Headers.git",
-               "vulkan-1.1-rc1",
+               "vulkan-1.1-rc2",
                "spirv-headers"),
 ]
 
index fbf03de..4916145 100644 (file)
@@ -572,11 +572,20 @@ tcu::TestStatus                                                   DedicatedAllocationBufferTestInstance::bufferCreateAndAllo
        const deUint32                                          heapTypeIndex                                   = static_cast<deUint32>(deCtz32(memReqs.memoryRequirements.memoryTypeBits));
        const VkMemoryType                                      memoryType                                              = memoryProperties.memoryTypes[heapTypeIndex];
        const VkMemoryHeap                                      memoryHeap                                              = memoryProperties.memoryHeaps[memoryType.heapIndex];
-       const VkDeviceSize                                      maxBufferSize                                   = deAlign64(memoryHeap.size >> 1u, memReqs.memoryRequirements.alignment);
        const deUint32                                          shrinkBits                                              = 4u;   // number of bits to shift when reducing the size with each iteration
 
+       // Buffer size - Choose half of the reported heap size for the maximum buffer size, we
+       // should attempt to test as large a portion as possible.
+       //
+       // However on a system where device memory is shared with the system, the maximum size
+       // should be tested against the platform memory limits as a significant portion of the heap
+       // may already be in use by the operating system and other running processes.
+       const VkDeviceSize maxBufferSize = getMaxBufferSize(memoryHeap.size,
+                                                                                                          memReqs.memoryRequirements.alignment,
+                                                                                                          getPlatformMemoryLimits(m_context));
+
        Move<VkDeviceMemory>                            memory;
-       size = std::min(size, maxBufferSize);
+       size = deAlign64(std::min(size, maxBufferSize >> 1), memReqs.memoryRequirements.alignment);
        while (*memory == DE_NULL)
        {
                // Create the buffer
index 0ac99c1..ba0d82d 100644 (file)
@@ -729,7 +729,6 @@ void allocateAndBindSparseImage (const DeviceInterface&                                             vk,
                                imageMipTailMemoryBinds.push_back(imageMipTailMemoryBind);
                        }
                }
-
                // Handle Metadata. Similarly to MIP tail in aspectRequirements, there are two cases to consider here:
                //
                // 1) VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT is requested by the driver: each layer needs a separate tail.
index c230969..b154198 100644 (file)
@@ -1988,7 +1988,7 @@ void calculateBounds (const ChannelAccess&                                        rPlane,
                                                        const IVec2     chromaJRange    (subsampledY ? calculateNearestIJRange(coordFormat, chromaV) : IVec2(j, j));
 
                                                        for (int chromaJ = chromaJRange.x(); chromaJ <= chromaJRange.y(); chromaJ++)
-                                                       for (int chromaI = chromaIRange.x(); chromaI <= chromaIRange.x(); chromaI++)
+                                                       for (int chromaI = chromaIRange.x(); chromaI <= chromaIRange.y(); chromaI++)
                                                        {
                                                                const Interval  srcColor[]      =
                                                                {
@@ -2012,7 +2012,7 @@ void calculateBounds (const ChannelAccess&                                        rPlane,
                                                        const IVec2     chromaJRange    (subsampledY ? calculateLinearIJRange(coordFormat, chromaV) : IVec2(j, j));
 
                                                        for (int chromaJ = chromaJRange.x(); chromaJ <= chromaJRange.y(); chromaJ++)
-                                                       for (int chromaI = chromaIRange.x(); chromaI <= chromaIRange.x(); chromaI++)
+                                                       for (int chromaI = chromaIRange.x(); chromaI <= chromaIRange.y(); chromaI++)
                                                        {
                                                                const Interval  chromaA (calculateAB(subTexelPrecisionBits, chromaU, chromaI));
                                                                const Interval  chromaB (calculateAB(subTexelPrecisionBits, chromaV, chromaJ));
@@ -2177,7 +2177,7 @@ void calculateBounds (const ChannelAccess&                                        rPlane,
                                                        const IVec2     chromaJRange    (calculateNearestIJRange(coordFormat, chromaV));
 
                                                        for (int chromaJ = chromaJRange.x(); chromaJ <= chromaJRange.y(); chromaJ++)
-                                                       for (int chromaI = chromaIRange.x(); chromaI <= chromaIRange.x(); chromaI++)
+                                                       for (int chromaI = chromaIRange.x(); chromaI <= chromaIRange.y(); chromaI++)
                                                        {
                                                                const Interval  srcColor[]      =
                                                                {
@@ -2200,7 +2200,7 @@ void calculateBounds (const ChannelAccess&                                        rPlane,
                                                        const IVec2     chromaJRange    (calculateNearestIJRange(coordFormat, chromaV));
 
                                                        for (int chromaJ = chromaJRange.x(); chromaJ <= chromaJRange.y(); chromaJ++)
-                                                       for (int chromaI = chromaIRange.x(); chromaI <= chromaIRange.x(); chromaI++)
+                                                       for (int chromaI = chromaIRange.x(); chromaI <= chromaIRange.y(); chromaI++)
                                                        {
                                                                const Interval  chromaA         (calculateAB(subTexelPrecisionBits, chromaU, chromaI));
                                                                const Interval  chromaB         (calculateAB(subTexelPrecisionBits, chromaV, chromaJ));