From patchwork Sat Jul 4 02:15:58 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: 50649 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0FA40214B3 for ; Sat, 4 Jul 2015 02:16:22 +0000 (UTC) Received: by wgbbj7 with SMTP id bj7sf34678560wgb.2 for ; Fri, 03 Jul 2015 19:16:21 -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=SEJLWHqH1He5ohd4B6/DXj5KKkpSTNd60gqNZevlUxI=; b=bmh7EtTytR1glmdq3sfFA5jafYQR/StjsSvESWhCTOLFe55Nb/e2Z/E2OfFDyjRMBe tU8tsC509sUH496+raRpDpcR5avDDcs34oeUVzIGuCrsiLkRpn5xmAWMkl96rsN9bR0s tjZA2j2AnkYwHV0T661eUxlAP0utHYFe4Bnwq4VidabZW2C0P2sgWr5fJ8hlwf+3jyoe hfWDLEddUhhr5MXB05OS/E4eshCYDgKfPycjSwUr5D3zwyY5udiT8OXkoDlmJAXrnabK qN94iQUYOJDzzLHlKrnix6yB3i7NF6l08Tpu74XeZ3VaCT2FtF+Ond1xiOY++r3DHjeA 4cXw== X-Gm-Message-State: ALoCoQlFUfXfZ4d2yYFxxg6HT8M7BrXFN6ArtLd9gY/WpqFQGCdBTWi5ciG2d29SA+1wQ7H484TI X-Received: by 10.113.11.3 with SMTP id ee3mr24156539lbd.9.1435976181333; Fri, 03 Jul 2015 19:16:21 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.102 with SMTP id lb6ls600048lab.49.gmail; Fri, 03 Jul 2015 19:16:20 -0700 (PDT) X-Received: by 10.152.206.10 with SMTP id lk10mr38551229lac.90.1435976180963; Fri, 03 Jul 2015 19:16:20 -0700 (PDT) Received: from mail-la0-x230.google.com (mail-la0-x230.google.com. [2a00:1450:4010:c03::230]) by mx.google.com with ESMTPS id xp7si8773501lac.20.2015.07.03.19.16.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Jul 2015 19:16:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::230 as permitted sender) client-ip=2a00:1450:4010:c03::230; Received: by lagx9 with SMTP id x9so100926384lag.1 for ; Fri, 03 Jul 2015 19:16:20 -0700 (PDT) X-Received: by 10.152.6.69 with SMTP id y5mr38180512lay.72.1435976180492; Fri, 03 Jul 2015 19:16:20 -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.108.230 with SMTP id hn6csp359646lbb; Fri, 3 Jul 2015 19:16:19 -0700 (PDT) X-Received: by 10.70.109.199 with SMTP id hu7mr83256806pdb.71.1435976178685; Fri, 03 Jul 2015 19:16:18 -0700 (PDT) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id rj10si16968929pdb.132.2015.07.03.19.16.17; Fri, 03 Jul 2015 19:16:18 -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 A11736E278; Fri, 3 Jul 2015 19:16:17 -0700 (PDT) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from nm23-vm2.bullet.mail.gq1.yahoo.com (nm23-vm2.bullet.mail.gq1.yahoo.com [98.136.217.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id 978ED6E278 for ; Fri, 3 Jul 2015 19:16:16 -0700 (PDT) Received: from [98.137.12.63] by nm23.bullet.mail.gq1.yahoo.com with NNFMP; 04 Jul 2015 02:16:14 -0000 Received: from [208.71.42.209] by tm8.bullet.mail.gq1.yahoo.com with NNFMP; 04 Jul 2015 02:16:14 -0000 Received: from [127.0.0.1] by smtp220.mail.gq1.yahoo.com with NNFMP; 04 Jul 2015 02:16:14 -0000 X-Yahoo-Newman-Id: 946515.36541.bm@smtp220.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: SNT0n.kVM1n8qh_gSxsVxml5w7Z.4yNtxZ8GkTgi7.bBIY0 OuVafaNpfCYfCZfYFmiRHDNaVMBXy45NSG8EvkuK6oj7cK5L2CeGd9hfJNTn .H53TJm57rA0e0i3c2z39CgsnHlKHkq9yQXmL2qyi5hxnja0CMkB43TICRKe ipDbYOXK5StGXF5RWPtQhYPZT9bCclEfLcugfl5b_h1fznNs00shDrQeVR0V ITEtoS1EN.Yvv8IjHDUOTs1C1SEzXhiLOmfcVOqjIuj2gJM9wPMetJA2MAZb czznGlQkAjWSh3lS1ssLhtBmeEG_9f1MXmtUAsiTlWx_QhTcfA_8k0Zo6dnN OXbK15tEv4aRJ_4U699e8V7raxMND7jMX9.KR01SrkWbRj3NR.yBX5pyIKb6 jT_CiSYM3IareV6.xpGIv7wcdbu05IqHy9H8aNEvOvJCOjVNT8td43kNEprC 8gg0UnfKXaXQuQs1qXpRzP.pNzS5YjiGdjNbAyraoCu4Bf8NyOeNqh_OfCkP YbIIubbYiepJjulL2HH17wVSrabIQp0BCjdI- X-Yahoo-SMTP: 9BNlx.aswBAkr0D8mG_whiOP1dyU From: "'Timothy Arceri' via Patchwork Forward" To: piglit@lists.freedesktop.org Date: Sat, 4 Jul 2015 12:15:58 +1000 Message-Id: <1435976158-30728-2-git-send-email-t_arceri@yahoo.com.au> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1435976158-30728-1-git-send-email-t_arceri@yahoo.com.au> References: <1435976158-30728-1-git-send-email-t_arceri@yahoo.com.au> Subject: [Piglit] [PATCH 2/2] arb_arrays_of_arrays: test precision qualifier with samplers 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::230 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 Test results: Nvidia GeForce 840M - NVIDIA 346.47: pass --- .../compiler/precision-qualifier-sampler.frag | 67 +++++++++++++++++++++ .../compiler/precision-qualifier-sampler.vert | 68 ++++++++++++++++++++++ 2 files changed, 135 insertions(+) create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/precision-qualifier-sampler.frag create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/precision-qualifier-sampler.vert +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/precision-qualifier-sampler.frag b/tests/spec/arb_arrays_of_arrays/compiler/precision-qualifier-sampler.frag new file mode 100644 index 0000000..1fd2948 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/precision-qualifier-sampler.frag @@ -0,0 +1,67 @@ +// [config] +// expect_result: pass +// glsl_version: 1.30 +// require_extensions: GL_ARB_arrays_of_arrays +// check_link: true +// [end config] +// +// From the GLSL ES 3.00 specification, section 4.5.4 ("Default +// Precision Qualifiers"): +// +// "The precision statement +// +// precision precision-qualifier type; +// +// can be used to establish a default precision qualifier. The +// type field can be int or float or any of the sampler types, and +// the precision-qualifier can be lowp, mediump, or highp." +// +// Section 8 (Built-In Functions) of the GLSL ES 1.00 spec says: + +// "uniform lowp sampler2D sampler; +// highp vec2 coord; +// ... +// lowp vec4 col = texture2D (sampler, coord); +// // texture2D returns lowp" +// +// Section 4.5 (Precision and Precision Qualifiers) of the GLSL 1.30 +// spec also says: +// +// "Precision qualifiers are added for code portability with OpenGL +// ES, not for functionality. They have the same syntax as in OpenGL ES." +// +// From this, we infer that GLSL 1.30 (and later) should allow precision +// qualifiers on sampler types just like float and integer types. +// +// This test verifies that a precision qualifier can be used on all of +// GLSL 1.30's sampler types. + +#version 130 +#extension GL_ARB_arrays_of_arrays: enable + +uniform mediump sampler1D s1[2][2]; +uniform mediump sampler2D s2[2][2]; +uniform mediump sampler3D s3[2][2]; +uniform mediump samplerCube s4[2][2]; +uniform mediump samplerCubeShadow s5[2][2]; +uniform mediump sampler1DShadow s6[2][2]; +uniform mediump sampler2DShadow s7[2][2]; +uniform mediump sampler1DArray s8[2][2]; +uniform mediump sampler2DArray s9[2][2]; +uniform mediump sampler1DArrayShadow s10[2][2]; +uniform mediump sampler2DArrayShadow s11[2][2]; +uniform mediump isampler1D s12[2][2]; +uniform mediump isampler2D s13[2][2]; +uniform mediump isampler3D s14[2][2]; +uniform mediump isamplerCube s15[2][2]; +uniform mediump isampler1DArray s16[2][2]; +uniform mediump isampler2DArray s17[2][2]; +uniform mediump usampler1D s18[2][2]; +uniform mediump usampler2D s19[2][2]; +uniform mediump usampler3D s20[2][2]; +uniform mediump usamplerCube s21[2][2]; +uniform mediump usampler1DArray s22[2][2]; +uniform mediump usampler2DArray s23[2][2]; + +void main() +{ +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/precision-qualifier-sampler.vert b/tests/spec/arb_arrays_of_arrays/compiler/precision-qualifier-sampler.vert new file mode 100644 index 0000000..00e677a --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/precision-qualifier-sampler.vert @@ -0,0 +1,68 @@ +// [config] +// expect_result: pass +// glsl_version: 1.30 +// require_extensions: GL_ARB_arrays_of_arrays +// check_link: true +// [end config] +// +// From the GLSL ES 3.00 specification, section 4.5.4 ("Default +// Precision Qualifiers"): +// +// "The precision statement +// +// precision precision-qualifier type; +// +// can be used to establish a default precision qualifier. The +// type field can be int or float or any of the sampler types, and +// the precision-qualifier can be lowp, mediump, or highp." +// +// Section 8 (Built-In Functions) of the GLSL ES 1.00 spec says: + +// "uniform lowp sampler2D sampler; +// highp vec2 coord; +// ... +// lowp vec4 col = texture2D (sampler, coord); +// // texture2D returns lowp" +// +// Section 4.5 (Precision and Precision Qualifiers) of the GLSL 1.30 +// spec also says: +// +// "Precision qualifiers are added for code portability with OpenGL +// ES, not for functionality. They have the same syntax as in OpenGL ES." +// +// From this, we infer that GLSL 1.30 (and later) should allow precision +// qualifiers on sampler types just like float and integer types. +// +// This test verifies that a precision qualifier can be used on all of +// GLSL 1.30's sampler types. + +#version 130 +#extension GL_ARB_arrays_of_arrays: enable + +uniform mediump sampler1D s1[2][2]; +uniform mediump sampler2D s2[2][2]; +uniform mediump sampler3D s3[2][2]; +uniform mediump samplerCube s4[2][2]; +uniform mediump samplerCubeShadow s5[2][2]; +uniform mediump sampler1DShadow s6[2][2]; +uniform mediump sampler2DShadow s7[2][2]; +uniform mediump sampler1DArray s8[2][2]; +uniform mediump sampler2DArray s9[2][2]; +uniform mediump sampler1DArrayShadow s10[2][2]; +uniform mediump sampler2DArrayShadow s11[2][2]; +uniform mediump isampler1D s12[2][2]; +uniform mediump isampler2D s13[2][2]; +uniform mediump isampler3D s14[2][2]; +uniform mediump isamplerCube s15[2][2]; +uniform mediump isampler1DArray s16[2][2]; +uniform mediump isampler2DArray s17[2][2]; +uniform mediump usampler1D s18[2][2]; +uniform mediump usampler2D s19[2][2]; +uniform mediump usampler3D s20[2][2]; +uniform mediump usamplerCube s21[2][2]; +uniform mediump usampler1DArray s22[2][2]; +uniform mediump usampler2DArray s23[2][2]; + +void main() +{ + gl_Position = vec4(0.0);