Fix combined depth/stencil clear colors.
authorDave Airlie <airlied@redhat.com>
Thu, 27 Jul 2017 19:43:53 +0000 (05:43 +1000)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 11 Aug 2017 15:13:08 +0000 (11:13 -0400)
This test was clearing depth to 256.0, values > 1.0 are undefined.

This fixes the the combined depth/stencil clears to use valid values
for depth and stencil.

Affects:
dEQP-VK.api.copy_and_blit.core.image_to_image.all_formats.depth_stencil.*

VK-GL-CTS Issue: 591

Change-Id: I75fd7e2bf17a84f7a2730f36b4bcdc066af1177c

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

index c08e6bd..86edde0 100644 (file)
@@ -389,9 +389,9 @@ void CopiesAndBlittingTestInstance::generateBuffer (tcu::PixelBufferAccess buffe
                        case FILL_MODE_RED:
                                if (tcu::isCombinedDepthStencilType(buffer.getFormat().type))
                                {
-                                       buffer.setPixDepth(redColor[x % 4], x, y, z);
+                                       buffer.setPixDepth(redColor[0], x, y, z);
                                        if (tcu::hasStencilComponent(buffer.getFormat().order))
-                                               buffer.setPixStencil(255 * (int)redColor[y % 4], x, y, z);
+                                               buffer.setPixStencil((int)redColor[3], x, y, z);
                                }
                                else
                                        buffer.setPixel(redColor, x, y, z);