[Piglit] [PATCH] glsl-1.10: add a 'invalid-array-as-function-param' glslparsertest

Tapani Pälli tapani.palli at intel.com
Wed Aug 15 05:23:55 UTC 2018


On 14.08.2018 23:07, Ian Romanick wrote:
> On 08/14/2018 12:41 AM, Tapani Pälli wrote:
>> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107550
>> ---
>>   .../spec/glsl-1.10/compiler/invalid-array-as-function-param.vert | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>   create mode 100644 tests/spec/glsl-1.10/compiler/invalid-array-as-function-param.vert
>>
>> diff --git a/tests/spec/glsl-1.10/compiler/invalid-array-as-function-param.vert b/tests/spec/glsl-1.10/compiler/invalid-array-as-function-param.vert
>> new file mode 100644
>> index 000000000..d285680de
>> --- /dev/null
>> +++ b/tests/spec/glsl-1.10/compiler/invalid-array-as-function-param.vert
> 
> I was thinking maybe dereference-scalar-as-array-for-...  The we can
> also have dereference-scalar-as-array-for-assignment,
> dereference-scalar-as-array-for-operation, etc.  I can write those
> later, if you like.

Sure, I'll rename it.

>> @@ -0,0 +1,9 @@
>> +// [config]
>> +// expect_result: fail
>> +// glsl_version: 1.10
>> +// [end config]
>> +
> 
> If you add
> 
> void func(int x)
> {
>      return;
> }
> 
> so that there's only one compilation error,

Will do!

> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
> 
>> +void main()
>> +{
>> +	func(0[2]);
>> +}
>>
> 


More information about the Piglit mailing list