From patchwork Sat Jun 14 12:35:54 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: 31891 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 914CF201EF for ; Sat, 14 Jun 2014 12:36:33 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id va2sf18984568obc.2 for ; Sat, 14 Jun 2014 05:36:33 -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=hrNizuGeR3XltC4/jKT2Oszt+WEKF2Ugl2WKAd3qEig=; b=EGnrzFD1LkVtWQNx0yoayCY2J4jMFW6FheLmYHGmB4BWkjfVu5oFX6WKzktKqbXceG 1SVrevMRcirjnnErR6bBnNP4TTy3IF7iu8KKmWuzr7rEo5MFzYpLmPcl9TMSoNHGfXei PgyuprzTX++EtKtYGLEhwPypr6zxIBKFhRayNIqi1IxtIaH7j+b/1u0859vWp1Ci3oCx yFdQ5thgjcaETLI8yRTW+of7yiPthEUT4TpFuWhNJSp0ATwaKYDcUlTzHwk0ePxEvAyK yC7NP1LythJCzwg9MhMWlXtzOvn/5B6dttDiL582+lgptDGsYJKZ59BOb1vZ4rYRQr3b WJRw== X-Gm-Message-State: ALoCoQlLAojTjHKAoNIlAs7iE3CLg6A+ATJ9LbqIFNs8ZewUk8mu1ez5DbKiQUdlrsqUVF+rgv8S X-Received: by 10.182.135.167 with SMTP id pt7mr1614996obb.14.1402749392818; Sat, 14 Jun 2014 05:36:32 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.50 with SMTP id i47ls3931509qgd.38.gmail; Sat, 14 Jun 2014 05:36:32 -0700 (PDT) X-Received: by 10.52.130.18 with SMTP id oa18mr44280vdb.78.1402749392705; Sat, 14 Jun 2014 05:36:32 -0700 (PDT) Received: from mail-ve0-x230.google.com (mail-ve0-x230.google.com [2607:f8b0:400c:c01::230]) by mx.google.com with ESMTPS id h18si2321775vdg.75.2014.06.14.05.36.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 14 Jun 2014 05:36:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c01::230 as permitted sender) client-ip=2607:f8b0:400c:c01::230; Received: by mail-ve0-f176.google.com with SMTP id db12so4385406veb.7 for ; Sat, 14 Jun 2014 05:36:32 -0700 (PDT) X-Received: by 10.52.93.201 with SMTP id cw9mr45144vdb.80.1402749392592; Sat, 14 Jun 2014 05:36:32 -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 vs6csp20536vcb; Sat, 14 Jun 2014 05:36:32 -0700 (PDT) X-Received: by 10.66.251.233 with SMTP id zn9mr10695744pac.67.1402749391586; Sat, 14 Jun 2014 05:36:31 -0700 (PDT) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id pt4si5158278pbc.159.2014.06.14.05.36.31 for ; Sat, 14 Jun 2014 05:36:31 -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 006E36E12A; Sat, 14 Jun 2014 05:36:31 -0700 (PDT) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from nm15.bullet.mail.bf1.yahoo.com (nm15.bullet.mail.bf1.yahoo.com [98.139.212.174]) by gabe.freedesktop.org (Postfix) with ESMTP id 43BF86E12A for ; Sat, 14 Jun 2014 05:36:29 -0700 (PDT) Received: from [98.139.215.142] by nm15.bullet.mail.bf1.yahoo.com with NNFMP; 14 Jun 2014 12:36:28 -0000 Received: from [68.142.230.73] by tm13.bullet.mail.bf1.yahoo.com with NNFMP; 14 Jun 2014 12:36:28 -0000 Received: from [127.0.0.1] by smtp230.mail.bf1.yahoo.com with NNFMP; 14 Jun 2014 12:36:28 -0000 X-Yahoo-Newman-Id: 565078.78592.bm@smtp230.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: w.vYPA8VM1l2V0A.Xk.VkEPEbVSkQdZDx.TvoL_X0Umf0BZ 2.Y8AofLy_74R12GRw55eVQVGXFPzonG9xggMBuGqAHTFf3aYsJsrwW3zW4I BynIFKhgjz6OiMedjE4zyQb6bdQan1inSMsw14UQHry6vf4uJszJNfVTpJwU UioTqeaVLrCS2Tgq2lBsrJGnZGFKJ.4uTkFu9Or8dWe5dQZM4YShxG2QaT_Y 3.T09SYNxl5Ydcol.LD3uoljc6Vn3MhPf_ouG.qNl6e9VFNPBvhlEQUGSAZR cnext3AZUYjEy8uNKQN9xb1OMcPnC8UHgvxBfbM0PkpqWQ2_WDiVlV9CmH7o MSCY7pPMcvs7emQOUiF9iZ3hQdFZhahaTblFLGj4BjkzYwPiTnjmnX55r6uP ImRP2KHOKEMSa4MHxUbuk2PzZOKgKmrTSnfiE.a6G6cAuPejQ0ED0vUYlnkf UKP6.orq4JPS3wGJ4LfihOubRZKSQ6Cw4zti6zpspRVWMpSYwOVEkd6ir1y_ Rqx1rfGBJAPxFb6BkO.YhDb6T X-Yahoo-SMTP: 9BNlx.aswBAkr0D8mG_whiOP1dyU X-Rocket-Received: from localhost.localdomain (t_arceri@60.240.113.240 with plain [98.139.211.125]) by smtp230.mail.bf1.yahoo.com with SMTP; 14 Jun 2014 12:36:28 +0000 UTC From: "'Timothy Arceri' via Patchwork Forward" To: piglit@lists.freedesktop.org Date: Sat, 14 Jun 2014 22:35:54 +1000 Message-Id: <1402749361-11643-3-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 02/11] arb_arrays_of_arrays: add more initializer 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::230 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 initializer-dec-list-type-array-array-var1-var2.vert AMD: pass Intel: pass initializer-dec-list-type-array-var1-array-var2-array.vert AMD: pass Intel: pass initializer-dec-list-type-var1-array-array-var2-array-array.vert AMD: pass Intel: pass initializer-struct-field-array-array-var.vert AMD: pass Nvida: pass Intel: pass initializer-struct-field-array-var-array.vert AMD: pass Nvida: pass Intel: pass initializer-struct-field-array-var-array2.vert AMD: pass Intel: pass initializer-struct-field-dec-list-array-array-var1-var2.vert AMD: pass Intel: pass initializer-struct-field-dec-list-array-var1-array-var2.vert AMD: pass Intel: pass initializer-struct-field-dec-list-array-var1-var2-array.vert AMD: pass Intel: pass initializer-struct-field-var-array-array.vert AMD: pass Nvida: pass Intel: pass initializer-three-dimensions.vert AMD: pass Nvida: pass Intel: pass initializer-three-dimensions2.vert AMD: pass Nvida: pass Intel: pass Signed-off-by: Timothy Arceri --- ...alizer-dec-list-type-array-array-var1-var2.vert | 43 +++++++++++++++++++ ...-dec-list-type-array-var1-array-var2-array.vert | 47 +++++++++++++++++++++ ...ist-type-var1-array-array-var2-array-array.vert | 43 +++++++++++++++++++ .../initializer-struct-field-array-array-var.vert | 34 +++++++++++++++ .../initializer-struct-field-array-var-array.vert | 34 +++++++++++++++ .../initializer-struct-field-array-var-array2.vert | 34 +++++++++++++++ ...truct-field-dec-list-array-array-var1-var2.vert | 48 ++++++++++++++++++++++ ...truct-field-dec-list-array-var1-array-var2.vert | 38 +++++++++++++++++ ...truct-field-dec-list-array-var1-var2-array.vert | 38 +++++++++++++++++ .../initializer-struct-field-var-array-array.vert | 34 +++++++++++++++ .../compiler/initializer-three-dimensions.vert | 22 ++++++++++ .../compiler/initializer-three-dimensions2.vert | 22 ++++++++++ 12 files changed, 437 insertions(+) create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-dec-list-type-array-array-var1-var2.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-dec-list-type-array-var1-array-var2-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-dec-list-type-var1-array-array-var2-array-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-array-array-var.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-array-var-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-array-var-array2.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-dec-list-array-array-var1-var2.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-dec-list-array-var1-array-var2.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-dec-list-array-var1-var2-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-var-array-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-three-dimensions.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-three-dimensions2.vert diff --git a/tests/spec/arb_arrays_of_arrays/compiler/initializer-dec-list-type-array-array-var1-var2.vert b/tests/spec/arb_arrays_of_arrays/compiler/initializer-dec-list-type-array-array-var1-var2.vert new file mode 100644 index 0000000..287fadd --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/initializer-dec-list-type-array-array-var1-var2.vert @@ -0,0 +1,43 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * require_extensions: GL_ARB_shading_language_420pack + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +#extension GL_ARB_shading_language_420pack: enable + +void main() +{ + vec4[3][2] a = { + { + vec4(1.0), // a[0][0] + vec4(1.0) // a[0][1] + }, + { + vec4(1.0), // a[1][0] + vec4(1.0) // a[1][1] + }, + { + vec4(1.0), // a[2][0] + vec4(1.0) // a[2][1] + } + }, b = { + { + vec4(1.0), // b[0][0] + vec4(1.0) // b[0][1] + }, + { + vec4(1.0), // b[1][0] + vec4(1.0) // b[1][1] + }, + { + vec4(1.0), // b[2][0] + vec4(1.0) // b[2][1] + } + }; // b + + gl_Position = b[2][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/initializer-dec-list-type-array-var1-array-var2-array.vert b/tests/spec/arb_arrays_of_arrays/compiler/initializer-dec-list-type-array-var1-array-var2-array.vert new file mode 100644 index 0000000..844081a --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/initializer-dec-list-type-array-var1-array-var2-array.vert @@ -0,0 +1,47 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * require_extensions: GL_ARB_shading_language_420pack + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +#extension GL_ARB_shading_language_420pack: enable + +void main() +{ + vec4[2] a[4] = { + { + vec4(1.0), // a[0][0] + vec4(1.0) // a[0][1] + }, + { + vec4(1.0), // a[1][0] + vec4(1.0) // a[1][1] + }, + { + vec4(1.0), // a[2][0] + vec4(1.0) // a[2][1] + }, + { + vec4(1.0), // a[3][0] + vec4(1.0) // a[3][1] + } + }, b[3] = { + { + vec4(1.0), // b[0][0] + vec4(1.0) // b[0][1] + }, + { + vec4(1.0), // b[1][0] + vec4(1.0) // b[1][1] + }, + { + vec4(1.0), // b[2][0] + vec4(1.0) // b[2][1] + } + }; // b + + gl_Position = b[2][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/initializer-dec-list-type-var1-array-array-var2-array-array.vert b/tests/spec/arb_arrays_of_arrays/compiler/initializer-dec-list-type-var1-array-array-var2-array-array.vert new file mode 100644 index 0000000..c7c97e4 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/initializer-dec-list-type-var1-array-array-var2-array-array.vert @@ -0,0 +1,43 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * require_extensions: GL_ARB_shading_language_420pack + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +#extension GL_ARB_shading_language_420pack: enable + +void main() +{ + vec4 a[3][2] = { + { + vec4(1.0), // a[0][0] + vec4(1.0) // a[0][1] + }, + { + vec4(1.0), // a[1][0] + vec4(1.0) // a[1][1] + }, + { + vec4(1.0), // a[2][0] + vec4(1.0) // a[2][1] + } + }, b[3][2] = { + { + vec4(1.0), // b[0][0] + vec4(1.0) // b[0][1] + }, + { + vec4(1.0), // b[1][0] + vec4(1.0) // b[1][1] + }, + { + vec4(1.0), // b[2][0] + vec4(1.0) // b[2][1] + } + }; // b + + gl_Position = b[2][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-array-array-var.vert b/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-array-array-var.vert new file mode 100644 index 0000000..1d0cedf --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-array-array-var.vert @@ -0,0 +1,34 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * require_extensions: GL_ARB_shading_language_420pack + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +#extension GL_ARB_shading_language_420pack: enable + +void main() +{ + struct { + vec4[3][2] a; + } aggregate = { + { + { + {1.0, 2.0, 3.0, 4.0}, // a[0][0] + {5.0, 6.0, 7.0, 8.0} // a[0][1] + }, // a[0] + { + {1.0, 2.0, 3.0, 4.0}, // a[1][0] + {5.0, 6.0, 7.0, 8.0} // a[1][1] + }, // a[1] + { + {1.0, 2.0, 3.0, 4.0}, // a[2][0] + {5.0, 6.0, 7.0, 8.0} // a[2][1] + } // a[2] + } + }; + + gl_Position = aggregate.a[2][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-array-var-array.vert b/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-array-var-array.vert new file mode 100644 index 0000000..5afc308 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-array-var-array.vert @@ -0,0 +1,34 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * require_extensions: GL_ARB_shading_language_420pack + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +#extension GL_ARB_shading_language_420pack: enable + +void main() +{ + struct { + vec4[2] a[3]; + } aggregate = { + { + { + {1.0, 2.0, 3.0, 4.0}, // a[0][0] + {5.0, 6.0, 7.0, 8.0} // a[0][1] + }, // a[0] + { + {1.0, 2.0, 3.0, 4.0}, // a[1][0] + {5.0, 6.0, 7.0, 8.0} // a[1][1] + }, // a[1] + { + {1.0, 2.0, 3.0, 4.0}, // a[2][0] + {5.0, 6.0, 7.0, 8.0} // a[2][1] + } // a[2] + } + }; + + gl_Position = aggregate.a[2][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-array-var-array2.vert b/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-array-var-array2.vert new file mode 100644 index 0000000..15e24ce --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-array-var-array2.vert @@ -0,0 +1,34 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * require_extensions: GL_ARB_shading_language_420pack + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +#extension GL_ARB_shading_language_420pack: enable + +void main() +{ + struct { + vec4[2] a[3]; + } aggregate = { + { + { + vec4(1.0), // a[0][0] + vec4(1.0) // a[0][1] + }, // a[0] + { + vec4(1.0), // a[1][0] + vec4(1.0) // a[1][1] + }, // a[1] + { + vec4(1.0), // a[2][0] + vec4(1.0) // a[2][1] + } // a[2] + } + }; + + gl_Position = aggregate.a[2][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-dec-list-array-array-var1-var2.vert b/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-dec-list-array-array-var1-var2.vert new file mode 100644 index 0000000..b0abb4a --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-dec-list-array-array-var1-var2.vert @@ -0,0 +1,48 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * require_extensions: GL_ARB_shading_language_420pack + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +#extension GL_ARB_shading_language_420pack: enable + +void main() +{ + struct { + vec4[3][2] a, b; + } aggregate = { + { + { + {1.0, 2.0, 3.0, 4.0}, // a[0][0] + {5.0, 6.0, 7.0, 8.0} // a[0][1] + }, // a[0] + { + {1.0, 2.0, 3.0, 4.0}, // a[1][0] + {5.0, 6.0, 7.0, 8.0} // a[1][1] + }, // a[1] + { + {1.0, 2.0, 3.0, 4.0}, // a[2][0] + {5.0, 6.0, 7.0, 8.0} // a[2][1] + } // a[2] + }, // a + { + { + {1.0, 2.0, 3.0, 4.0}, // b[0][0] + {5.0, 6.0, 7.0, 8.0} // b[0][1] + }, // b[0] + { + {1.0, 2.0, 3.0, 4.0}, // b[1][0] + {5.0, 6.0, 7.0, 8.0} // b[1][1] + }, // b[1] + { + {1.0, 2.0, 3.0, 4.0}, // b[2][0] + {5.0, 6.0, 7.0, 8.0} // b[2][1] + } // b[2] + } // b + }; + + gl_Position = aggregate.a[2][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-dec-list-array-var1-array-var2.vert b/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-dec-list-array-var1-array-var2.vert new file mode 100644 index 0000000..782349b --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-dec-list-array-var1-array-var2.vert @@ -0,0 +1,38 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * require_extensions: GL_ARB_shading_language_420pack + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +#extension GL_ARB_shading_language_420pack: enable + +void main() +{ + struct { + vec4[2] a[3], b; + } aggregate = { + { + { + {1.0, 2.0, 3.0, 4.0}, // a[0][0] + {5.0, 6.0, 7.0, 8.0} // a[0][1] + }, // a[0] + { + {1.0, 2.0, 3.0, 4.0}, // a[1][0] + {5.0, 6.0, 7.0, 8.0} // a[1][1] + }, // a[1] + { + {1.0, 2.0, 3.0, 4.0}, // a[2][0] + {5.0, 6.0, 7.0, 8.0} // a[2][1] + } // a[2] + }, // a + { + { 1.0, 2.0, 3.0, 4.0 }, // b[0] + { 1.0, 2.0, 3.0, 4.0 } // b[1] + } + }; + + gl_Position = aggregate.a[2][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-dec-list-array-var1-var2-array.vert b/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-dec-list-array-var1-var2-array.vert new file mode 100644 index 0000000..6663337 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-dec-list-array-var1-var2-array.vert @@ -0,0 +1,38 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * require_extensions: GL_ARB_shading_language_420pack + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +#extension GL_ARB_shading_language_420pack: enable + +void main() +{ + struct { + vec4[2] b, a[3]; + } aggregate = { + { + { 1.0, 2.0, 3.0, 4.0 }, // b[0] + { 1.0, 2.0, 3.0, 4.0 } // b[1] + }, + { + { + {1.0, 2.0, 3.0, 4.0}, // a[0][0] + {5.0, 6.0, 7.0, 8.0} // a[0][1] + }, // a[0] + { + {1.0, 2.0, 3.0, 4.0}, // a[1][0] + {5.0, 6.0, 7.0, 8.0} // a[1][1] + }, // a[1] + { + {1.0, 2.0, 3.0, 4.0}, // a[2][0] + {5.0, 6.0, 7.0, 8.0} // a[2][1] + } // a[2] + } // a + }; + + gl_Position = aggregate.a[2][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-var-array-array.vert b/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-var-array-array.vert new file mode 100644 index 0000000..72ccacf --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/initializer-struct-field-var-array-array.vert @@ -0,0 +1,34 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * require_extensions: GL_ARB_shading_language_420pack + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +#extension GL_ARB_shading_language_420pack: enable + +void main() +{ + struct { + vec4 a[3][2]; + } aggregate = { + { + { + {1.0, 2.0, 3.0, 4.0}, // a[0][0] + {5.0, 6.0, 7.0, 8.0} // a[0][1] + }, // a[0] + { + {1.0, 2.0, 3.0, 4.0}, // a[1][0] + {5.0, 6.0, 7.0, 8.0} // a[1][1] + }, // a[1] + { + {1.0, 2.0, 3.0, 4.0}, // a[2][0] + {5.0, 6.0, 7.0, 8.0} // a[2][1] + } // a[2] + } + }; + + gl_Position = aggregate.a[2][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/initializer-three-dimensions.vert b/tests/spec/arb_arrays_of_arrays/compiler/initializer-three-dimensions.vert new file mode 100644 index 0000000..a0e06a6 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/initializer-three-dimensions.vert @@ -0,0 +1,22 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * require_extensions: GL_ARB_shading_language_420pack + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +#extension GL_ARB_shading_language_420pack: enable + +void main() +{ + vec4 a[3][2][4] = {vec4[2][4](vec4[4](vec4(0.0), vec4(1.0), vec4(0.0), vec4(1.0)), + vec4[4](vec4(0.0), vec4(1.0), vec4(0.0), vec4(1.0))), + vec4[2][4](vec4[4](vec4(0.0), vec4(1.0), vec4(0.0), vec4(1.0)), + vec4[4](vec4(0.0), vec4(1.0), vec4(0.0), vec4(1.0))), + vec4[2][4](vec4[4](vec4(0.0), vec4(1.0), vec4(0.0), vec4(1.0)), + vec4[4](vec4(0.0), vec4(1.0), vec4(0.0), vec4(1.0)))}; + + gl_Position = a[2][1][1]; +} diff --git a/tests/spec/arb_arrays_of_arrays/compiler/initializer-three-dimensions2.vert b/tests/spec/arb_arrays_of_arrays/compiler/initializer-three-dimensions2.vert new file mode 100644 index 0000000..03a1e83 --- /dev/null +++ b/tests/spec/arb_arrays_of_arrays/compiler/initializer-three-dimensions2.vert @@ -0,0 +1,22 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.20 + * require_extensions: GL_ARB_arrays_of_arrays + * require_extensions: GL_ARB_shading_language_420pack + * [end config] + */ +#version 120 +#extension GL_ARB_arrays_of_arrays: enable +#extension GL_ARB_shading_language_420pack: enable + +void main() +{ + vec4 a[3][2][4] = {{vec4[4](vec4(0.0), vec4(1.0), vec4(0.0), vec4(1.0)), + vec4[4](vec4(0.0), vec4(1.0), vec4(0.0), vec4(1.0))}, + {vec4[4](vec4(0.0), vec4(1.0), vec4(0.0), vec4(1.0)), + vec4[4](vec4(0.0), vec4(1.0), vec4(0.0), vec4(1.0))}, + {vec4[4](vec4(0.0), vec4(1.0), vec4(0.0), vec4(1.0)), + vec4[4](vec4(0.0), vec4(1.0), vec4(0.0), vec4(1.0))}}; + + gl_Position = a[2][1][1]; +}