From patchwork Sat Feb 28 00:42:45 2015 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: 45275 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CC2F2204BC for ; Sat, 28 Feb 2015 00:43:07 +0000 (UTC) Received: by wiwl15 with SMTP id l15sf2517403wiw.0 for ; Fri, 27 Feb 2015 16:43:07 -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=hhsiGZLuHkCuXPpCaIOdBnHHMK4Ki2s7YPfzeXc0uDg=; b=JcUggIsuL1UgACuzG+Ev/oXqMQ0qkbvX4in0DJOKstWbQ7vBkSa9fW80pPBPIPQq+U IWXlzv+TLyt2f5L1q1Axyc+DEjTbRp7nxHQCzE0eInyZJGczUw2Dz3+PIAxDLTxpn15d 2CufVYKQEuQyViRSiyKBcPBuxWi0tfHuDkeQ2atII4ENDoWKUY/OhsgzDhGGDBg+P7ug GPiToHrxBJlnbXHUTSyRM7dcRF/4xxeOxFrdJgUjtfb/mPAtpIBXGE6dLofpd2KWRq+q 3xuZd4CxBLPwi9KtLOOsMFokDQvZ4F8RV8f94SD75XFOKNfAkxOcU8AytJBH1JbIuDbS PVRg== X-Gm-Message-State: ALoCoQnpvHlgUwyS45rirvSywMtNDNnE8ZOMLl1xv5p4JVJstiRZXTQ7mnkkMuCh1RwYbkqbUw5Q X-Received: by 10.152.4.229 with SMTP id n5mr2431201lan.1.1425084187094; Fri, 27 Feb 2015 16:43:07 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.1.105 with SMTP id 9ls259053lal.59.gmail; Fri, 27 Feb 2015 16:43:06 -0800 (PST) X-Received: by 10.112.220.36 with SMTP id pt4mr15074474lbc.15.1425084186905; Fri, 27 Feb 2015 16:43:06 -0800 (PST) Received: from mail-lb0-x22b.google.com (mail-lb0-x22b.google.com. [2a00:1450:4010:c04::22b]) by mx.google.com with ESMTPS id sr5si4015067lbb.113.2015.02.27.16.43.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 16:43:06 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22b as permitted sender) client-ip=2a00:1450:4010:c04::22b; Received: by lbiz11 with SMTP id z11so20446739lbi.5 for ; Fri, 27 Feb 2015 16:43:06 -0800 (PST) X-Received: by 10.152.28.5 with SMTP id x5mr14757820lag.112.1425084186800; Fri, 27 Feb 2015 16:43:06 -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.35.133 with SMTP id h5csp4242742lbj; Fri, 27 Feb 2015 16:43:05 -0800 (PST) X-Received: by 10.68.162.225 with SMTP id yd1mr27721407pbb.75.1425084185036; Fri, 27 Feb 2015 16:43:05 -0800 (PST) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id l9si7498474pdp.89.2015.02.27.16.43.04; Fri, 27 Feb 2015 16:43:05 -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 DF9B56E9A5; Fri, 27 Feb 2015 16:43:03 -0800 (PST) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from nm28-vm4.bullet.mail.gq1.yahoo.com (nm28-vm4.bullet.mail.gq1.yahoo.com [98.136.216.163]) by gabe.freedesktop.org (Postfix) with ESMTP id 678026E9A4 for ; Fri, 27 Feb 2015 16:43:02 -0800 (PST) Received: from [216.39.60.181] by nm28.bullet.mail.gq1.yahoo.com with NNFMP; 28 Feb 2015 00:43:02 -0000 Received: from [208.71.42.198] by tm17.bullet.mail.gq1.yahoo.com with NNFMP; 28 Feb 2015 00:43:02 -0000 Received: from [127.0.0.1] by smtp209.mail.gq1.yahoo.com with NNFMP; 28 Feb 2015 00:43:02 -0000 X-Yahoo-Newman-Id: 33388.35408.bm@smtp209.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: XwQctf4VM1lutInZDyTfQt2ciWEPe0DLM.V.HUvPB4iBbSU 1hEBsRC20.yitx3dBpHQZQT7q7G1q2oX2U7gvlkFnOivtPMY8ZUopzrlalRh GT6cSXadg.G7d0.gNaDSsgxIIwCAMvoP_sCmD5SDw1_TOvQUx2aNepQKuwHT GEIfj0gcyyDKqtHyJkk68CxjpaFFQxmkv_grCwFDOsszRClRvOJLgQgOFhbv dXrJst.YAKV5I5Vr_V50SvVkqGxL6lne91HdKdkdpT4pe3kDiKMbgzT3ud.4 F5wKD6BaHItuYtT46BwEzWMvnm84ez8XPxgEokfwtDKjb2NQYcrxbpGyDMaN ln07hg4nORTglIMA1nVoRpUe1z_MVe9H2qhYNSzy0WAuDQz433gz6CIDyNEC DnK7UHjo_8kjccIaHsTX.XfE6o5w2A2cfSA4c1ovL9iv1zt1v84yjQaVxpUI ZFI4aMa1kAD1fNaLEWrooNZiSvzC5oYZvUPmnPthIoiOy8x1_X_xbXSyFahX f8PMXNFukNnsh8AIRSvAl_EO4peOH0gBIx7k- X-Yahoo-SMTP: 9BNlx.aswBAkr0D8mG_whiOP1dyU From: "'Timothy Arceri' via Patchwork Forward" To: piglit@lists.freedesktop.org Date: Sat, 28 Feb 2015 11:42:45 +1100 Message-Id: <1425084165-12569-2-git-send-email-t_arceri@yahoo.com.au> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1425084165-12569-1-git-send-email-t_arceri@yahoo.com.au> References: <1425084165-12569-1-git-send-email-t_arceri@yahoo.com.au> Subject: [Piglit] [PATCH 2/2] arb_arrays_of_arrays: check array sizes when instance name differ 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::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 Uniform interface blocks can have different instance names across shaders. These tests check that array rules are applied correctly. Test results: AMD Radeon HD 6670 - Catalyst 14.501.1003 OpenGL 4.4 uniform-block-array-instance-name-mismatch - pass uniform-block-array-size-and-instance-name-mismatch - fail --- ...-block-array-instance-name-mismatch.shader_test | 33 +++++++++++++++++ ...ray-size-and-instance-name-mismatch.shader_test | 41 ++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 tests/spec/arb_arrays_of_arrays/linker/uniform-block-array-instance-name-mismatch.shader_test create mode 100644 tests/spec/arb_arrays_of_arrays/linker/uniform-block-array-size-and-instance-name-mismatch.shader_test diff --git a/tests/spec/arb_arrays_of_arrays/linker/uniform-block-array-instance-name-mismatch.shader_test b/tests/spec/arb_arrays_of_arrays/linker/uniform-block-array-instance-name-mismatch.shader_test new file mode 100644 index 0000000..4ca8e17 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/uniform-block-array-instance-name-mismatch.shader_test @@ -0,0 +1,33 @@ +// Instance names for uniforms can differ check +// that the shaders link successfully. + +[require] +GLSL >= 1.50 +GL_ARB_arrays_of_arrays + +[vertex shader] +#extension GL_ARB_arrays_of_arrays: enable + +uniform Foo { + vec4 x; +} foo[3][4]; + +void main() +{ + gl_Position = vec4(foo[0][1].x); +} + +[fragment shader] +#extension GL_ARB_arrays_of_arrays: enable + +uniform Foo { + vec4 x; +} bar[3][4]; + +void main() +{ + gl_FragColor = bar[0][2].x; +} + +[test] +link success diff --git a/tests/spec/arb_arrays_of_arrays/linker/uniform-block-array-size-and-instance-name-mismatch.shader_test b/tests/spec/arb_arrays_of_arrays/linker/uniform-block-array-size-and-instance-name-mismatch.shader_test new file mode 100644 index 0000000..f3d42fa --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/linker/uniform-block-array-size-and-instance-name-mismatch.shader_test @@ -0,0 +1,41 @@ +// From the GLSL 1.50 spec, section 4.3.7 (Interface Blocks): +// +// Furthermore, if a matching block is declared as an array, then +// the array sizes must also match (or follow array matching rules +// for the interface between a vertex and a geometry shader). +// +// In this test, we create a uniform block array in both +// the vertex and fragment shaders, using different array sizes. The +// instance name of the interface differs across shaders. Then we +// check that the implementation correctly reported an error. + +[require] +GLSL >= 1.50 +GL_ARB_arrays_of_arrays + +[vertex shader] +#extension GL_ARB_arrays_of_arrays: enable + +uniform Foo { + vec4 x; +} foo[2][5]; + +void main() +{ + gl_Position = vec4(foo[0][1].x); +} + +[fragment shader] +#extension GL_ARB_arrays_of_arrays: enable + +uniform Foo { + vec4 x; +} bar[2][4]; + +void main() +{ + gl_FragColor = bar[0][2].x; +} + +[test] +link error