[Piglit] [PATCH 04/11] arb_shader_subroutine: Add simple compiler tests for subroutines

Chris Forbes chrisf at ijw.co.nz
Wed Aug 27 16:41:57 PDT 2014


nVIDIA's 340.32 driver on GK107 passes all the tests from this series
but these three:

- spec/ARB_shader_subroutine/linker/no-mutual-recursion.vert
- spec/ARB_shader_subroutine/linker/no-simple-recursion.vert
- spec/ARB_shader_subroutine/linker/no-overloads.vert

which compile & link successfully, when they should not.



On Thu, Aug 28, 2014 at 11:23 AM, Ian Romanick <idr at freedesktop.org> wrote:
> Have you tried these on any driver that supports the extension?
>
> On 08/10/2014 04:06 AM, Chris Forbes wrote:
>> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
>> ---
>>  .../arb_shader_subroutine/compiler/no-subroutine-var.vert  | 14 ++++++++++++++
>>  .../compiler/simple-subroutine-def.vert                    | 13 +++++++++++++
>>  .../compiler/simple-subroutine-type-def.vert               | 10 ++++++++++
>>  .../compiler/simple-subroutine-uniform.vert                | 13 +++++++++++++
>>  4 files changed, 50 insertions(+)
>>  create mode 100644 tests/spec/arb_shader_subroutine/compiler/no-subroutine-var.vert
>>  create mode 100644 tests/spec/arb_shader_subroutine/compiler/simple-subroutine-def.vert
>>  create mode 100644 tests/spec/arb_shader_subroutine/compiler/simple-subroutine-type-def.vert
>>  create mode 100644 tests/spec/arb_shader_subroutine/compiler/simple-subroutine-uniform.vert
>>
>> diff --git a/tests/spec/arb_shader_subroutine/compiler/no-subroutine-var.vert b/tests/spec/arb_shader_subroutine/compiler/no-subroutine-var.vert
>> new file mode 100644
>> index 0000000..f39d2b2
>> --- /dev/null
>> +++ b/tests/spec/arb_shader_subroutine/compiler/no-subroutine-var.vert
>> @@ -0,0 +1,14 @@
>> +// [config]
>> +// expect_result: fail
>> +// glsl_version: 1.50
>> +// require_extensions: GL_ARB_shader_subroutine
>> +// [end config]
>> +
>> +#version 150
>> +#extension GL_ARB_shader_subroutine: require
>> +
>> +/* This is not any of the three allowed uses of
>> + * `subroutine`:
>> + */
>> +
>> +subroutine int x;
>> diff --git a/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-def.vert b/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-def.vert
>> new file mode 100644
>> index 0000000..a7c169a
>> --- /dev/null
>> +++ b/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-def.vert
>> @@ -0,0 +1,13 @@
>> +// [config]
>> +// expect_result: pass
>> +// glsl_version: 1.50
>> +// require_extensions: GL_ARB_shader_subroutine
>> +// [end config]
>> +
>> +#version 150
>> +#extension GL_ARB_shader_subroutine: require
>> +
>> +subroutine void func_type();
>> +
>> +/* A subroutine matching the above type */
>> +subroutine (func_type) void f() {}
>> diff --git a/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-type-def.vert b/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-type-def.vert
>> new file mode 100644
>> index 0000000..1a36fac
>> --- /dev/null
>> +++ b/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-type-def.vert
>> @@ -0,0 +1,10 @@
>> +// [config]
>> +// expect_result: pass
>> +// glsl_version: 1.50
>> +// require_extensions: GL_ARB_shader_subroutine
>> +// [end config]
>> +
>> +#version 150
>> +#extension GL_ARB_shader_subroutine: require
>> +
>> +subroutine void func_type();
>> diff --git a/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-uniform.vert b/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-uniform.vert
>> new file mode 100644
>> index 0000000..1d01a68
>> --- /dev/null
>> +++ b/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-uniform.vert
>> @@ -0,0 +1,13 @@
>> +// [config]
>> +// expect_result: pass
>> +// glsl_version: 1.50
>> +// require_extensions: GL_ARB_shader_subroutine
>> +// [end config]
>> +
>> +#version 150
>> +#extension GL_ARB_shader_subroutine: require
>> +
>> +subroutine void func_type();
>> +
>> +/* A subroutine uniform for the above type */
>> +subroutine uniform func_type f;
>>
>


More information about the Piglit mailing list