From patchwork Wed Jun 17 22:53:16 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: 49996 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4D0DE228FF for ; Wed, 17 Jun 2015 22:53:42 +0000 (UTC) Received: by lbbti3 with SMTP id ti3sf16015971lbb.1 for ; Wed, 17 Jun 2015 15:53:41 -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: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=D1GdxbcSP5TJ7+//nQCS52617lfCGGaJtTa5ESZ/Wu4=; b=VC3p5f7vlIlukO45wEJ0yjPvte7EhLfrhQ3BngCMj0ZrXUNloDMUCqRAMXjNTg2pHb u+minU1U7JquO7cyBjNFVoy6L6Hyerup33nJlCPaKxwH8kL95OXKLKvkcR7NVSyDRzki UGpvz5nOuKgfp36UU0Hso5GHRP1ELBDsYvFWuOXA4BOM95miKBf2LEij4MDgxSm9UMrW sjH7jRnqLA5R8rRUOotVKchJ7MJViEJ7QQqtJoxrSYUsNQJKmxnNoayXsPtzTqtduEts Oyc3/59WIFn+2I2Pc491GoQljKXM16fzWuV6/63K6VxxAp5CShmq08Pn01hjt07/NcM8 3knA== X-Gm-Message-State: ALoCoQlxmNBox1J5x7QmdPBUI01yH1PMTWtWufIVVSyDRrU1HoyzN6M+56czrDOTCoJat+Y8nuTx X-Received: by 10.113.11.3 with SMTP id ee3mr7508466lbd.9.1434581621254; Wed, 17 Jun 2015 15:53:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.129 with SMTP id m1ls345214laf.76.gmail; Wed, 17 Jun 2015 15:53:41 -0700 (PDT) X-Received: by 10.152.21.37 with SMTP id s5mr9997971lae.2.1434581621128; Wed, 17 Jun 2015 15:53:41 -0700 (PDT) Received: from mail-lb0-x22f.google.com (mail-lb0-x22f.google.com. [2a00:1450:4010:c04::22f]) by mx.google.com with ESMTPS id l9si4855214lam.36.2015.06.17.15.53.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jun 2015 15:53:41 -0700 (PDT) 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 lbbwc1 with SMTP id wc1so41449540lbb.2 for ; Wed, 17 Jun 2015 15:53:41 -0700 (PDT) X-Received: by 10.112.140.231 with SMTP id rj7mr10104890lbb.76.1434581621023; Wed, 17 Jun 2015 15:53:41 -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 hn6csp780208lbb; Wed, 17 Jun 2015 15:53:39 -0700 (PDT) X-Received: by 10.70.8.131 with SMTP id r3mr15434531pda.62.1434581619070; Wed, 17 Jun 2015 15:53:39 -0700 (PDT) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id cm6si8381745pdb.94.2015.06.17.15.53.37; Wed, 17 Jun 2015 15:53:39 -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 3B1FD6E0FE; Wed, 17 Jun 2015 15:53:37 -0700 (PDT) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from nm13-vm1.bullet.mail.gq1.yahoo.com (nm13-vm1.bullet.mail.gq1.yahoo.com [98.136.218.220]) by gabe.freedesktop.org (Postfix) with ESMTP id CB1D36E0FE for ; Wed, 17 Jun 2015 15:53:35 -0700 (PDT) Received: from [98.137.12.191] by nm13.bullet.mail.gq1.yahoo.com with NNFMP; 17 Jun 2015 22:53:34 -0000 Received: from [208.71.42.196] by tm12.bullet.mail.gq1.yahoo.com with NNFMP; 17 Jun 2015 22:53:34 -0000 Received: from [127.0.0.1] by smtp207.mail.gq1.yahoo.com with NNFMP; 17 Jun 2015 22:53:34 -0000 X-Yahoo-Newman-Id: 315917.28304.bm@smtp207.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: pKJ5Nd0VM1llCCc6dUjRRFCsTCHDqafsM0ePqv5HE_nlZOj CiviGLGRe_xB7eLuOBmOKxJVysmVnIfrKOyirlTM2qgY.aAbv9lXvafcNdy0 uCjdz9jMKx1B81kLmf3Px29igaq33wKJymGL8.mwNjQZqIbwD.srTdGREB4M 1t6sxVPVoN9xe_oz9pt1fYTUsTADGW488QbAxPHGXSjTLMxeSGYYHitVJnF_ jfC_Rx7owSjgxJwazWOndpWKPZLFS5ZuHDlm7pooAMHq7PtDnORYPaXZQCfb Gx.ZMJGz9uxS5UBDC_1EDi2XRFwYvMrvf7EZv.BaESln2uPYLonAgQ9brPyX sXEQl_m0jmAwh.R.nvNPkiZgczVKh_Dag63_ImMuTMUS_RrClvO2.b8jfQml nuH.stIuWqwPL0fX7sMe3n59k9D2370INFxd0gRdcc7uGbDGxx1fPIDWb0B7 2UMbf2UczEQdeBI9tqmV.FgUzMxd07ETT0A4PqGMYLg6bZ0T.wX0DM6O5en7 zwEXPyaFFK4Gj_q3mySIN5IM- X-Yahoo-SMTP: 9BNlx.aswBAkr0D8mG_whiOP1dyU From: "'Timothy Arceri' via Patchwork Forward" To: piglit@lists.freedesktop.org Date: Thu, 18 Jun 2015 08:53:16 +1000 Message-Id: <1434581596-23517-1-git-send-email-t_arceri@yahoo.com.au> X-Mailer: git-send-email 2.1.0 Subject: [Piglit] [PATCH] glsl-es-3.10: dont run gles tests where restrictions apply 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=@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 In GLES vertex shader outputs cant be arrays of structs or structs that contain arrays or structs. The GLSL ES 3.0 spec says: "Vertex output variables output per-vertex data and are declared using the out storage qualifier or the centroid out storage qualifier. They can only be float, floating-point vectors, matrices, signed or unsigned integers or integer vectors, or arrays or structures of any these." The GLSL ES 3.1 is a bit clearer about this: It is a compile-time error to declare a vertex shader output with, or that contains, any of the following types: * A boolean type * An opaque type * An array of arrays * An array of structures * A structure containing an array * A structure containing a structure CC: Mark Janes --- tests/all.py | 13 +- .../execution/varying-struct-arrays.shader_test | 237 --------------------- 2 files changed, 9 insertions(+), 241 deletions(-) delete mode 100644 tests/spec/glsl-es-3.00/execution/varying-struct-arrays.shader_test diff --git a/tests/all.py b/tests/all.py index 2839059..47fe503 100755 --- a/tests/all.py +++ b/tests/all.py @@ -3287,10 +3287,15 @@ with profile.group_manager( for api_suffix, possible_options in [('', [[], ['interface']]), ('_gles3', [[]])]: - for subtest in ['basic-struct', 'struct-whole-array', - 'struct-array-elem', 'array-struct', - 'array-struct-whole-array', 'array-struct-array-elem', - 'struct-struct', 'array-struct-array-struct']: + if api_suffix == '_gles3': + subtest_list = ['basic-struct'] + else: + subtest_list = ['basic-struct', 'struct-whole-array', + 'struct-array-elem', 'array-struct', + 'array-struct-whole-array', + 'array-struct-array-elem', 'struct-struct', + 'array-struct-array-struct'] + for subtest in subtest_list: for mode in ['error', 'get', 'run', 'run-no-fs']: for options in possible_options: g(['ext_transform_feedback-structs{0}'.format(api_suffix), diff --git a/tests/spec/glsl-es-3.00/execution/varying-struct-arrays.shader_test b/tests/spec/glsl-es-3.00/execution/varying-struct-arrays.shader_test deleted file mode 100644 index 88b7a8d..0000000 --- a/tests/spec/glsl-es-3.00/execution/varying-struct-arrays.shader_test +++ /dev/null @@ -1,237 +0,0 @@ -# Test that varying structs work properly in conjunction with arrays. -# -# From the GLSL ES 3.00 specification, section 4.3.4 ("Input Variables"): -# -# Fragment inputs can only be signed and unsigned integers and -# integer vectors, float, floating-point vectors, matrices, or -# arrays or structures of these. -# -# And from section 4.3.6 ("Output Variables"): -# -# Vertex output variables ... can only be float, floating-point -# vectors, matrices, signed or unsigned integers or integer -# vectors, or arrays or structures of any these. -# -# This test verifies the proper functioning of varyings whose types -# are a struct containing an array, an array of structs, and various -# complex combinations of arrays and structs. -# -# Note: chapter 11 of the GLSL ES 3.00 spec ("Counting of Inputs and -# Outputs") specifies a packing algorithm which constitutes a minimum -# requirement for when a set of varyings must be supported by a -# conformant implementation. Although that chapter has not yet been -# updated to reflect varying structs, Khronos's internal bugzilla -# indicates that structs should be flattened before applying the -# packing algorithm -# (https://cvs.khronos.org/bugzilla/show_bug.cgi?id=9828). The -# varyings in this test flatten as follows: -# -# float s1.f; // A -# float[3] s1.af[]; // B -# float[3] as1[].f; // C -# float[9] as1[].af[]; // D -# float s2.s1.f; // E -# float[3] s2.s1.af[]; // F -# float[2] s2.as1[].f; // G -# float[6] s2.as1[].af[]; // H -# float[2] as2[].s1.f; // I -# float[6] as2[].s1.af[]; // J -# float[4] as2[].as1[].f; // K -# float[12] as2[].as1[].af[]; // L -# -# And the flattened varyings would in turn be packed like so: -# x y z w -# 0 L D J G -# 1 L D J G -# 2 L D J I -# 3 L D J I -# 4 L D J -# 5 L D J -# 6 L D B -# 7 L D B -# 8 L D B -# 9 L H C -# 10 L H C -# 11 L H C -# 12 K H F -# 13 K H F -# 14 K H F -# 15 K A E - -[require] -GL ES >= 3.0 -GLSL ES >= 3.00 - -[vertex shader] -#version 300 es - -uniform float ref; - -in vec4 vertex; -struct S1 -{ - float f; - float af[3]; -}; -struct S2 -{ - S1 s1; - S1 as1[2]; -}; -out S1 s1; -out S1 as1[3]; -out S2 s2; -out S2 as2[2]; - -void main() -{ - gl_Position = vertex; - float f = ref; - s1.f = f++; - s1.af[0] = f++; - s1.af[1] = f++; - s1.af[2] = f++; - as1[0].f = f++; - as1[0].af[0] = f++; - as1[0].af[1] = f++; - as1[0].af[2] = f++; - as1[1].f = f++; - as1[1].af[0] = f++; - as1[1].af[1] = f++; - as1[1].af[2] = f++; - as1[2].f = f++; - as1[2].af[0] = f++; - as1[2].af[1] = f++; - as1[2].af[2] = f++; - s2.s1.f = f++; - s2.s1.af[0] = f++; - s2.s1.af[1] = f++; - s2.s1.af[2] = f++; - s2.as1[0].f = f++; - s2.as1[0].af[0] = f++; - s2.as1[0].af[1] = f++; - s2.as1[0].af[2] = f++; - s2.as1[1].f = f++; - s2.as1[1].af[0] = f++; - s2.as1[1].af[1] = f++; - s2.as1[1].af[2] = f++; - as2[0].s1.f = f++; - as2[0].s1.af[0] = f++; - as2[0].s1.af[1] = f++; - as2[0].s1.af[2] = f++; - as2[0].as1[0].f = f++; - as2[0].as1[0].af[0] = f++; - as2[0].as1[0].af[1] = f++; - as2[0].as1[0].af[2] = f++; - as2[0].as1[1].f = f++; - as2[0].as1[1].af[0] = f++; - as2[0].as1[1].af[1] = f++; - as2[0].as1[1].af[2] = f++; - as2[1].s1.f = f++; - as2[1].s1.af[0] = f++; - as2[1].s1.af[1] = f++; - as2[1].s1.af[2] = f++; - as2[1].as1[0].f = f++; - as2[1].as1[0].af[0] = f++; - as2[1].as1[0].af[1] = f++; - as2[1].as1[0].af[2] = f++; - as2[1].as1[1].f = f++; - as2[1].as1[1].af[0] = f++; - as2[1].as1[1].af[1] = f++; - as2[1].as1[1].af[2] = f++; -} - -[fragment shader] -#version 300 es -precision highp float; - -uniform float ref; - -struct S1 -{ - float f; - float af[3]; -}; -struct S2 -{ - S1 s1; - S1 as1[2]; -}; -in S1 s1; -in S1 as1[3]; -in S2 s2; -in S2 as2[2]; -out vec4 color; - -#define CHECK(value, expected) \ - if (distance(value, expected) > 0.00001) \ - failed = true - -void main() -{ - bool failed = false; - float f = ref; - - CHECK(s1.f, f++); - CHECK(s1.af[0], f++); - CHECK(s1.af[1], f++); - CHECK(s1.af[2], f++); - CHECK(as1[0].f, f++); - CHECK(as1[0].af[0], f++); - CHECK(as1[0].af[1], f++); - CHECK(as1[0].af[2], f++); - CHECK(as1[1].f, f++); - CHECK(as1[1].af[0], f++); - CHECK(as1[1].af[1], f++); - CHECK(as1[1].af[2], f++); - CHECK(as1[2].f, f++); - CHECK(as1[2].af[0], f++); - CHECK(as1[2].af[1], f++); - CHECK(as1[2].af[2], f++); - CHECK(s2.s1.f, f++); - CHECK(s2.s1.af[0], f++); - CHECK(s2.s1.af[1], f++); - CHECK(s2.s1.af[2], f++); - CHECK(s2.as1[0].f, f++); - CHECK(s2.as1[0].af[0], f++); - CHECK(s2.as1[0].af[1], f++); - CHECK(s2.as1[0].af[2], f++); - CHECK(s2.as1[1].f, f++); - CHECK(s2.as1[1].af[0], f++); - CHECK(s2.as1[1].af[1], f++); - CHECK(s2.as1[1].af[2], f++); - CHECK(as2[0].s1.f, f++); - CHECK(as2[0].s1.af[0], f++); - CHECK(as2[0].s1.af[1], f++); - CHECK(as2[0].s1.af[2], f++); - CHECK(as2[0].as1[0].f, f++); - CHECK(as2[0].as1[0].af[0], f++); - CHECK(as2[0].as1[0].af[1], f++); - CHECK(as2[0].as1[0].af[2], f++); - CHECK(as2[0].as1[1].f, f++); - CHECK(as2[0].as1[1].af[0], f++); - CHECK(as2[0].as1[1].af[1], f++); - CHECK(as2[0].as1[1].af[2], f++); - CHECK(as2[1].s1.f, f++); - CHECK(as2[1].s1.af[0], f++); - CHECK(as2[1].s1.af[1], f++); - CHECK(as2[1].s1.af[2], f++); - CHECK(as2[1].as1[0].f, f++); - CHECK(as2[1].as1[0].af[0], f++); - CHECK(as2[1].as1[0].af[1], f++); - CHECK(as2[1].as1[0].af[2], f++); - CHECK(as2[1].as1[1].f, f++); - CHECK(as2[1].as1[1].af[0], f++); - CHECK(as2[1].as1[1].af[1], f++); - CHECK(as2[1].as1[1].af[2], f++); - - if (failed) - color = vec4(1.0, 0.0, 0.0, 1.0); - else - color = vec4(0.0, 1.0, 0.0, 1.0); -} - -[test] -uniform float ref 137.035999074 -draw rect -1 -1 2 2 -probe all rgba 0.0 1.0 0.0 1.0