Avoid division by zero in calculateThreshold
authorJari Komppa <jari.komppa@siru.fi>
Tue, 4 Jan 2022 14:53:26 +0000 (16:53 +0200)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 13 Jan 2022 22:25:28 +0000 (22:25 +0000)
commit4e13ae54acbaf3e62a34d05d21f590c66be8a777
tree1e17f7065d88a66d427d4e398d5b55b65d4c2bb9
parent52fe51b0cde358810ac64d3d7bc6c8cd1878ca97
Avoid division by zero in calculateThreshold

The es31fCopyImageTests.cpp calculateThreshold function was written in a
too clever way, leading to division by zero in cases where texture
format did not include all channels.

Affects:
dEQP-GLES31.functional.copy_image.*_renderbuffer

Components: OpenGL
VK-GL-CTS issue: 3328

Change-Id: Iaf6b0d80f7427fee3567365603ba8dbd375f206d
modules/gles31/functional/es31fCopyImageTests.cpp