Merge vk-gl-cts/vulkan-cts-1.0.2 into vk-gl-cts/master
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / modules / vulkan / api / vktApiCopiesAndBlittingTests.cpp
index 86edde0..6e38fdb 100644 (file)
@@ -398,8 +398,12 @@ void CopiesAndBlittingTestInstance::generateBuffer (tcu::PixelBufferAccess buffe
                                break;
 
                        case FILL_MODE_MULTISAMPLE:
-                               buffer.setPixel((x == y) ? tcu::Vec4(0.0, 0.5, 0.5, 1.0) : ((x > y) ? greenColor : blueColor), x, y, z);
+                       {
+                               float xScaled = static_cast<float>(x) / static_cast<float>(width);
+                               float yScaled = static_cast<float>(y) / static_cast<float>(height);
+                               buffer.setPixel((xScaled == yScaled) ? tcu::Vec4(0.0, 0.5, 0.5, 1.0) : ((xScaled > yScaled) ? greenColor : blueColor), x, y, z);
                                break;
+                       }
 
                        default:
                                break;
@@ -3185,7 +3189,7 @@ tcu::TestStatus ResolveImageToImage::iterate (void)
                                0u,                                                                     // deUint32                             baseMipLevel;
                                1u,                                                                     // deUint32                             mipLevels;
                                0u,                                                                     // deUint32                             baseArraySlice;
-                               getArraySize(m_params.dst.image)        // deUint32                             arraySize;
+                               getArraySize(m_params.src.image)        // deUint32                             arraySize;
                        }
                },
                // destination image
@@ -4231,6 +4235,7 @@ void addImageToImage3dImagesTests (tcu::TestCaseGroup* group, AllocationKind all
                params3DTo2D.dst.image.operationLayout  = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
                params3DTo2D.allocationKind                             = allocationKind;
 
+               for (deUint32 slicesLayersNdx = 0; slicesLayersNdx < slicesLayers; ++slicesLayersNdx)
                {
                        const VkImageSubresourceLayers  sourceLayer     =
                        {
@@ -4644,6 +4649,7 @@ void addBufferToBufferTests (tcu::TestCaseGroup* group, AllocationKind allocatio
                group->addChild(new BufferToBufferTestCase(testCtx, "whole", "Whole buffer", params));
        }
 
+       // Filter is VK_FILTER_NEAREST.
        {
                TestParams                      params;
                params.src.buffer.size  = defaultFourthSize;
@@ -5017,7 +5023,6 @@ void addBlittingImageSimpleMirrorSubregionsTests (tcu::TestCaseGroup* group, All
                                {defaultSize, 0, 1}
                        }                                       // VkOffset3D                           dstOffset[2];
                };
-
                CopyRegion      region;
                region.imageBlit = imageBlit;
                params.regions.push_back(region);