[Piglit] [RFC PATCH 3/5] arb_bindless_texture: add compiler-related tests

Samuel Pitoiset samuel.pitoiset at gmail.com
Wed Mar 29 15:50:11 UTC 2017



On 03/29/2017 05:45 PM, Nicolai Hähnle wrote:
> On 29.03.2017 01:09, Samuel Pitoiset wrote:
>>>> diff --git
>>>> a/tests/spec/arb_bindless_texture/compiler/images/indexing.vert
>>>> b/tests/spec/arb_bindless_texture/compiler/images/indexing.vert
>>>> new file mode 100644
>>>> index 000000000..dd865b22f
>>>> --- /dev/null
>>>> +++ b/tests/spec/arb_bindless_texture/compiler/images/indexing.vert
>>>> @@ -0,0 +1,30 @@
>>>> +// [config]
>>>> +// expect_result: pass
>>>> +// glsl_version: 3.30
>>>> +// require_extensions: GL_ARB_bindless_texture
>>>> GL_ARB_shader_image_load_store
>>>> +// [end config]
>>>> +
>>>> +#version 330
>>>> +#extension GL_ARB_bindless_texture: require
>>>> +#extension GL_ARB_shader_image_load_store: enable
>>>> +
>>>> +// The ARB_bindless_texture spec says:
>>>> +//
>>>> +//  "Replace Section 4.1.X, (Images)"
>>>> +//
>>>> +//  "Images may be aggregated into arrays within a shader (using
>>>> square
>>>> +//   brackets []) and can be indexed with general integer
>>>> expressions."
>>>> +
>>>> +uniform writeonly image2D imgs[64];
>>>> +uniform uint a, b;
>>>> +
>>>> +void main()
>>>> +{
>>>> +    writeonly image2D img;
>>>> +    uint idx = 42u;
>>>> +
>>>> +    img = imgs[42];
>>>> +    img = imgs[idx];
>>>> +    img = imgs[idx + idx];
>>>
>>>
>>> This is an out of bounds access. Should this fail compilation?
>>
>> Mmmh, good question. I would say yes. The test works with the NVIDIA
>> blob, but I will update.
>
> This kind of thing shouldn't generate an error -- maybe a warning. Makes
> sense to update it anyway.

Yes. It has been updated locally. No errors were reported though.

>
> Cheers,
> Nicolai


More information about the Piglit mailing list