From patchwork Tue Nov 25 12:09:42 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: 41461 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5970C25E18 for ; Tue, 25 Nov 2014 12:10:00 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gq15sf338027lab.3 for ; Tue, 25 Nov 2014 04:09:59 -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=7HVC274lx9lJT/Shjc2Tl58h8v7UPTIhWx0wj6IfYQM=; b=MJSjvVnQ2bLEDdxahKRtCixEt2i/4Ufjn1aWwbfqwTQO7y+OQZAwX32gHC0NgeMF1X opsuYslkZgOk5gl1ig9DKTTFybWY6FFDS3YqSfTeCYdYc94DHbhw8ts3+Z7s2nUuj8p5 AVaQRW5bK09DwAfVGlHtTf2AvznedjjK63A6nRsngdRafrmhbiyfrXI+jFLQf1SOGxZ4 Ghrj5C44LzDhUh0hOJejChYpax12gTM4xEXVHgKKg72fg0H9ReNp4llg9+A8bG9T9aa0 4sducuNcMObeOKHJaTxLpWtaMF4XhIEdSmlJtptNsgP+ipUJ/k+d7stg+M0efOK4i+AN i1tA== X-Gm-Message-State: ALoCoQlEpZP1xv6aSLNDbiaWwgw4atm4WGaV7UP181G8SqE4Z7RgUedz9tLeUaih1DpjJrd79OzO X-Received: by 10.112.142.36 with SMTP id rt4mr7575903lbb.3.1416917399352; Tue, 25 Nov 2014 04:09:59 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.228 with SMTP id r4ls191901lal.41.gmail; Tue, 25 Nov 2014 04:09:59 -0800 (PST) X-Received: by 10.152.120.167 with SMTP id ld7mr25664479lab.77.1416917399245; Tue, 25 Nov 2014 04:09:59 -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 pp1si1175405lbb.19.2014.11.25.04.09.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Nov 2014 04:09:59 -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 u10so387101lbd.34 for ; Tue, 25 Nov 2014 04:09:59 -0800 (PST) X-Received: by 10.153.7.170 with SMTP id dd10mr25841053lad.44.1416917399080; Tue, 25 Nov 2014 04:09:59 -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 ew9csp422070lbc; Tue, 25 Nov 2014 04:09:58 -0800 (PST) X-Received: by 10.70.38.36 with SMTP id d4mr41744039pdk.165.1416917397444; Tue, 25 Nov 2014 04:09:57 -0800 (PST) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id a10si1541766pdp.168.2014.11.25.04.09.56 for ; Tue, 25 Nov 2014 04:09:57 -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 676B96E7B2; Tue, 25 Nov 2014 04:09:56 -0800 (PST) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from nm4-vm3.bullet.mail.gq1.yahoo.com (nm4-vm3.bullet.mail.gq1.yahoo.com [98.136.218.162]) by gabe.freedesktop.org (Postfix) with ESMTP id 3469B6E7B2 for ; Tue, 25 Nov 2014 04:09:55 -0800 (PST) Received: from [98.137.12.58] by nm4.bullet.mail.gq1.yahoo.com with NNFMP; 25 Nov 2014 12:09:54 -0000 Received: from [98.136.164.67] by tm3.bullet.mail.gq1.yahoo.com with NNFMP; 25 Nov 2014 12:09:54 -0000 Received: from [127.0.0.1] by smtp229.mail.gq1.yahoo.com with NNFMP; 25 Nov 2014 12:09:54 -0000 X-Yahoo-Newman-Id: 146224.60565.bm@smtp229.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: st3sS7oVM1lOtGl.mqfR3LAKEE0ioMi9bM1lf2SY8V7qLab ge4LvlIjWrnbTOGVvfn65lPGQjqzW3TA6.m5HIDvrk73v.fZgM0prVRkKAp6 lsf_THUSSqKPK7IwhZqVpiEtQH.zDkw163Fy_HZzzr59i2F1aEOB0C3SloYD B0DYzW.5PCFu8pOk7df9.E1mr3Gw37Ktp9zdtPo7qRjVJ31bTxsodqkvq.0o 8Y8YCY0fZ39PSoDHzDScjOTF2IpFqg3lof8DEAGOkvFm6WiIOx7aTX0z9ptC ia2MNrq185KhY_fN_yqN2T7SHLEWD0uLIijTSjDPWisCLPseTFwxpb447M1I NMPPvapdqyf5gn00Y002sIJ3wCys3MsbhdMV_2G1j3tIABtEv3Aeq_wCZWwh 57cBLFUE.egLZRHg3SOUs81rQrU0TM7AlXGn1.y0GBLzN0nMfYhZ4BUc9voP FVXmNx0y1Lsb9l6ua62YQxzZSPXjigfPeGpRBQ5W_yEMcIsvGYBC.dbxAntN AWNclH7YL08AJYQSTq0S_X1clD6I- X-Yahoo-SMTP: 9BNlx.aswBAkr0D8mG_whiOP1dyU From: "'Timothy Arceri' via Patchwork Forward" To: piglit@lists.freedesktop.org Date: Tue, 25 Nov 2014 23:09:42 +1100 Message-Id: <1416917382-1854-1-git-send-email-t_arceri@yahoo.com.au> X-Mailer: git-send-email 1.9.3 Subject: [Piglit] [PATCH] glsl-1.20: 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: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 Signed-off-by: Timothy Arceri --- .../intrastage-unsized-array-mismatch.shader_test | 33 ++++++++++++++++++++++ .../intrastage-unsized-array-mismatch2.shader_test | 33 ++++++++++++++++++++++ .../linker/intrastage-unsized-array.shader_test | 33 ++++++++++++++++++++++ .../linker/intrastage-unsized-array2.shader_test | 33 ++++++++++++++++++++++ 4 files changed, 132 insertions(+) create mode 100644 tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch.shader_test create mode 100644 tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch2.shader_test create mode 100644 tests/spec/glsl-1.20/linker/intrastage-unsized-array.shader_test create mode 100644 tests/spec/glsl-1.20/linker/intrastage-unsized-array2.shader_test diff --git a/tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch.shader_test b/tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch.shader_test new file mode 100644 index 0000000..cdf3a91 --- /dev/null +++ b/tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch.shader_test @@ -0,0 +1,33 @@ +# 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.20 + +[vertex shader] +#version 120 + +varying vec4 color[3]; + +void f() +{ + color[1] = vec4(1, 0, 0, 1); +} + +[vertex shader] +#version 120 + +varying vec4 color[]; + +void f(); + +void main() +{ + f(); + color[3] = vec4(1, 0, 0, 1); + + gl_Position = gl_Vertex; +} + +[test] +link error diff --git a/tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch2.shader_test b/tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch2.shader_test new file mode 100644 index 0000000..764469a --- /dev/null +++ b/tests/spec/glsl-1.20/linker/intrastage-unsized-array-mismatch2.shader_test @@ -0,0 +1,33 @@ +# 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.20 + +[vertex shader] +#version 120 + +varying vec4 color[]; + +void f() +{ + color[3] = vec4(1, 0, 0, 1); +} + +[vertex shader] +#version 120 + +varying vec4 color[3]; + +void f(); + +void main() +{ + f(); + color[2] = vec4(1, 0, 0, 1); + + gl_Position = gl_Vertex; +} + +[test] +link error diff --git a/tests/spec/glsl-1.20/linker/intrastage-unsized-array.shader_test b/tests/spec/glsl-1.20/linker/intrastage-unsized-array.shader_test new file mode 100644 index 0000000..6fdd806 --- /dev/null +++ b/tests/spec/glsl-1.20/linker/intrastage-unsized-array.shader_test @@ -0,0 +1,33 @@ +# Test implicitly sized arrays match explicitly sized arrays +# across the same stage. + +[require] +GLSL >= 1.20 + +[vertex shader] +#version 120 + +varying vec4 color[4]; + +void f() +{ + color[1] = vec4(1, 0, 0, 1); +} + +[vertex shader] +#version 120 + +varying vec4 color[]; + +void f(); + +void main() +{ + f(); + color[3] = vec4(1, 0, 0, 1); + + gl_Position = gl_Vertex; +} + +[test] +link success diff --git a/tests/spec/glsl-1.20/linker/intrastage-unsized-array2.shader_test b/tests/spec/glsl-1.20/linker/intrastage-unsized-array2.shader_test new file mode 100644 index 0000000..6af80c2 --- /dev/null +++ b/tests/spec/glsl-1.20/linker/intrastage-unsized-array2.shader_test @@ -0,0 +1,33 @@ +# Test implicitly sized arrays match explicitly sized arrays +# across the same stage. + +[require] +GLSL >= 1.20 + +[vertex shader] +#version 120 + +varying vec4 color[]; + +void f() +{ + color[3] = vec4(1, 0, 0, 1); +} + +[vertex shader] +#version 120 + +varying vec4 color[4]; + +void f(); + +void main() +{ + f(); + color[1] = vec4(1, 0, 0, 1); + + gl_Position = gl_Vertex; +} + +[test] +link success