From patchwork Mon Dec 22 10:36:29 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: 42510 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 620A925BA1 for ; Mon, 22 Dec 2014 10:36:57 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id l18sf2704944wgh.10 for ; Mon, 22 Dec 2014 02:36:56 -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=4gwsj1XW4JQMGkqoiKoNyLC/luzsqC7GOo2gANtwoMM=; b=Uz07n9c2cvEhc1hJVha4HuyzT6HvxogfoFSRcohrutUmqCx+CmKOCJ8/AUkwKkE5li 8paCkQWDdSRnV6RQxvZ3steCjRnqHfD5a1KoKBGIOVQzyCjwftX0r2xJnRdnzE1WyxXN 55x3hA5OU88+DhSkP8ekJSJPoO5q8vKMJ1GTXKsQqJ0m+HAuL+ENLWTdRSJJIK3XcgTQ u2BXLHbaqivVPAJjJvxMXh3b8+F9h9EGl0qiCeqY01chpTvkF7BgfDXe5hUGEfTOksVH eIr8hTMNu1mfRfb17qw5BTE9+lxiQuB+0ecw28oNE0UH6h0cicJYRP0xYfC+HV3nwu4p EWJA== X-Gm-Message-State: ALoCoQlCS78a5Dcs86kPey3Z17tiRXWJmIQEDFpAnOLtUTcpBMuA+vB1Rcf4UyNTa+tfkmevdH/w X-Received: by 10.180.89.140 with SMTP id bo12mr2021072wib.6.1419244616687; Mon, 22 Dec 2014 02:36:56 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.136 with SMTP id kq8ls1493276lac.84.gmail; Mon, 22 Dec 2014 02:36:56 -0800 (PST) X-Received: by 10.112.222.135 with SMTP id qm7mr21037201lbc.19.1419244616492; Mon, 22 Dec 2014 02:36:56 -0800 (PST) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com. [2a00:1450:4010:c03::22b]) by mx.google.com with ESMTPS id zm10si9179851lbb.137.2014.12.22.02.36.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 22 Dec 2014 02:36:56 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::22b as permitted sender) client-ip=2a00:1450:4010:c03::22b; Received: by mail-la0-f43.google.com with SMTP id s18so3740016lam.2 for ; Mon, 22 Dec 2014 02:36:56 -0800 (PST) X-Received: by 10.152.27.8 with SMTP id p8mr21453674lag.69.1419244616341; Mon, 22 Dec 2014 02:36:56 -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.142.69 with SMTP id ru5csp983776lbb; Mon, 22 Dec 2014 02:36:55 -0800 (PST) X-Received: by 10.68.116.5 with SMTP id js5mr11174996pbb.39.1419244614430; Mon, 22 Dec 2014 02:36:54 -0800 (PST) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id xy2si24382614pbb.222.2014.12.22.02.36.53; Mon, 22 Dec 2014 02:36:54 -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 ECD3E6E247; Mon, 22 Dec 2014 02:36:52 -0800 (PST) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from nm27-vm4.bullet.mail.gq1.yahoo.com (nm27-vm4.bullet.mail.gq1.yahoo.com [98.136.216.147]) by gabe.freedesktop.org (Postfix) with ESMTP id 190956E247 for ; Mon, 22 Dec 2014 02:36:51 -0800 (PST) Received: from [98.137.12.60] by nm27.bullet.mail.gq1.yahoo.com with NNFMP; 22 Dec 2014 10:36:50 -0000 Received: from [208.71.42.209] by tm5.bullet.mail.gq1.yahoo.com with NNFMP; 22 Dec 2014 10:36:50 -0000 Received: from [127.0.0.1] by smtp220.mail.gq1.yahoo.com with NNFMP; 22 Dec 2014 10:36:50 -0000 X-Yahoo-Newman-Id: 14957.83649.bm@smtp220.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: JMxU4U0VM1n9ztWKdq2QX3UIgRhFt4OCxAhyLk5LN1NC.Sm BojKon.ShL.46jm_lI55alP9Zbxqji3.BeloO1Rv_Bzc0Wgw.kyBtUSdB.f4 IeUDxVqB1QWRSikwEzFgN3CSwr5SJnkWv7YQMf05C6Qk.aD2lSOF6i9cnFuB 3t1zISjcaCaUG8Z.6X.ivLqPrP0oObmQYXx1tirUQqeNoQ9a_PWBux9.xK2k Nh_l8FbD.15f_GF5z.S2Mh4YZnR4UfQqEyuJ2Hxoqm54oCw6Bpd2AxKMnCOE MjTL_QadZyJP6GNh.oOF3zM.bBLOkg1SU78gAnSTd.nsrei7PyePfu4EPbrK kj1fKhITENm.OweLx8CC.SjT90GKGAxC1IXw7IQSDasDVzPR.kp9xSXzTKb3 _TLJw3q2PpSu8KUWRaGyVp76M1HOT1fseD6HrfDdnabmw_7JpCOb7bs4cA7j CoexHAtgBuhzFqRQL8wUurvtkO9_j90JzNv98xdo1FDAt7vbk9WcTGnMvOYe 6TsrphDmc231lzcEAHo68LCQ4k9CFShuNJw-- X-Yahoo-SMTP: 9BNlx.aswBAkr0D8mG_whiOP1dyU From: "'Timothy Arceri' via Patchwork Forward" To: piglit@lists.freedesktop.org Date: Mon, 22 Dec 2014 21:36:29 +1100 Message-Id: <1419244589-4897-1-git-send-email-t_arceri@yahoo.com.au> X-Mailer: git-send-email 2.1.0 Subject: [Piglit] [PATCH] glsl-1.50: test implicitly sized arrays match explicitly sized arrays across the same stage 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:c03::22b 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 --- ...ge-unsized-interface-array-mismatch.shader_test | 55 +++++++++++++++++++++ ...e-unsized-interface-array-mismatch2.shader_test | 56 ++++++++++++++++++++++ .../intrastage-unsized-interface-array.shader_test | 55 +++++++++++++++++++++ ...intrastage-unsized-interface-array2.shader_test | 56 ++++++++++++++++++++++ 4 files changed, 222 insertions(+) create mode 100644 tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch.shader_test create mode 100644 tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch2.shader_test create mode 100644 tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array.shader_test create mode 100644 tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array2.shader_test diff --git a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch.shader_test b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch.shader_test new file mode 100644 index 0000000..9e373a2 --- /dev/null +++ b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch.shader_test @@ -0,0 +1,55 @@ +# This test verifies that a link error is generated if implicitly sized +# arrays dont match explicitly sized arrays across the same stage. + +[require] +GLSL >= 1.50 + +[vertex shader] +#version 150 + +out ArrayInterfaceBlock +{ + vec4 a; +} i; + +void main() +{ + gl_Position = vec4(1.0); +} + +[geometry shader] +#version 150 + +layout(lines_adjacency) in; +layout(triangle_strip, max_vertices = 3) out; + +in ArrayInterfaceBlock +{ + vec4 a; +} i[4]; + +void f() +{ + i[1].a = vec4(1, 0, 0, 1); +} + +[geometry shader] +#version 150 + +in ArrayInterfaceBlock +{ + vec4 a; +} i[]; + +void f(); + +void main() +{ + f(); + i[4].a = vec4(1, 0, 0, 1); + + gl_Position = i[3].a; +} + +[test] +link error diff --git a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch2.shader_test b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch2.shader_test new file mode 100644 index 0000000..d661795 --- /dev/null +++ b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch2.shader_test @@ -0,0 +1,56 @@ +# This test verifies that a link error is generated if implicitly sized +# arrays dont match explicitly sized arrays across the same stage. + +[require] +GLSL >= 1.50 + +[vertex shader] +#version 150 + +out ArrayInterfaceBlock +{ + vec4 a; +} i; + +void main() +{ + gl_Position = vec4(1.0); +} + +[geometry shader] +#version 150 + +in ArrayInterfaceBlock +{ + vec4 a; +} i[]; + +void f() +{ + i[4].a = vec4(1, 0, 0, 1); +} + +[geometry shader] +#version 150 + + +layout(lines_adjacency) in; +layout(triangle_strip, max_vertices = 3) out; + +in ArrayInterfaceBlock +{ + vec4 a; +} i[4]; + +void f(); + +void main() +{ + f(); + i[3].a = vec4(1, 0, 0, 1); + + gl_Position = i[3].a; +} + +[test] +link error diff --git a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array.shader_test b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array.shader_test new file mode 100644 index 0000000..1dfae4f --- /dev/null +++ b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array.shader_test @@ -0,0 +1,55 @@ +# Test implicitly sized arrays match explicitly sized arrays +# across the same stage. + +[require] +GLSL >= 1.50 + +[vertex shader] +#version 150 + +out ArrayInterfaceBlock +{ + vec4 a; +} i; + +void main() +{ + gl_Position = vec4(1.0); +} + +[geometry shader] +#version 150 + +layout(lines_adjacency) in; +layout(triangle_strip, max_vertices = 3) out; + +in ArrayInterfaceBlock +{ + vec4 a; +} i[4]; + +void f() +{ + i[1].a = vec4(1, 0, 0, 1); +} + +[geometry shader] +#version 150 + +in ArrayInterfaceBlock +{ + vec4 a; +} i[]; + +void f(); + +void main() +{ + f(); + i[3].a = vec4(1, 0, 0, 1); + + gl_Position = i[3].a; +} + +[test] +link success diff --git a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array2.shader_test b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array2.shader_test new file mode 100644 index 0000000..1ad5b08 --- /dev/null +++ b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array2.shader_test @@ -0,0 +1,56 @@ +# Test implicitly sized arrays match explicitly sized arrays +# across the same stage. + +[require] +GLSL >= 1.50 + +[vertex shader] +#version 150 + +out ArrayInterfaceBlock +{ + vec4 a; +} i; + +void main() +{ + gl_Position = vec4(1.0); +} + +[geometry shader] +#version 150 + +in ArrayInterfaceBlock +{ + vec4 a; +} i[]; + +void f() +{ + i[3].a = vec4(1, 0, 0, 1); +} + +[geometry shader] +#version 150 + + +layout(lines_adjacency) in; +layout(triangle_strip, max_vertices = 3) out; + +in ArrayInterfaceBlock +{ + vec4 a; +} i[4]; + +void f(); + +void main() +{ + f(); + i[3].a = vec4(1, 0, 0, 1); + + gl_Position = i[3].a; +} + +[test] +link success