From patchwork Thu Dec 4 21:35:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: 'Timothy Arceri' via Patchwork Forward X-Patchwork-Id: 41954 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5199825E8C for ; Thu, 4 Dec 2014 21:35:31 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id u10sf11504506lbd.10 for ; Thu, 04 Dec 2014 13:35:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:reply-to; bh=diEut+mcqDx/8LebUywfwedHjLWyrFePPhJh4S7okb8=; b=LGe43iVTPMK7OCD2k9QjK1cjyYMEpgIpDuHISq14QftlVfBByJf0nCj3/XEzpGwELn +RV0SrNW++2p/QSXT4++x8k4cWY48tNFfWdnk1m9Y2eaQtsGVzlirWRUcG5oxgeTkQK2 Z4PpBbk5PVkXqN2pen8Bl4LV39CjVNphC+QmZymcOWAaIwi9EJSUclO1ARalUSP7qsry ODJSoawoz+GYACrYHyXAiMyxqObaQcycujCzfa5qfm9m9GPDl5wWS03Ta6zhSCe1FaGI Ujy6I4soVX8oMgcOiZai93E4dARPuz53qlrC1EYZYKksrcEovlsoWFiKcBSdeGPv/NrM M2CA== X-Gm-Message-State: ALoCoQlb/mIlovv7WGfxHSHuYfUmBkTO1LJTZINKVKWExA1tjmjJDalm9Mwt5CcsrGTQGGJja5iw X-Received: by 10.152.29.226 with SMTP id n2mr5983lah.9.1417728929931; Thu, 04 Dec 2014 13:35:29 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.98 with SMTP id c2ls226919laf.77.gmail; Thu, 04 Dec 2014 13:35:29 -0800 (PST) X-Received: by 10.112.205.65 with SMTP id le1mr11631655lbc.54.1417728929630; Thu, 04 Dec 2014 13:35:29 -0800 (PST) Received: from mail-lb0-x231.google.com (mail-lb0-x231.google.com. [2a00:1450:4010:c04::231]) by mx.google.com with ESMTPS id kv10si27072523lac.131.2014.12.04.13.35.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Dec 2014 13:35:29 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::231 as permitted sender) client-ip=2a00:1450:4010:c04::231; Received: by mail-lb0-f177.google.com with SMTP id b6so5234233lbj.22 for ; Thu, 04 Dec 2014 13:35:29 -0800 (PST) X-Received: by 10.112.52.37 with SMTP id q5mr11424874lbo.32.1417728929381; Thu, 04 Dec 2014 13:35:29 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp115615lbc; Thu, 4 Dec 2014 13:35:27 -0800 (PST) X-Received: by 10.70.50.1 with SMTP id y1mr22902203pdn.12.1417728926985; Thu, 04 Dec 2014 13:35:26 -0800 (PST) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id rz5si44916784pab.118.2014.12.04.13.35.26 for ; Thu, 04 Dec 2014 13:35:26 -0800 (PST) Received-SPF: none (google.com: piglit-bounces@lists.freedesktop.org does not designate permitted sender hosts) client-ip=131.252.210.177; Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F270C6E16E; Thu, 4 Dec 2014 13:35:25 -0800 (PST) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from nm9-vm4.bullet.mail.gq1.yahoo.com (nm9-vm4.bullet.mail.gq1.yahoo.com [98.136.218.243]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F6516E985 for ; Thu, 4 Dec 2014 13:35:24 -0800 (PST) Received: from [98.137.12.188] by nm9.bullet.mail.gq1.yahoo.com with NNFMP; 04 Dec 2014 21:35:24 -0000 Received: from [98.136.164.65] by tm9.bullet.mail.gq1.yahoo.com with NNFMP; 04 Dec 2014 21:35:24 -0000 Received: from [127.0.0.1] by smtp227.mail.gq1.yahoo.com with NNFMP; 04 Dec 2014 21:35:24 -0000 X-Yahoo-Newman-Id: 151863.56272.bm@smtp227.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: CjptezQVM1kgM_ATUdtF8UyqSeYYWf05_03JQHFh5WlUGCx EW278896CkrWOkBc5v8Z7TTUMVJiW5E03nKVJcREm4EJQq3bnqmi.HtOuJ._ 9AV_1e6dyu4UZ_ofbzHYLt_wLcwuoL4I6iLPrkDzgCMTVDr.kKu9k6wWDvoQ 9ShQ7oaL.YbqLfEiC5lfHBdrO3BgdcywrD1bhXQlFE6WOy3rFG6NkkJIF91C SC5ipVA2vpeMn1n7AXAX4ZBVAjFBP1qnRJ6aFcdVlWF424Ko0c4PDRA.lvmh IZBncw0P41NBp4Ux578qHHb..1eUewcbHbXTwcvSkerHcJLpI0aRpwOX93r3 7YAYEk1w6F8wg0RWodMeGOBShLKYGhNK_JZwRrexd8jxG3hpRuvcdN_KI_Qh KEffTHPT72qMqOgmej_oXr6bZJShGs267K6M0lOg4OTJ2ZHKidGUiwKWHyNW q52BxihInUMXFVFgzxGflRkprnWsL6fh8rUlQQLH2efHGMowhdAKMWnWFnKD pyneVkOfknVK8_NJ_yvKWIzdGicrJF4D0E8Vdz.NzftnUsnllfyqoD2pfCi6 g7zo- X-Yahoo-SMTP: 9BNlx.aswBAkr0D8mG_whiOP1dyU From: "'Timothy Arceri' via Patchwork Forward" To: piglit@lists.freedesktop.org Date: Fri, 5 Dec 2014 08:35:08 +1100 Message-Id: <1417728909-22349-1-git-send-email-t_arceri@yahoo.com.au> X-Mailer: git-send-email 1.9.3 Subject: [Piglit] [PATCH 1/2 V2] arb_arrays_of_arrays: linker tests X-BeenThere: piglit@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: piglit-bounces@lists.freedesktop.org Sender: "Piglit" X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::231 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@; dmarc=fail (p=NONE dis=NONE) header.from=yahoo.com.au Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 X-Original-From: Timothy Arceri Reply-To: Timothy Arceri V2: add alternate version of unsized-mismatch test and fix comment describing negitive test as a positive test Test results: AMD Radeon HD 6670 - Catalyst 13.251 OpenGL 4.3 vs-to-fs-dimension-size-mismatch.shader_test AMD: crash vs-to-fs-dimensions-mismatch.shader_test AMD: crash vs-to-fs-interface-field.shader_test AMD: pass vs-to-fs-interface.shader_test AMD: pass vs-to-fs-struct-field.shader_test AMD: pass vs-to-fs-struct.shader_test AMD: pass vs-to-fs-type-mismatch.shader_test AMD: crash vs-to-fs-unsized-mismatch.shader_test AMD: fail vs-to-fs-unsized-mismatch2.shader_test AMD: crash vs-to-fs-unsized.shader_test AMD: pass vs-to-fs.shader_test AMD: pass vs-to-gs-invalid-dimensions.shader_test AMD: crash vs-to-gs.shader_test AMD: crash Signed-off-by: Timothy Arceri --- I could do more negitive tests but it feels like this is really just testing the compile stage rather than linking. tests/all.py | 3 ++ .../vs-to-fs-dimension-size-mismatch.shader_test | 31 +++++++++++++++++++ .../vs-to-fs-dimensions-mismatch.shader_test | 31 +++++++++++++++++++ .../linker/vs-to-fs-interface-field.shader_test | 34 ++++++++++++++++++++ .../linker/vs-to-fs-interface.shader_test | 34 ++++++++++++++++++++ .../linker/vs-to-fs-struct-field.shader_test | 36 ++++++++++++++++++++++ .../linker/vs-to-fs-struct.shader_test | 36 ++++++++++++++++++++++ .../linker/vs-to-fs-type-mismatch.shader_test | 31 +++++++++++++++++++ .../linker/vs-to-fs-unsized-mismatch.shader_test | 31 +++++++++++++++++++ .../linker/vs-to-fs-unsized-mismatch2.shader_test | 31 +++++++++++++++++++ .../linker/vs-to-fs-unsized.shader_test | 30 ++++++++++++++++++ .../linker/vs-to-fs.shader_test | 36 ++++++++++++++++++++++ .../linker/vs-to-gs-invalid-dimensions.shader_test | 36 ++++++++++++++++++++++ .../linker/vs-to-gs.shader_test | 36 ++++++++++++++++++++++ 14 files changed, 436 insertions(+) create mode 100644 tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-dimension-size-mismatch.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-dimensions-mismatch.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-interface-field.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-interface.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-struct-field.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-struct.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-type-mismatch.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-unsized-mismatch.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-unsized-mismatch2.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-unsized.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/vs-to-fs.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/vs-to-gs-invalid-dimensions.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/vs-to-gs.shader_test diff --git a/tests/all.py b/tests/all.py index ea652f4..ff3e0a4 100644 --- a/tests/all.py +++ b/tests/all.py @@ -1544,6 +1544,9 @@ spec['ARB_arrays_of_arrays'] = arb_arrays_of_arrays import_glsl_parser_tests(arb_arrays_of_arrays, os.path.join(testsDir, 'spec', 'arb_arrays_of_arrays'), ['compiler']) +add_shader_test_dir(arb_arrays_of_arrays, + os.path.join(testsDir, 'spec', 'arb_arrays_of_arrays'), + recursive=True) # Group AMD_shader_trinary_minmax spec['AMD_shader_trinary_minmax'] = {} diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-dimension-size-mismatch.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-dimension-size-mismatch.shader_test new file mode 100644 index 0000000..2d69464 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-dimension-size-mismatch.shader_test @@ -0,0 +1,31 @@ +# Test for linking error due to size mismatch between +# vertex and fragment shaders + +[require] +GLSL >= 1.20 +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +varying vec4 color[3][2]; + +void main() +{ + color[2][1] = vec4(1, 0, 0, 1); + + gl_Position = gl_Vertex; +} + +[fragment shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +varying vec4 color[4][2]; + +void main() +{ + gl_FragColor = color[2][1]; +} + +[test] +link error diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-dimensions-mismatch.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-dimensions-mismatch.shader_test new file mode 100644 index 0000000..4586fdb --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-dimensions-mismatch.shader_test @@ -0,0 +1,31 @@ +# Test for linking error due to number of dimensions mismatch between +# vertex and fragment shaders + +[require] +GLSL >= 1.20 +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +varying vec4 color[3][2]; + +void main() +{ + color[2][1] = vec4(1, 0, 0, 1); + + gl_Position = gl_Vertex; +} + +[fragment shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +varying vec4 color[2][3][2]; + +void main() +{ + gl_FragColor = color[1][2][1]; +} + +[test] +link error diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-interface-field.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-interface-field.shader_test new file mode 100644 index 0000000..f9fe786 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-interface-field.shader_test @@ -0,0 +1,34 @@ +# Test for successful linking between vertex and fragment shaders + +[require] +GLSL >= 1.50 +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 150 +#extension GL_ARB_arrays_of_arrays: enable +out ArraysOfArraysBlock +{ + vec4 a[3][2]; +} i; + +void main() +{ + gl_Position = vec4(1.0); +} + +[fragment shader] +#version 150 +#extension GL_ARB_arrays_of_arrays: enable +in ArraysOfArraysBlock +{ + vec4 a[3][2]; +} i; + +void main() +{ + gl_FragColor = i.a[1][1]; +} + +[test] +link success diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-interface.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-interface.shader_test new file mode 100644 index 0000000..5cd3be0 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-interface.shader_test @@ -0,0 +1,34 @@ +# Test for successful linking between vertex and fragment shaders + +[require] +GLSL >= 1.50 +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 150 +#extension GL_ARB_arrays_of_arrays: enable +out ArraysOfArraysBlock +{ + vec4 a; +} i[4][5]; + +void main() +{ + gl_Position = vec4(1.0); +} + +[fragment shader] +#version 150 +#extension GL_ARB_arrays_of_arrays: enable +in ArraysOfArraysBlock +{ + vec4 a; +} i[4][5]; + +void main() +{ + gl_FragColor = i[1][1].a; +} + +[test] +link success diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-struct-field.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-struct-field.shader_test new file mode 100644 index 0000000..15ead0f --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-struct-field.shader_test @@ -0,0 +1,36 @@ +# Test for successful linking between vertex and fragment shaders + +[require] +GLSL >= 1.20 +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +struct S { + vec4 [2] x[2]; +}; + +uniform S s; + +void main() +{ + gl_Position = vec4(1.0); +} + +[fragment shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +struct S { + vec4 [2] x[2]; +}; + +uniform S s; + +void main() +{ + gl_FragColor = s.x[1][1]; +} + +[test] +link success diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-struct.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-struct.shader_test new file mode 100644 index 0000000..b2dd5df --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-struct.shader_test @@ -0,0 +1,36 @@ +# Test for successful linking between vertex and fragment shaders + +[require] +GLSL >= 1.20 +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +struct S { + vec4 x[2]; +}; + +uniform S s[2][2]; + +void main() +{ + gl_Position = vec4(1.0); +} + +[fragment shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +struct S { + vec4 x[2]; +}; + +uniform S s[2][2]; + +void main() +{ + gl_FragColor = s[1][1].x[1]; +} + +[test] +link success diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-type-mismatch.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-type-mismatch.shader_test new file mode 100644 index 0000000..cf023ce --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-type-mismatch.shader_test @@ -0,0 +1,31 @@ +# Test for linking error due type mismatch between +# vertex and fragment shaders + +[require] +GLSL >= 1.20 +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +varying vec3 color[3][2]; + +void main() +{ + color[2][1] = vec3(1, 0, 0); + + gl_Position = gl_Vertex; +} + +[fragment shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +varying vec4 color[4][2]; + +void main() +{ + gl_FragColor = color[2][1]; +} + +[test] +link error diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-unsized-mismatch.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-unsized-mismatch.shader_test new file mode 100644 index 0000000..4a755a9 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-unsized-mismatch.shader_test @@ -0,0 +1,31 @@ +# Test for linking error due to arrays size mismatch between +# vertex and fragment shaders + +[require] +GLSL >= 1.20 +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +varying vec4 color[][2]; + +void main() +{ + color[2][1] = vec4(1, 0, 0, 1); + + gl_Position = gl_Vertex; +} + +[fragment shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +varying vec4 color[2][2]; + +void main() +{ + gl_FragColor = color[1][1]; +} + +[test] +link error diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-unsized-mismatch2.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-unsized-mismatch2.shader_test new file mode 100644 index 0000000..f6a2258 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-unsized-mismatch2.shader_test @@ -0,0 +1,31 @@ +# Test for linking error due to array size mismatch between +# vertex and fragment shaders + +[require] +GLSL >= 1.20 +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +varying vec4 color[3][2]; + +void main() +{ + color[1][1] = vec4(1, 0, 0, 1); + + gl_Position = gl_Vertex; +} + +[fragment shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +varying vec4 color[][2]; + +void main() +{ + gl_FragColor = color[3][1]; +} + +[test] +link error diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-unsized.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-unsized.shader_test new file mode 100644 index 0000000..c1c2508 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-unsized.shader_test @@ -0,0 +1,30 @@ +# Test for successful linking between vertex and fragment shaders + +[require] +GLSL >= 1.20 +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +varying vec4 color[][2]; + +void main() +{ + color[2][1] = vec4(1, 0, 0, 1); + + gl_Position = gl_Vertex; +} + +[fragment shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +varying vec4 color[3][2]; + +void main() +{ + gl_FragColor = color[2][1]; +} + +[test] +link success diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs.shader_test new file mode 100644 index 0000000..f336849 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs.shader_test @@ -0,0 +1,36 @@ +# Test for successful linking between vertex and fragment shaders + +[require] +GLSL >= 1.20 +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +varying vec4 color[3][2]; +varying vec3 colour[4][2]; +varying vec4[4] c[2]; + +void main() +{ + color[2][1] = vec4(1, 0, 0, 1); + colour[1][1] = vec3(2, 0, 0); + c[1][3] = vec4(4, 0, 0, 4); + + gl_Position = gl_Vertex; +} + +[fragment shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +varying vec4 color[3][2]; +varying vec3[2] colour[4]; +varying vec4 c[2][4]; + +void main() +{ + gl_FragColor = color[2][1]; +} + +[test] +link success diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-gs-invalid-dimensions.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-gs-invalid-dimensions.shader_test new file mode 100644 index 0000000..610677f --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-gs-invalid-dimensions.shader_test @@ -0,0 +1,36 @@ +# Test for successful linking between vertex and geometry shaders + +[require] +GLSL >= 1.50 +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +out vec4 vertex_to_gs[2][4]; + +void main() +{ + vertex_to_gs[1][3] = vec4(1.0, 0.0, 0.0, 1.0); +} + +[geometry shader] +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +layout(triangles) in; +layout(triangle_strip, max_vertices = 3) out; + +in vec4 vertex_to_gs[3][2]; + +void main() +{ + for (int i = 0; i < 3; i++) { + gl_Position = vertex_to_gs[i][0]; + EmitVertex(); + } +} + +[test] +link error diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-gs.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-gs.shader_test new file mode 100644 index 0000000..ee1dacc --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-gs.shader_test @@ -0,0 +1,36 @@ +# Test for successful linking between vertex and geometry shaders + +[require] +GLSL >= 1.50 +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +out vec4 vertex_to_gs[2][4]; + +void main() +{ + vertex_to_gs[1][3] = vec4(1.0, 0.0, 0.0, 1.0); +} + +[geometry shader] +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +layout(triangles) in; +layout(triangle_strip, max_vertices = 3) out; + +in vec4 vertex_to_gs[3][2][4]; + +void main() +{ + for (int i = 0; i < 3; i++) { + gl_Position = vertex_to_gs[i][0][0]; + EmitVertex(); + } +} + +[test] +link success