From patchwork Wed Aug 5 00:36:43 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: 51943 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by patches.linaro.org (Postfix) with ESMTPS id B386522E8E for ; Wed, 5 Aug 2015 00:37:07 +0000 (UTC) Received: by wiwv4 with SMTP id v4sf6303872wiw.1 for ; Tue, 04 Aug 2015 17:37:06 -0700 (PDT) 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=dtW45OpWLx+vDUPmQdsJtYwcb009mLbnKkGC6xMEMJw=; b=Ebhc1PIDDZgJ8RZVArQoXE0uM//435xYXUCIAE22EBwyOIEvFaT4QS333QhWan9kYM hbunLC3rKHn+6e0MUR2ntyyn3wQtccOT+sZi4vYfCvQgi+uploleP9nOEmn/3J5KoA+u lMJSajICCGP3akW/BMQpYC5ARCH/bArcNHv8M/Sft5h8YuWEVc37+prPnnpBvFP011Yd 7dYFc1VSsdkORDitBLW1SqzUkBb5RACZAwQtSrj3ncHHpnr7X6juJ8d1jkjF0STkSj2d tz/fpb5veGn4QOoEX6OnowNbQ2rQw4bp5c50vVmOZEVgVUe9RbeWcLjsIaF889Fwsl0u IqDQ== X-Gm-Message-State: ALoCoQk9Rulrpqc0UWETHS4PzH+y9WefEng6DL+C7HYwGZ47sEp86ouCKpQGdEXmH8Q7HTVnFWbe X-Received: by 10.112.139.65 with SMTP id qw1mr1869655lbb.24.1438735026812; Tue, 04 Aug 2015 17:37:06 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.184.168 with SMTP id ev8ls135659lac.8.gmail; Tue, 04 Aug 2015 17:37:06 -0700 (PDT) X-Received: by 10.152.2.2 with SMTP id 2mr7142206laq.58.1438735026438; Tue, 04 Aug 2015 17:37:06 -0700 (PDT) Received: from mail-la0-x231.google.com (mail-la0-x231.google.com. [2a00:1450:4010:c03::231]) by mx.google.com with ESMTPS id m18si982464lbg.157.2015.08.04.17.37.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Aug 2015 17:37:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::231 as permitted sender) client-ip=2a00:1450:4010:c03::231; Received: by labgo9 with SMTP id go9so18292524lab.3 for ; Tue, 04 Aug 2015 17:37:06 -0700 (PDT) X-Received: by 10.112.219.70 with SMTP id pm6mr6868877lbc.41.1438735026177; Tue, 04 Aug 2015 17:37:06 -0700 (PDT) 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.7.198 with SMTP id l6csp69236lba; Tue, 4 Aug 2015 17:37:05 -0700 (PDT) X-Received: by 10.70.54.7 with SMTP id f7mr13255123pdp.75.1438735025001; Tue, 04 Aug 2015 17:37:05 -0700 (PDT) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id mq9si2047035pdb.128.2015.08.04.17.37.04; Tue, 04 Aug 2015 17:37:04 -0700 (PDT) Received-SPF: pass (google.com: domain of piglit-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DD79B6E786; Tue, 4 Aug 2015 17:37:03 -0700 (PDT) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from nm28-vm3.bullet.mail.gq1.yahoo.com (nm28-vm3.bullet.mail.gq1.yahoo.com [98.136.216.162]) by gabe.freedesktop.org (Postfix) with ESMTPS id B9DC46E786 for ; Tue, 4 Aug 2015 17:37:02 -0700 (PDT) Received: from [98.137.12.58] by nm28.bullet.mail.gq1.yahoo.com with NNFMP; 05 Aug 2015 00:37:01 -0000 Received: from [98.136.164.65] by tm3.bullet.mail.gq1.yahoo.com with NNFMP; 05 Aug 2015 00:37:01 -0000 Received: from [127.0.0.1] by smtp227.mail.gq1.yahoo.com with NNFMP; 05 Aug 2015 00:37:01 -0000 X-Yahoo-Newman-Id: 719004.84524.bm@smtp227.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: jXg48QkVM1kR6CBtGlD.WorD4SNbbPVW3h6lND5yEcDlYKl Y8nlTMvknp2D_LvfMhc4EV7_BwJi1JKazCFEHm2xBVjjbUZnY.WVCjuFicWD Zj7lO9O.1ApZjBN_hJ1zeb.AG5M_V39iPSyiy849LJrvduGHnSbcTyHf.NgX u3xuIwlxDEe25ZbXI7cNmSgsczNuVLVqnbIHckrzpkcBDzGibzoPBESJUX97 LVkctoXunyLJQwB6v3B1OLXGYczBeRM6wdLaUB9yAF19rTZ4PTsEh4.qXJa7 5PD3w4MR28ooy_mNgyFGFoBROhE0birEVc2FO88wuCb9bYWxaoMHpOj5pjTd TzcAv.H.12Gq5ZK8145Hgdj.VdcQx9qxD_8JrGOc9qpTAaLhlehxmHN.pUaF CeC.nt71zR.O3AWoGu55hYkqpKhY6jwqU3zIotTebLyRtCMfo0bdaxpAccc1 0Bm1TSYu_AUheugCGa87y9dGxxC.dukbWR9fWv3I5qVHYS9jO6UG3BPFBuSk OAK9JMH0nazjfoIDZB7bn1cnPPUV8rgEKmVE- X-Yahoo-SMTP: 9BNlx.aswBAkr0D8mG_whiOP1dyU From: "'Timothy Arceri' via Patchwork Forward" To: piglit@lists.freedesktop.org Date: Wed, 5 Aug 2015 10:36:43 +1000 Message-Id: <1438735003-10626-4-git-send-email-t_arceri@yahoo.com.au> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1438735003-10626-1-git-send-email-t_arceri@yahoo.com.au> References: <1438735003-10626-1-git-send-email-t_arceri@yahoo.com.au> Subject: [Piglit] [PATCH 4/4] arb_arrays_of_arrays: simple subroutine execution test 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::231 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@yahoo.com.au; 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 --- .../subroutines/fs-subroutine.shader_test | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 tests/spec/arb_arrays_of_arrays/execution/subroutines/fs-subroutine.shader_test diff --git a/tests/spec/arb_arrays_of_arrays/execution/subroutines/fs-subroutine.shader_test b/tests/spec/arb_arrays_of_arrays/execution/subroutines/fs-subroutine.shader_test new file mode 100644 index 0000000..bc779ef --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/execution/subroutines/fs-subroutine.shader_test @@ -0,0 +1,63 @@ +# test calling subroutine uniforms in an array +# with a constant value works. +[require] +GLSL >= 1.50 +GL_ARB_shader_subroutine +GL_ARB_arrays_of_arrays + +[vertex shader passthrough] + +[fragment shader] +#version 150 +#extension GL_ARB_shader_subroutine: enable +#extension GL_ARB_arrays_of_arrays: enable + +out vec4 color; + +subroutine float getchan1(); + +subroutine uniform getchan1 GetChan1[2][2]; + +subroutine(getchan1) +float chan_full() +{ + return 1.0; +} + +subroutine(getchan1) +float chan_half() +{ + return 0.5; +} + +subroutine(getchan1) +float chan_quarter() +{ + return 0.25; +} + +subroutine(getchan1) +float chan_empty() +{ + return 0.0; +} + +void main() +{ + color = vec4(GetChan1[1][1](), GetChan1[1][0](), GetChan1[0][0](), 1.0); +} + + +[test] +clear color 0.0 0.0 1.0 0.0 +clear +subuniform GL_FRAGMENT_SHADER GetChan1[1][1] chan_full +subuniform GL_FRAGMENT_SHADER GetChan1[1][0] chan_empty +subuniform GL_FRAGMENT_SHADER GetChan1[0][0] chan_quarter +draw rect -1 -1 2 2 +probe all rgba 1.0 0.0 0.25 1.0 +subuniform GL_FRAGMENT_SHADER GetChan1[1][1] chan_empty +subuniform GL_FRAGMENT_SHADER GetChan1[1][0] chan_full +subuniform GL_FRAGMENT_SHADER GetChan1[0][0] chan_half +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.5 1.0