[Piglit] [PATCH] Add shader tests for out of bounds array index

Anuj Phogat anuj.phogat at gmail.com
Wed Oct 22 16:11:33 PDT 2014


Haven't yet pushed this upstream.
I will modify glsl-array-bounds-{13, 14, 15, 16}.shader_test to expect a
compilation error.

>From the GLSL 4.50 spec, section 4.1.9 Arrays p31 (p37 of the PDF):

"It is a compile-time error to declare an array with a size, and then
later (in the same shader) index the same array with an integral
constant expression greater than or equal to the declared size."

Thanks Chris.

On Mon, Sep 22, 2014 at 4:53 PM, Anuj Phogat <anuj.phogat at gmail.com> wrote:
> On Mon, Sep 22, 2014 at 4:48 PM, Chris Forbes <chrisf at ijw.co.nz> wrote:
>> On Tue, Sep 23, 2014 at 11:36 AM, Anuj Phogat <anuj.phogat at gmail.com> wrote:
>>> +[test]
>>> +clear color 0.0 0.0 0.0 0.0
>>> +clear
>>> +draw rect -1 -1 2 3
>>
>> There's a bunch of this rect outside the clip volume. I think you
>> meant -1 -1 2 2. (in all the tests)
> Yes. I'll fix that.
>>
>> Other than that,
>>
>> Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>


More information about the Piglit mailing list