[Piglit] [PATCH 3/8] arb_tessellation_shader/execution/sanity2: new variant of the test

Marek Olšák maraeo at gmail.com
Tue Apr 11 16:17:24 UTC 2017


On Mon, Apr 10, 2017 at 11:12 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> This appears to be nop.shader_test almost verbatim...

But the difference is clear: nop.shader_test ends up using a constant
buffer for vertex data, while this tests uses a vertex buffer.

Marek

>
> On Mon, Apr 10, 2017 at 5:01 PM, Marek Olšák <maraeo at gmail.com> wrote:
>> From: Marek Olšák <marek.olsak at amd.com>
>>
>> ---
>>  .../execution/sanity2.shader_test                  | 65 ++++++++++++++++++++++
>>  1 file changed, 65 insertions(+)
>>  create mode 100644 tests/spec/arb_tessellation_shader/execution/sanity2.shader_test
>>
>> diff --git a/tests/spec/arb_tessellation_shader/execution/sanity2.shader_test b/tests/spec/arb_tessellation_shader/execution/sanity2.shader_test
>> new file mode 100644
>> index 0000000..83f9d7c
>> --- /dev/null
>> +++ b/tests/spec/arb_tessellation_shader/execution/sanity2.shader_test
>> @@ -0,0 +1,65 @@
>> +[require]
>> +GLSL >= 1.50
>> +GL_ARB_tessellation_shader
>> +
>> +
>> +[vertex shader]
>> +#version 150
>> +in vec4 vertex;
>> +
>> +void main()
>> +{
>> +       gl_Position = vertex;
>> +}
>> +
>> +[tessellation control shader]
>> +#version 150
>> +#extension GL_ARB_tessellation_shader: require
>> +
>> +layout(vertices = 3) out;
>> +
>> +void main()
>> +{
>> +        gl_TessLevelInner[0] = 1.0;
>> +        gl_TessLevelInner[1] = 1.0;
>> +        gl_TessLevelOuter[0] = 1.0;
>> +        gl_TessLevelOuter[1] = 1.0;
>> +        gl_TessLevelOuter[2] = 1.0;
>> +        gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
>> +}
>> +
>> +[tessellation evaluation shader]
>> +#version 150
>> +#extension GL_ARB_tessellation_shader: require
>> +
>> +layout(triangles) in;
>> +
>> +void main()
>> +{
>> +        int index = int(gl_TessCoord.y + (2 * gl_TessCoord.z));
>> +        gl_Position = gl_in[index].gl_Position;
>> +}
>> +
>> +[fragment shader]
>> +#version 150
>> +
>> +void main()
>> +{
>> +       gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
>> +}
>> +
>> +[vertex data]
>> +vertex/float/2
>> +-1.0 -1.0
>> + 1.0 -1.0
>> +-1.0  1.0
>> +-1.0  1.0
>> + 1.0 -1.0
>> + 1.0  1.0
>> +
>> +[test]
>> +clear color 0.1 0.1 0.1 0.1
>> +clear
>> +patch parameter vertices 3
>> +draw arrays GL_PATCHES 0 6
>> +probe all rgba 0.0 1.0 0.0 1.0
>> --
>> 2.7.4
>>
>> _______________________________________________
>> Piglit mailing list
>> Piglit at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list