From patchwork Sun Nov 23 01:57:21 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: 41375 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EE34D25AEA for ; Sun, 23 Nov 2014 01:57:47 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id bs8sf877032wib.2 for ; Sat, 22 Nov 2014 17:57:47 -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=sJaJwILFT9KcYroGdBfHqSD/JxDrqwKV3tBtnUiLQ6U=; b=ClNL+Myx1PIA78kYXjFNOxo//pJQ38EmOEtUy617OH57tKFMaNalfHKRQv5sakiHVm 9bpi19KzOUkLrzzOSOtt+Cnu+QNSqeJZaoYPlyVVdrrKcefnF2YgTgd6Aor9AjEtx52G iwIcqBI5WGpXTk8AsYlciVfdy0o3TQ5PfNUufd9aOo/LtyDPJHzBbnp7huD7ke9Gapk5 UbphakhMyGU8yZzSCqGsZCFniPo9vYt5HLU2gPcTqE9gK0coYpWQc3BajaPZT3aEFdeq iv0szU2oGTqXncr5UeYvVD9Pw4MZHqBPCQUYvBWblBILE0s1dILXu0c68hwU4nOKiShb IYMg== X-Gm-Message-State: ALoCoQm761espCW+6SSLmNe04pC1xx8NJmcJfee3+V8XvDx+vLQdeVYb6xXWiWSltWbqVw2E6rvf X-Received: by 10.152.10.233 with SMTP id l9mr4155345lab.0.1416707867144; Sat, 22 Nov 2014 17:57:47 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.232 with SMTP id m8ls303066laa.45.gmail; Sat, 22 Nov 2014 17:57:46 -0800 (PST) X-Received: by 10.152.207.71 with SMTP id lu7mr13140797lac.81.1416707866626; Sat, 22 Nov 2014 17:57:46 -0800 (PST) Received: from mail-lb0-x22f.google.com (mail-lb0-x22f.google.com. [2a00:1450:4010:c04::22f]) by mx.google.com with ESMTPS id nz8si10737430lbb.12.2014.11.22.17.57.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 22 Nov 2014 17:57:46 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22f as permitted sender) client-ip=2a00:1450:4010:c04::22f; Received: by mail-lb0-f175.google.com with SMTP id u10so2998473lbd.34 for ; Sat, 22 Nov 2014 17:57:46 -0800 (PST) X-Received: by 10.152.87.100 with SMTP id w4mr12888746laz.27.1416707866480; Sat, 22 Nov 2014 17:57:46 -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 ew9csp78023lbc; Sat, 22 Nov 2014 17:57:44 -0800 (PST) X-Received: by 10.70.46.102 with SMTP id u6mr20277261pdm.27.1416707863985; Sat, 22 Nov 2014 17:57:43 -0800 (PST) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id bn4si15477743pbd.38.2014.11.22.17.57.43 for ; Sat, 22 Nov 2014 17:57:43 -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 EFB996FF4E; Sat, 22 Nov 2014 17:57:42 -0800 (PST) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from nm14-vm2.bullet.mail.gq1.yahoo.com (nm14-vm2.bullet.mail.gq1.yahoo.com [98.136.218.253]) by gabe.freedesktop.org (Postfix) with ESMTP id E62CB6FF4E for ; Sat, 22 Nov 2014 17:57:41 -0800 (PST) Received: from [98.137.12.191] by nm14.bullet.mail.gq1.yahoo.com with NNFMP; 23 Nov 2014 01:57:41 -0000 Received: from [208.71.42.196] by tm12.bullet.mail.gq1.yahoo.com with NNFMP; 23 Nov 2014 01:57:41 -0000 Received: from [127.0.0.1] by smtp207.mail.gq1.yahoo.com with NNFMP; 23 Nov 2014 01:57:41 -0000 X-Yahoo-Newman-Id: 611323.4642.bm@smtp207.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: WDu5SUEVM1me.iiFHT6E1_5XfAR.EBJOwTDi2.fMYud63yv tiewvOMHoSALNqW_.P.eJ3GYVKw_mWfAH0dSztEUjxPh5c7gljf_0ceqPd10 hIvylaMXYSMj_P07DO5ycUK45fN5pYoH2Z5vJLRKlttiX2D3GQi7jS9AJ5Ps 1XyTto9riISb3_EK4Odlyq4F84OMbToKE9Xn7agNuVM8oERa9jaoH_qpmjsS 4bSDCdAGqsdMS3v4rByp5PcRYIVv9del.exlwzq1_sDkpkUMfmwikcH_U2wu yVqz0747b6DekFmC8cra5g2CXlyrEgvhstuIBHAb0vEvtpAF0nnk2K_n5DBm 5JH4donBbMLquOSDgyBJEK71oD4u3mlsJkhZ9fQHwVKTgc8hKetDDGs5Fv4k JvHGdNOHUNusqlGKn2JmT2.Url0u9V4uTkTffsTWtIEubNgMkcGWhoT940rU IrO6EQ_uBJnb8dqBIGYbw6gMKifnrknBllZjHEcCo1bL35iebrCVGR3hsoW5 rxImZquQ_JqwYMrHV.LWFp9WZMNcx6wBULgZCq6q5lLJp5U8T3WLx3lmRqww Y4FNtTw-- X-Yahoo-SMTP: 9BNlx.aswBAkr0D8mG_whiOP1dyU From: "'Timothy Arceri' via Patchwork Forward" To: piglit@lists.freedesktop.org Date: Sun, 23 Nov 2014 12:57:21 +1100 Message-Id: <1416707841-10339-1-git-send-email-t_arceri@yahoo.com.au> X-Mailer: git-send-email 1.9.3 Subject: [Piglit] [PATCH] 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::22f 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 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.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 | 30 ++++++++++++++++++ .../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 ++++++++++++++++++++++ 13 files changed, 404 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.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 of 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 of 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 of 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 of 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..c2dfc83 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-unsized-mismatch.shader_test @@ -0,0 +1,30 @@ +# Test for error when linking 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.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 of 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 of 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 error when linking 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 of 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