From patchwork Sat Jun 14 12:38:14 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: 31899 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 32DA0201EF for ; Sat, 14 Jun 2014 12:38:37 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id ma3sf12284511pbc.3 for ; Sat, 14 Jun 2014 05:38:37 -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:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:reply-to :content-type:content-transfer-encoding; bh=e7zzOKt5t30h+SuSgTEzVlZoEnzddU3HbNu3CfdkiMU=; b=YlY+hq/vv6uZH8JHE5ufUtqQMvmFUk3mQExwQH86IZg0tWV+6rvOrSRRqSw4MJtRq4 xdcxKMM+r++YuyKO81beqs50YyFNLmyphaU3P9/IXHZREPZOwR++gdPHj5gakxrKl3DZ ebTWJvEQ1qs4FmGjuquFlL/yWTc5UDijWDPTNzb+aD6Jl9wN8dwgv5LlHlR17iXJZ7C0 rSy27IrYh3wRuBCHpa0sZhnAa9KUBbjeaotMSZAkpdUGuOqiVIelZL9piFg0eEqc7jSj BuSNdpC146JgoACZjKseqk1UuYSivnPIcIeNwQaYScf0sB0D7SAreI2qMPqFLfkv9jWL w48w== X-Gm-Message-State: ALoCoQmWxXm+zDXLYidAUWCppy6UQyKJ3Cc2XkrK4lf1rQhqs9fRE57Q5loavQM0qKr33rEwpIHq X-Received: by 10.67.23.41 with SMTP id hx9mr713856pad.8.1402749517004; Sat, 14 Jun 2014 05:38:37 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.50 with SMTP id i47ls3931737qgd.38.gmail; Sat, 14 Jun 2014 05:38:36 -0700 (PDT) X-Received: by 10.58.195.172 with SMTP id if12mr6830071vec.12.1402749516882; Sat, 14 Jun 2014 05:38:36 -0700 (PDT) Received: from mail-ve0-x22b.google.com (mail-ve0-x22b.google.com [2607:f8b0:400c:c01::22b]) by mx.google.com with ESMTPS id y15si2327364vei.82.2014.06.14.05.38.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 14 Jun 2014 05:38:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c01::22b as permitted sender) client-ip=2607:f8b0:400c:c01::22b; Received: by mail-ve0-f171.google.com with SMTP id jz11so4429585veb.16 for ; Sat, 14 Jun 2014 05:38:36 -0700 (PDT) X-Received: by 10.58.29.234 with SMTP id n10mr6845340veh.16.1402749516774; Sat, 14 Jun 2014 05:38:36 -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.221.54.6 with SMTP id vs6csp20641vcb; Sat, 14 Jun 2014 05:38:36 -0700 (PDT) X-Received: by 10.68.95.225 with SMTP id dn1mr10642074pbb.126.1402749515860; Sat, 14 Jun 2014 05:38:35 -0700 (PDT) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id xl4si7858926pab.5.2014.06.14.05.38.35 for ; Sat, 14 Jun 2014 05:38:35 -0700 (PDT) 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 2F2136E11B; Sat, 14 Jun 2014 05:38:35 -0700 (PDT) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from nm45-vm7.bullet.mail.bf1.yahoo.com (nm45-vm7.bullet.mail.bf1.yahoo.com [216.109.115.78]) by gabe.freedesktop.org (Postfix) with ESMTP id 78CF56E11B for ; Sat, 14 Jun 2014 05:38:33 -0700 (PDT) Received: from [98.139.212.149] by nm45.bullet.mail.bf1.yahoo.com with NNFMP; 14 Jun 2014 12:38:32 -0000 Received: from [68.142.230.64] by tm6.bullet.mail.bf1.yahoo.com with NNFMP; 14 Jun 2014 12:38:32 -0000 Received: from [127.0.0.1] by smtp221.mail.bf1.yahoo.com with NNFMP; 14 Jun 2014 12:38:32 -0000 X-Yahoo-Newman-Id: 547526.37761.bm@smtp221.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Ft1gje0VM1mnixzzxJ.x9BSIW23JzC2ZfzGlJ3glKZQRq5C TBXoT94.zRQ33SksVoAoMi.PqS4Zg_TS6CBSLjFwLQYAppq3Oi4XDoOioeFw LNSZzJXh..lyvL0LEhXVH_RoXqfYA9sUujW4Ngs1HK.Fsf7RhMJIGDMEhkyj AqfRwS.hO0sa2EubcLfkioT31hq7_lbmzWcTSLGEzTII5oTDIsCg9wiV5FPr Asd3StWNZoVi2gE4ua1H.eb0B6.me5sEDNhPo6GIN7lhebH_RHp12PbhsL.m iuRhEH3QBshCGRox3PKK.FGyvjjFNLs8EW13l_o8_gYdxL_WApQG8xNNOlFn wLFbrj2LpZIuN0gUDqIdBVn3NonTBdl82jwVFp3ZXzUL1Rkl.i.nCDW0G3Qe 5_y45QJiUqK078O6jnbaxlbJx4DxUEqA5o1S7llHMSIAvFWODIVep7LCZBTe BS0TEacK.tbmWXIsg46si0NAXVTdaWM1T.yjfHZ_Fdh6PaKEnkaAYDd_OgLN .CXqOI2laXb5T8D.DritwmekaK.o- X-Yahoo-SMTP: 9BNlx.aswBAkr0D8mG_whiOP1dyU X-Rocket-Received: from localhost.localdomain (t_arceri@60.240.113.240 with plain [98.138.105.21]) by smtp221.mail.bf1.yahoo.com with SMTP; 14 Jun 2014 12:38:32 +0000 UTC From: "'Timothy Arceri' via Patchwork Forward" To: piglit@lists.freedesktop.org Date: Sat, 14 Jun 2014 22:38:14 +1000 Message-Id: <1402749495-11964-1-git-send-email-t_arceri@yahoo.com.au> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1402749361-11643-1-git-send-email-t_arceri@yahoo.com.au> References: <1402749361-11643-1-git-send-email-t_arceri@yahoo.com.au> Subject: [Piglit] [PATCH V4 10/11] arb_arrays_of_arrays: assignment tests X-BeenThere: piglit@lists.freedesktop.org X-Mailman-Version: 2.1.15 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 2607:f8b0:400c:c01::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 Test results are from the following hardware/driver combinations: AMD Radeon HD 6670 - Catalyst 13.251 OpenGL 4.3 Nvidia GeForce 210 - NVIDIA 331.20 OpenGL 3.3 Intel Ivy Bridge - Mesa 10.1(815e064) with ARB_arrays_of_arrays enabled assigment-invalid-implicit-sized.vert AMD: fail Nvida: fail Intel: pass assignment-1d-to-3d.vert AMD: pass Nvida: pass Intel: pass assignment-2d-to-3d-from-3d.vert AMD: pass Nvida: pass Intel: pass assignment-2d-to-3d.vert AMD: pass Nvida: pass Intel: pass assignment-array-array-var-array.vert AMD: pass Nvida: pass Intel: pass assignment-invalid-1d-to-3d.vert AMD: pass Intel: pass Signed-off-by: Timothy Arceri --- .../compiler/assignment-1d-to-3d.vert | 18 ++++++++++++++ .../compiler/assignment-2d-to-3d-from-3d.vert | 18 ++++++++++++++ .../compiler/assignment-2d-to-3d.vert | 18 ++++++++++++++ .../compiler/assignment-array-array-var-array.vert | 16 +++++++++++++ .../compiler/assignment-invalid-1d-to-3d.vert | 18 ++++++++++++++ .../assignment-invalid-implicit-sized.vert | 28 ++++++++++++++++++++++ 6 files changed, 116 insertions(+) create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/assignment-1d-to-3d.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/assignment-2d-to-3d-from-3d.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/assignment-2d-to-3d.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/assignment-array-array-var-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/assignment-invalid-1d-to-3d.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/assignment-invalid-implicit-sized.vert diff --git a/tests/spec/arb_arrays_of_arrays/compiler/assignment-1d-to-3d.vert b/tests/spec/arb_arrays_of_arrays/compiler/assignment-1d-to-3d.vert new file mode 100644 index 0000000..8addbbf --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/assignment-1d-to-3d.vert @@ -0,0 +1,18 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable + +void main() +{ + vec4 a[4]; + vec4[2][4] b[3]; + + b[2][1] = a; + + gl_Position = b[0][1][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/assignment-2d-to-3d-from-3d.vert b/tests/spec/arb_arrays_of_arrays/compiler/assignment-2d-to-3d-from-3d.vert new file mode 100644 index 0000000..8cc3640 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/assignment-2d-to-3d-from-3d.vert @@ -0,0 +1,18 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable + +void main() +{ + vec4 a[4][2][4]; + vec4[2][4] b[3]; + + b[0] = a[2]; + + gl_Position = b[0][1][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/assignment-2d-to-3d.vert b/tests/spec/arb_arrays_of_arrays/compiler/assignment-2d-to-3d.vert new file mode 100644 index 0000000..34037ec --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/assignment-2d-to-3d.vert @@ -0,0 +1,18 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable + +void main() +{ + vec4 a[2][4]; + vec4[2][4] b[3]; + + b[0] = a; + + gl_Position = b[0][1][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/assignment-array-array-var-array.vert b/tests/spec/arb_arrays_of_arrays/compiler/assignment-array-array-var-array.vert new file mode 100644 index 0000000..a8e3b4b --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/assignment-array-array-var-array.vert @@ -0,0 +1,16 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable + +void main() +{ + vec4 a[3][2][4]; + vec4[2][4] b[3] = a; + + gl_Position = a[2][1][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/assignment-invalid-1d-to-3d.vert b/tests/spec/arb_arrays_of_arrays/compiler/assignment-invalid-1d-to-3d.vert new file mode 100644 index 0000000..62fcbdb --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/assignment-invalid-1d-to-3d.vert @@ -0,0 +1,18 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable + +void main() +{ + vec4 a[4]; + vec4[2][4] b[3]; + + b = a; + + gl_Position = b[0][1][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/assignment-invalid-implicit-sized.vert b/tests/spec/arb_arrays_of_arrays/compiler/assignment-invalid-implicit-sized.vert new file mode 100644 index 0000000..1458aa6 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/assignment-invalid-implicit-sized.vert @@ -0,0 +1,28 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * [end config] + * + * From page 20 (page 26 of the PDF) of the GLSL 1.20 spec: + * + * "However, implicitly sized arrays cannot be assigned to. Note, this is + * a rare case that initializers and assignments appear to have different + * semantics." + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable + +void main() +{ + float [][3] an_array; + float [3][3] an_array2; + + an_array[0][2] = 0.0; + an_array[1][2] = 1.0; + an_array[2][2] = 2.0; + + an_array = an_array2; + + gl_Position = vec4(an_array[2][2]); +}