[Piglit] Testing against undefined behaviour in asmparsertest/shaders/ARBvp1.0/address-06
Marek Olšák
maraeo at gmail.com
Mon Jun 10 04:49:35 PDT 2013
If I'm reading the grammar correctly, the constant offset must be in
the range [-64, 63]:
<addrRegRelOffset> ::= ""
| "+" <addrRegPosOffset>
| "-" <addrRegNegOffset>
<addrRegPosOffset> ::= <integer> from 0 to 63
<addrRegNegOffset> ::= <integer> from 0 to 64
However, proprietary drivers allow a greater range than that and there
is at least one app which doesn't work if we obey the spec, so I
decided to bump the relative address offset limits long time ago and
the test has been failing ever since. The way I see it, the piglit
test should be removed, because it's not useful anymore.
Marek
On Sat, Jun 8, 2013 at 1:44 PM, Martin Andersson <g02maran at gmail.com> wrote:
> The asmparsertest/shaders/ARBvp1.0/address-06.txt tests against
> "constant array index offset too large" and expects it to fail.
> Currently in mesa this does not cause the program to fail and based on
> my reading of [1] this is the correct behaviour. The test uses
> relative addressing for which out-of-bounds access is undefined, but
> it does not say that the program should fail to load as it says about
> out-of-bounds access with absolute addressing [1].
>
> Section 2.14.4.2
> <snip>
> "If the computed offset is negative or exceeds the size of the array,
> the results of the access are undefined, but may not lead to program
> or GL termination."
>
> I think the test should be expected to pass, or am I missing something?
>
> //Martin
>
> [1] http://www.opengl.org/registry/specs/ARB/vertex_program.txt
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
More information about the Piglit
mailing list