According to the ARB_tbr and GL 4.5 specs, texelFetch out of bounds is undefined. With robust access contexts, it's defined as 0, but such a context is not created here (nor is it supported by mesa). So don't test that out-of-bounds fetches return 0.
Signed-off-by: Ilia Mirkin <[email protected]> --- tests/spec/arb_texture_buffer_range/ranges.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/spec/arb_texture_buffer_range/ranges.c b/tests/spec/arb_texture_buffer_range/ranges.c index c37c97a..3081fc2 100644 --- a/tests/spec/arb_texture_buffer_range/ranges.c +++ b/tests/spec/arb_texture_buffer_range/ranges.c @@ -144,9 +144,9 @@ static char *fs_source = "{\n" " uint pos = uint(gl_FragCoord.x) + uint(gl_FragCoord.y) * WIN_WIDTH;\n" " uint expected = ((pos + offset) | 1u) & 0xffu;\n" - " if (pos >= size)\n" - " expected = 0u;\n" - " float ok = float(texelFetch(buf, int(pos)).r == expected);\n" + " float ok = 1.0;\n" + " if (pos < size)\n" + " ok = float(texelFetch(buf, int(pos)).r == expected);\n" " gl_FragColor = vec4(1.0 - ok, ok, 0.0, 0.0);\n" "}\n"; -- 2.4.10 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
