Adjust texture data and threshold
authorliruoyu <ruoyu@amd.com>
Tue, 3 Nov 2020 08:31:17 +0000 (16:31 +0800)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 29 Jan 2021 10:53:59 +0000 (10:53 +0000)
commit10ec13fe4fc04efccde1a959478b0bd54bcfaf8c
tree1f8384ee1dd216638261baf016404b5a764a3bd4
parentee26dd4db7a31dc79f722abf10c427b6dd75ba6f
Adjust texture data and threshold

Affects:
dEQP-GLES3.functional.texture.wrap.*
dEQP-GLES2.functional.texture.wrap.*

Components: OpenGL

VK-GL-CTS issue: 2589

Root cause:
We treat all variable which have relaxed precision decoration as half precision value.
1. When run in repeat&linear mode, sampling texture edge will get an
unexpect result.
2. When run in nearest mode, threshold is 2/256, but texture gradient is
2/255. so, if target texel's deviation more then 1, will get a fail
result.

Solution:
1. Adjust texture data, make the difference between two adjacent texel under 2/256
in per-channel.
2. Adjust threshold to 2/255 in RGBA_8888 mode, adjust threshold to (1 + 256/16) in RGBA_4444 mode.
3. Adjust texture data, make the texture gradient like a pyramid in
repeat mode.

Change-Id: I2382d36bdeb227e81d0d0b8f76f61d26a00f0fcd
framework/common/tcuTexLookupVerifier.cpp
framework/common/tcuTexLookupVerifier.hpp
framework/common/tcuTexVerifierUtil.cpp
framework/common/tcuTexVerifierUtil.hpp
framework/common/tcuTextureUtil.cpp
framework/common/tcuTextureUtil.hpp
modules/gles2/functional/es2fTextureWrapTests.cpp
modules/gles3/functional/es3fTextureWrapTests.cpp