Robust_buffer_access_behavior.texel_fetch relies on undefined behavior
authorYabin Zheng <yabin.zheng@arm.com>
Thu, 21 Jun 2018 01:41:20 +0000 (09:41 +0800)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Sun, 8 Jul 2018 14:13:24 +0000 (10:13 -0400)
commit06564d2a372272b9e4bbd10a507334f1ef3d832e
tree392f0ba0c967ce517d51d5ffd6489918a4165360
parent7b8690d78b57e47077e61e4c3d7e1fa5613f1793
Robust_buffer_access_behavior.texel_fetch relies on undefined behavior

The failed test behavior is :
Create a mipmap texture as a dst texture and attach its level 1 texture
to the framebuffer colorattachment0 as render target. Create a mipmap
texture as a src texture and fill some data to its level 1 texture.
Use "texelFetch" in the fragment shader to sample level 1 source
texture(mipmap) and draw it to the dst texture.

According to the GLES3.2 spec:
The results of texelFetch builtins are undefined if the computed level
of detail is not the texture's base level and the texture's minification
filter is NEAREST or LINEAR.

Modify the test for the mipmap case.

Components: OpenGL

Affects:
KHR-NoContext.es32.robust_buffer_access_behavior.texel_fetch

VK-GL-CTS issue: 1236

Change-Id: Id67ea894a3dd423bba611ccc11a131b80d38fc64
external/openglcts/modules/common/glcRobustBufferAccessBehaviorTests.cpp