With a note on the controversial test that it matches other existing implementations and Khronos' interpretation of the spec, this is:
Reviewed-by: Chris Forbes <[email protected]> On Sat, May 17, 2014 at 12:21 PM, Anuj Phogat <[email protected]> wrote: > On Fri, May 16, 2014 at 4:59 PM, Jordan Justen <[email protected]> wrote: >> On Thu, Mar 6, 2014 at 4:11 PM, Anuj Phogat <[email protected]> wrote: >>> V2: Add few more shader tests and do minor changes in tests added in V1. >>> >>> Signed-off-by: Anuj Phogat <[email protected]> >>> --- >>> ...ayout-qualifiers-conflicting-case-5.shader_test | 62 >>> ++++++++++++++++++++++ >>> ...ayout-qualifiers-conflicting-case-6.shader_test | 61 >>> +++++++++++++++++++++ >>> ...ayout-qualifiers-conflicting-case-7.shader_test | 50 +++++++++++++++++ >>> ...ayout-qualifiers-conflicting-case-8.shader_test | 61 >>> +++++++++++++++++++++ >>> ...ayout-qualifiers-conflicting-case-9.shader_test | 49 +++++++++++++++++ >>> 5 files changed, 283 insertions(+) >>> create mode 100644 >>> tests/spec/glsl-1.50/execution/fragcoord-layout-qualifiers-conflicting-case-5.shader_test >>> create mode 100644 >>> tests/spec/glsl-1.50/execution/fragcoord-layout-qualifiers-conflicting-case-6.shader_test >>> create mode 100644 >>> tests/spec/glsl-1.50/execution/fragcoord-layout-qualifiers-conflicting-case-7.shader_test >>> create mode 100644 >>> tests/spec/glsl-1.50/execution/fragcoord-layout-qualifiers-conflicting-case-8.shader_test >>> create mode 100644 >>> tests/spec/glsl-1.50/execution/fragcoord-layout-qualifiers-conflicting-case-9.shader_test >> <snip> >>> diff --git >>> a/tests/spec/glsl-1.50/execution/fragcoord-layout-qualifiers-conflicting-case-7.shader_test >>> >>> b/tests/spec/glsl-1.50/execution/fragcoord-layout-qualifiers-conflicting-case-7.shader_test >>> new file mode 100644 >>> index 0000000..259e095 >>> --- /dev/null >>> +++ >>> b/tests/spec/glsl-1.50/execution/fragcoord-layout-qualifiers-conflicting-case-7.shader_test >>> @@ -0,0 +1,50 @@ >>> +/* Section 4.3.8.1 (Input Layout Qualifiers) of the GLSL 1.50 spec says: >>> + * >>> + * "Fragment shaders can have an input layout only for redeclaring the >>> + * built-in variable gl_FragCoord (see section 7.2 Fragment Shader >>> + * Special Variables). The layout qualifier identifiers for >>> + * gl_FragCoord are >>> + * >>> + * layout-qualifier-id: >>> + * origin_upper_left >>> + * pixel_center_integer" >>> + * >>> + * >>> + * "If gl_FragCoord is redeclared in any fragment shader in a program, >>> + * it must be redeclared in all the fragment shaders in that program >>> + * that have a static use gl_FragCoord. All redeclarations of >>> + * gl_FragCoord in all fragment shaders in a single program must have >>> + * the same set of qualifiers." >>> + * >>> + * Tests the case when one fragment shader redeclares gl_FragCoord without >>> + * any qualifiers and other one has missing redeclaration. Spec is not very >>> + * clear about this case but making this case fail to link would be wrong. >> >> If the spec is not clear, then does this pass with most drivers then? >> > Yes. These tests are also accepted by Khronos to be part of CTS. >> Series Reviewed-by: Jordan Justen <[email protected]> >> >>> + */ >>> +[require] >>> +GLSL >= 1.50 >>> + >>> + >>> +[vertex shader passthrough] >>> + >>> +[fragment shader] >>> + >>> +in vec4 gl_FragCoord; >>> +out vec4 fragcolor; >>> +void alpha(); >>> +void main() >>> +{ >>> + fragcolor = vec4(gl_FragCoord.xyz, 1.0); >>> + alpha(); >>> +} >>> + >>> +[fragment shader] >>> + >>> +out vec4 fragcolor; >>> +void alpha() >>> +{ >>> + fragcolor.a = gl_FragCoord.z; >>> +} >>> + >>> + >>> +[test] >>> +link success > _______________________________________________ > Piglit mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/piglit _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
