Return a valid format when GL_RGB8 is not treated as GL_RGBA8
authorPiers Daniell <pdaniell@nvidia.com>
Tue, 26 Jan 2021 17:19:30 +0000 (10:19 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 28 Jan 2021 16:28:46 +0000 (16:28 +0000)
commit2fce7996f200ccd59b3e915b049dd4c6019ee87d
treeb76e4b7058190509c6265de19f081deca226f681
parent0686cb1047466f033dc66657fd2dfd3749884e5f
Return a valid format when GL_RGB8 is not treated as GL_RGBA8

There was a special case added to NearestEdgeTestCase::toTextureFormat()
in https://gerrit.khronos.org/c/vk-gl-cts/+/6634 to support implementations
that treat GLRGB8 internally as GL_RGBA8888. This code change had a coding
error is that for implementations that don't support GLRGB8 in this way
ended up aborting with a fatal error:
    "Unable to map pixel format to texture format"

This trivial fix corrects the coding bug to simply return the
unadjusted format.

Affects:

KHR-GLES3.core.nearest_edge.offset_*
KHR-GLES31.core.nearest_edge.offset_*

Components: OpenGL

VK-GL-CTS issue: 2758

Change-Id: I639aed8bfed70941688d30edb02a770be4b05b08
external/openglcts/modules/common/glcNearestEdgeTests.cpp