Avoid shifting by more than bit width
authorAri Suonpaa <ari.suonpaa@siru.fi>
Wed, 24 Nov 2021 13:52:28 +0000 (15:52 +0200)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 2 Dec 2021 21:03:34 +0000 (21:03 +0000)
commit03cb2be937af5670a9b1b8f12e1f167a4454780b
tree6cc87078f22f5cfb00f95c147388d75708f54067
parent2206407af0950c6bdae7c8cd7adeffba4284a48c
Avoid shifting by more than bit width

Half float mantissa calculation was sometimes using
shift larger than a bit width. This change sets the
mantissa to zero in those cases.

VK-GL-CTS Issue: 3346
VK-GL-CTS Issue: 3349

Affects:

KHR-GLES*.core.internalformat.texture2d.*half_float*
KHR-GLES3.packed_pixels.*16f

Components: OpenGL ES
Change-Id: Ib91082fab530f6ff9e7cd5b6346ad7d433543a47
external/openglcts/modules/common/glcInternalformatTests.cpp
external/openglcts/modules/common/glcMisc.cpp