Fix bitshift issue in dEQP-VK.api.copy_and_blit.*
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / modules / vulkan / api / vktApiCopiesAndBlittingTests.cpp
index 881d8c7..8491776 100644 (file)
@@ -354,7 +354,7 @@ void CopiesAndBlittingTestInstance::generateBuffer (tcu::PixelBufferAccess buffe
                for (int i = 0; i < 4; ++i)
                {
                        if (bits[i] != 0)
-                               maxValue[i] = static_cast<float>((1 << (bits[i] - signBit)) - 1);
+                               maxValue[i] = static_cast<float>((deUint64(1) << (bits[i] - signBit)) - 1);
                }
        }
 
@@ -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);