From patchwork Thu Dec 4 21:35:09 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: 41955 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 6294325E8C for ; Thu, 4 Dec 2014 21:35:47 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id u10sf11504768lbd.10 for ; Thu, 04 Dec 2014 13:35:45 -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:in-reply-to:references: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=YDi0G2ZZ91mCfR8tVKqHtsd2IcpeblbWG/t8dUR5EaI=; b=G9oHHZ/a4CLrfWQKvdy0AhgWjoNq0Y64SXylWk/BzrBKY7jz01leEPcSKIHnJa21yF iAsN+PNddU7tR9kOCbLBqfJOITrcTco8B6EFHz3wP76dDdKxbu7aHsH+6Juq/kr3eb7v /786VLfTpFtcY6LfQyGsqeJNWOSqKsPPZK2dSLb6meBD3YrEow+8YnTUuuirnx0QNQMK cI/RvHopt0PmBEE6+/IQB2SegH8wOLVuKbDKznGohfyFWwStaLRVWV2f+9FT60QON0Wk 1XdqjnJfyKOUkr+cfhrE95mvErTyAthrX68kzEMUZVELF2KoYvAAf3gG2pJVRaI774QV QvGg== X-Gm-Message-State: ALoCoQn78wfbfTu5ULmXubXebAflxvyNaKLeKDDq3GKyh9BJe+tyZn63PtQ/Tw1+UfamZnmrdipR X-Received: by 10.194.173.97 with SMTP id bj1mr1965648wjc.2.1417728945930; Thu, 04 Dec 2014 13:35:45 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.39 with SMTP id j7ls335038laf.92.gmail; Thu, 04 Dec 2014 13:35:45 -0800 (PST) X-Received: by 10.112.167.130 with SMTP id zo2mr11649934lbb.4.1417728945793; Thu, 04 Dec 2014 13:35:45 -0800 (PST) Received: from mail-la0-x234.google.com (mail-la0-x234.google.com. [2a00:1450:4010:c03::234]) by mx.google.com with ESMTPS id ss9si14251188lbb.89.2014.12.04.13.35.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Dec 2014 13:35:45 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::234 as permitted sender) client-ip=2a00:1450:4010:c03::234; Received: by mail-la0-f52.google.com with SMTP id hs14so10265378lab.39 for ; Thu, 04 Dec 2014 13:35:45 -0800 (PST) X-Received: by 10.152.43.103 with SMTP id v7mr11562725lal.29.1417728945385; Thu, 04 Dec 2014 13:35:45 -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 ew9csp115648lbc; Thu, 4 Dec 2014 13:35:44 -0800 (PST) X-Received: by 10.70.53.164 with SMTP id c4mr22435683pdp.17.1417728943403; Thu, 04 Dec 2014 13:35:43 -0800 (PST) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id rv7si44793166pbc.125.2014.12.04.13.35.42 for ; Thu, 04 Dec 2014 13:35: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 8B8D76E988; Thu, 4 Dec 2014 13:35:42 -0800 (PST) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from nm4-vm2.bullet.mail.gq1.yahoo.com (nm4-vm2.bullet.mail.gq1.yahoo.com [98.136.218.161]) by gabe.freedesktop.org (Postfix) with ESMTP id 0436E6E988 for ; Thu, 4 Dec 2014 13:35:41 -0800 (PST) Received: from [98.137.12.175] by nm4.bullet.mail.gq1.yahoo.com with NNFMP; 04 Dec 2014 21:35:41 -0000 Received: from [98.136.164.65] by tm14.bullet.mail.gq1.yahoo.com with NNFMP; 04 Dec 2014 21:35:41 -0000 Received: from [127.0.0.1] by smtp227.mail.gq1.yahoo.com with NNFMP; 04 Dec 2014 21:35:41 -0000 X-Yahoo-Newman-Id: 700761.56272.bm@smtp227.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: BjJtqv8VM1m6E.uSAPT0PFtqcZnYDv8YqbYfmSlkKloYkuh WkZLASDPmdWNZ7J8m4GIyUcmMbBYbW4Hm.GAS4lFtMVxkZGgtKTkg6FrfY8r rj8GtaVtgLc7rl3AToiJ1ruywfoX_RyJ2nj2tB4uCKOrHbpn9QQE1I12r5nJ N03A4nbAONhcgsCTX6f5Aqa3wSL8gJ3ZY1fgVg0gFSf0iRrl1xxqRe4DcQMt EytxDj3rWUlIOYstvukvlusWUjwjBa1tygXNa5fqbV52_RNqnV0D7teCg5P3 eSOAKDhhUOeuieY2lB.kn1dVPMq5D6jO50_wKZT8iCIBKLsNsvnCQmCFg.6T sw4sTMupIcDHbSmaHj5NHKtHKwgip3DM2t4dS73z5gyT58MENkJOv_Ou60vX 5TxMI2sohVkn3LZxrXlZEUsz7jsprSz8wELK.HRmJ.AeyjIoO9fx9qyE1h_n ygOfKsHw03lMMOV9zRKI1Mit6hLhV_Uan58.42TdZ8vRw3P4CEEaTl1YKe2r O.pCv66BGdAIb9vmg7PstDA-- X-Yahoo-SMTP: 9BNlx.aswBAkr0D8mG_whiOP1dyU From: "'Timothy Arceri' via Patchwork Forward" To: piglit@lists.freedesktop.org Date: Fri, 5 Dec 2014 08:35:09 +1100 Message-Id: <1417728909-22349-2-git-send-email-t_arceri@yahoo.com.au> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1417728909-22349-1-git-send-email-t_arceri@yahoo.com.au> References: <1417728909-22349-1-git-send-email-t_arceri@yahoo.com.au> Subject: [Piglit] [PATCH 2/2] arb_arrays_of_arrays: linker intrastage 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:c03::234 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 intrastage-dimension-size-mismatch.shader_test AMD: pass intrastage-interface-field.shader_test AMD: pass intrastage-interface.shader_test AMD: pass intrastage-struct-field.shader_test AMD: pass intrastage-struct.shader_test AMD: pass intrastage-unsized-mismatch.shader_test AMD: pass intrastage-unsized-mismatch2.shader_test AMD: pass intrastage-unsized.shader_test AMD: pass intrastage.shader_test AMD: pass Signed-off-by: Timothy Arceri --- These tests lead me to finding a bug with single dimension arrays in Mesa so I'm pretty happy with the coverage. .../intrastage-dimension-size-mismatch.shader_test | 36 ++++++++++++++++++ .../linker/intrastage-interface-field.shader_test | 38 +++++++++++++++++++ .../linker/intrastage-interface.shader_test | 38 +++++++++++++++++++ .../linker/intrastage-struct-field.shader_test | 42 +++++++++++++++++++++ .../linker/intrastage-struct.shader_test | 42 +++++++++++++++++++++ .../linker/intrastage-unsized-mismatch.shader_test | 36 ++++++++++++++++++ .../intrastage-unsized-mismatch2.shader_test | 36 ++++++++++++++++++ .../linker/intrastage-unsized.shader_test | 36 ++++++++++++++++++ .../linker/intrastage.shader_test | 44 ++++++++++++++++++++++ 9 files changed, 348 insertions(+) create mode 100644 tests/spec/arb_arrays_of_arrays/linker/intrastage-dimension-size-mismatch.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/intrastage-interface-field.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/intrastage-interface.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/intrastage-struct-field.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/intrastage-struct.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/intrastage-unsized-mismatch.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/intrastage-unsized-mismatch2.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/intrastage-unsized.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/intrastage.shader_test diff --git a/tests/spec/arb_arrays_of_arrays/linker/intrastage-dimension-size-mismatch.shader_test b/tests/spec/arb_arrays_of_arrays/linker/intrastage-dimension-size-mismatch.shader_test new file mode 100644 index 0000000..4914ebc --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/intrastage-dimension-size-mismatch.shader_test @@ -0,0 +1,36 @@ +# This test verifies that a link error is generated if intrastage +# array sizes don't match. + +[require] +GLSL >= 1.20 +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable + +varying vec4 color[4][2]; + +void f() +{ + color[2][1] = vec4(1, 0, 0, 1); +} + +[vertex shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable + +varying vec4 color[3][2]; + +void f(); + +void main() +{ + f(); + color[1][1] = vec4(1, 0, 0, 1); + + gl_Position = gl_Vertex; +} + +[test] +link error diff --git a/tests/spec/arb_arrays_of_arrays/linker/intrastage-interface-field.shader_test b/tests/spec/arb_arrays_of_arrays/linker/intrastage-interface-field.shader_test new file mode 100644 index 0000000..dc460d9 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/intrastage-interface-field.shader_test @@ -0,0 +1,38 @@ +# This test verifies that linking is successful if intrastage +# array sizes match. + +[require] +GLSL >= 1.50 +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +out blk { + vec4 foo[2][5]; +} inst; + +void f() +{ + inst.foo[1][4] = vec4(1.0); +} + +[vertex shader] +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +out blk { + vec4 foo[2][5]; +} inst; + +void f(); + +void main() +{ + f(); + inst.foo[0][4] = vec4(1.0); +} + +[test] +link success diff --git a/tests/spec/arb_arrays_of_arrays/linker/intrastage-interface.shader_test b/tests/spec/arb_arrays_of_arrays/linker/intrastage-interface.shader_test new file mode 100644 index 0000000..1569781 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/intrastage-interface.shader_test @@ -0,0 +1,38 @@ +# This test verifies that linking is successful if intrastage +# array sizes match. + +[require] +GLSL >= 1.50 +GL_ARB_arrays_of_arrays + +[vertex shader] +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +out blk { + vec4 foo; +} inst[2][5]; + +void f() +{ + inst[1][4].foo = vec4(1.0); +} + +[vertex shader] +#version 150 +#extension GL_ARB_arrays_of_arrays: enable + +out blk { + vec4 foo; +} inst[2][5]; + +void f(); + +void main() +{ + f(); + inst[0][4].foo = vec4(1.0); +} + +[test] +link success diff --git a/tests/spec/arb_arrays_of_arrays/linker/intrastage-struct-field.shader_test b/tests/spec/arb_arrays_of_arrays/linker/intrastage-struct-field.shader_test new file mode 100644 index 0000000..5c4220f --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/intrastage-struct-field.shader_test @@ -0,0 +1,42 @@ +# This test verifies that linking is successful if intrastage +# array sizes match. + +[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; +varying vec4 color; + +void f() +{ + color = s.x[1][0]; +} + +[vertex shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +struct S { + vec4 [2] x[2]; +}; + +uniform S s; +varying vec4 color; + +void f(); + +void main() +{ + f(); + gl_Position = s.x[1][1]; +} + +[test] +link success diff --git a/tests/spec/arb_arrays_of_arrays/linker/intrastage-struct.shader_test b/tests/spec/arb_arrays_of_arrays/linker/intrastage-struct.shader_test new file mode 100644 index 0000000..2e31586 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/intrastage-struct.shader_test @@ -0,0 +1,42 @@ +# This test verifies that linking is successful if intrastage +# array sizes match. + +[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]; +varying vec4 color; + +void f() +{ + color = s[1][1].x[0]; +} + +[vertex shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +struct S { + vec4 x[2]; +}; + +uniform S s[2][2]; +varying vec4 color; + +void f(); + +void main() +{ + f(); + gl_Position = s[1][1].x[1]; +} + +[test] +link success diff --git a/tests/spec/arb_arrays_of_arrays/linker/intrastage-unsized-mismatch.shader_test b/tests/spec/arb_arrays_of_arrays/linker/intrastage-unsized-mismatch.shader_test new file mode 100644 index 0000000..711e277 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/intrastage-unsized-mismatch.shader_test @@ -0,0 +1,36 @@ +# This test verifies that a link error is generated if intrastage +# array sizes don't match. + +[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 f() +{ + color[3][1] = vec4(1, 0, 0, 1); +} + +[vertex shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable + +varying vec4 color[3][2]; + +void f(); + +void main() +{ + f(); + color[1][1] = vec4(1, 0, 0, 1); + + gl_Position = gl_Vertex; +} + +[test] +link error diff --git a/tests/spec/arb_arrays_of_arrays/linker/intrastage-unsized-mismatch2.shader_test b/tests/spec/arb_arrays_of_arrays/linker/intrastage-unsized-mismatch2.shader_test new file mode 100644 index 0000000..a2b86df --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/intrastage-unsized-mismatch2.shader_test @@ -0,0 +1,36 @@ +# This test verifies that a link error is generated if intrastage +# array sizes don't match. + +[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 f() +{ + color[1][1] = vec4(1, 0, 0, 1); +} + +[vertex shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable + +varying vec4 color[][2]; + +void f(); + +void main() +{ + f(); + color[3][1] = vec4(1, 0, 0, 1); + + gl_Position = gl_Vertex; +} + +[test] +link error diff --git a/tests/spec/arb_arrays_of_arrays/linker/intrastage-unsized.shader_test b/tests/spec/arb_arrays_of_arrays/linker/intrastage-unsized.shader_test new file mode 100644 index 0000000..75b3133 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/intrastage-unsized.shader_test @@ -0,0 +1,36 @@ +# This test verifies that linking is successful if intrastage +# array sizes match. + +[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 f() +{ + color[2][1] = vec4(1, 0, 0, 1); +} + +[vertex shader] +#version 120 +#extension GL_ARB_arrays_of_arrays: enable + +varying vec4 color[3][2]; + +void f(); + +void main() +{ + f(); + color[1][1] = vec4(1, 0, 0, 1); + + gl_Position = gl_Vertex; +} + +[test] +link success diff --git a/tests/spec/arb_arrays_of_arrays/linker/intrastage.shader_test b/tests/spec/arb_arrays_of_arrays/linker/intrastage.shader_test new file mode 100644 index 0000000..8fa4f88 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/intrastage.shader_test @@ -0,0 +1,44 @@ +# This test verifies that linking is successful if intrastage +# array sizes match. + +[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 f() +{ + color[2][1] = vec4(1, 0, 0, 1); + colour[1][1] = vec3(2, 0, 0); + c[1][3] = vec4(4, 0, 0, 4); +} + +[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 f(); + +void main() +{ + f(); + color[1][1] = vec4(1, 0, 0, 1); + colour[3][1] = vec3(2, 0, 0); + c[1][0] = vec4(4, 0, 0, 4); + + gl_Position = gl_Vertex; +} + +[test] +link success