From patchwork Sun Sep 20 11:44:11 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: 53955 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id C677C22B04 for ; Sun, 20 Sep 2015 11:44:35 +0000 (UTC) Received: by lamp12 with SMTP id p12sf31684002lam.2 for ; Sun, 20 Sep 2015 04:44:34 -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:cc: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=WTFhT0NSUt3Rh7PDtkv1ETnZZ0rBBi8K1JrAByb/Za0=; b=hLyk8JoFI1j4aqBqsROs2rG/zA8UFhWn8Ur/UnPl51qRtYDFPayEPnxjKq6m1M3/p4 pwdVIfxscrbfXO72PAtM0oqIEErIzeL5LzV2r2xZRmC7exyM+EBYgi2EOgUCR7qXH3xt 1WyyYBhL6dABZ61A09JjOdfxtgYEbDuXwZyBiUAdfSB0yPdebvcg579kq2iMmGXXxBjO z7xSeUsNSTkS95hP2odfTfOvP253j6BZAvaIFVC5YUwM7k7enDCDfhTH55SiOPXMV9OD b/wlwYCls6XJ+M8G9VBapWuFpntJkLZazxZGrd6vBpQp+oz+nMbHa+lgKRQP08nKNk4G k74Q== X-Gm-Message-State: ALoCoQk/1fPCTgcfpLd69+7jPp1MZ24QFqL1ZZq8sVTUyVgA3YfH1OcUBwvXy4ojKf5Q+tCwaHH1 X-Received: by 10.152.21.42 with SMTP id s10mr2376884lae.9.1442749474789; Sun, 20 Sep 2015 04:44:34 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.163.101 with SMTP id yh5ls320064lab.97.gmail; Sun, 20 Sep 2015 04:44:34 -0700 (PDT) X-Received: by 10.152.7.106 with SMTP id i10mr5930882laa.114.1442749474553; Sun, 20 Sep 2015 04:44:34 -0700 (PDT) Received: from mail-lb0-x235.google.com (mail-lb0-x235.google.com. [2a00:1450:4010:c04::235]) by mx.google.com with ESMTPS id t4si12668170laa.7.2015.09.20.04.44.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Sep 2015 04:44:34 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::235 as permitted sender) client-ip=2a00:1450:4010:c04::235; Received: by lbbvu2 with SMTP id vu2so40262002lbb.0 for ; Sun, 20 Sep 2015 04:44:34 -0700 (PDT) X-Received: by 10.25.145.132 with SMTP id t126mr837294lfd.88.1442749474428; Sun, 20 Sep 2015 04:44:34 -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.59.35 with SMTP id w3csp1227971lbq; Sun, 20 Sep 2015 04:44:33 -0700 (PDT) X-Received: by 10.50.80.14 with SMTP id n14mr5634645igx.30.1442749473468; Sun, 20 Sep 2015 04:44:33 -0700 (PDT) Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id f11si13683031iod.99.2015.09.20.04.44.33; Sun, 20 Sep 2015 04:44:33 -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 CFEBC6E109; Sun, 20 Sep 2015 04:44:32 -0700 (PDT) X-Original-To: piglit@lists.freedesktop.org Delivered-To: piglit@lists.freedesktop.org Received: from nm6-vm2.bullet.mail.gq1.yahoo.com (nm6-vm2.bullet.mail.gq1.yahoo.com [98.136.218.193]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4AC796E109 for ; Sun, 20 Sep 2015 04:44:32 -0700 (PDT) Received: from [98.137.12.191] by nm6.bullet.mail.gq1.yahoo.com with NNFMP; 20 Sep 2015 11:44:32 -0000 Received: from [208.71.42.205] by tm12.bullet.mail.gq1.yahoo.com with NNFMP; 20 Sep 2015 11:44:32 -0000 Received: from [127.0.0.1] by smtp216.mail.gq1.yahoo.com with NNFMP; 20 Sep 2015 11:44:32 -0000 X-Yahoo-Newman-Id: 6789.1690.bm@smtp216.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: hBrXOL0VM1mmbLz3L1o_V6OgJmTfxpMflIVfImZtiisJ06b 714ASg68ALx8e77PyarEg_T7qOopM0xcjlhE39PbsXw_EnBf.0GS6qUTOetT YXWaXyyqO3W18zjyuDT4cWrI_uS7BBQUMhXQb2uCwQkUWdKGkE5dtZS4k5EZ IcRvSCuwfgemwj9Rx1w6V4N7Nt2d4YnpQ6EbBFeN6WZzqqRqraQve3WGu3Ws Qs68pM0utvAJfoW16l05PpbFt75_QgrywsPW8HeG8QLz1IZveKHaL7RpaIwH Eeu.Vb5dLEqHmoRYD9jLqyYHofJf7A3agwyJNUdMhD.V8GXngXaazNl4_POL kXakWx.Y4R0cPpt.LjR4QqhA8OHCsb9dPCRoKHQ6.ctG5vJPSSozunhWH5jO yKQ9ozB_YI9YNXmlXeKHmJVOAdK0sF.YbNgPNEdoT_uJsswfsmIObC0vKjEl GZIzWcU54WFnHPZ3D9LlIDHDNuAwD9YqXzfrOg4AiHM48sJ3gwhQAvNn2ezL sQhIBTlMSKTAKYhaWX7M6sK_YzJ71fCbfbkM- X-Yahoo-SMTP: 9BNlx.aswBAkr0D8mG_whiOP1dyU From: "'Timothy Arceri' via Patchwork Forward" To: piglit@lists.freedesktop.org Date: Sun, 20 Sep 2015 21:44:11 +1000 Message-Id: <1442749451-22117-2-git-send-email-t_arceri@yahoo.com.au> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1442749451-22117-1-git-send-email-t_arceri@yahoo.com.au> References: <1442749451-22117-1-git-send-email-t_arceri@yahoo.com.au> Cc: Ian Romanick Subject: [Piglit] [PATCH 2/2] arb_uniform_buffer_object: Remove unused field from test generatation script 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::235 as permitted sender) smtp.mailfrom=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 Cc: Ian Romanick --- generated_tests/random_ubo.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/generated_tests/random_ubo.py b/generated_tests/random_ubo.py index f6952d3..cae313a 100644 --- a/generated_tests/random_ubo.py +++ b/generated_tests/random_ubo.py @@ -791,7 +791,7 @@ def generate_test_vectors(fields, return test_vectors -def scalar_derp(type, name, offset, data): +def scalar_derp(type, name, data): """Return a GLSL code string to compare a scalar with its expected value.""" if type == "bool": if int(data) == 0: @@ -823,7 +823,7 @@ def scalar_derp(type, name, offset, data): raise Exception("Unknown scalar type {}".format(type)) -def vector_derp(type, name, offset, data): +def vector_derp(type, name, data): """Return a list of GLSL code strings that compare each field of a vector its expected value. """ @@ -832,12 +832,11 @@ def vector_derp(type, name, offset, data): return [scalar_derp(scalar, "{}.{}".format(name, "xyzw"[i]), - offset, data[i]) for i in xrange(vector_size(type))] -def matrix_derp(type, name, offset, data): +def matrix_derp(type, name, data): """Return a list of GLSL code strings that compare each field of a matrix its expected value. """ @@ -854,7 +853,6 @@ def matrix_derp(type, name, offset, data): data_pairs.extend(vector_derp( column_type, "{}[{}]".format(name, i), - offset, data[(i * r):(i * r) + r])) return data_pairs @@ -940,17 +938,14 @@ def generate_array_data_pairs(name, api_name, element_type, row_major, offset, p if isscalar(base_type): checkers.append(scalar_derp(base_type, name_with_index, - offset, data[0])) elif isvector(base_type): checkers.extend(vector_derp(base_type, name_with_index, - offset, data)) elif ismatrix(base_type): checkers.extend(matrix_derp(base_type, name_with_index, - offset, data)) def generate_data_pairs(uniform_blocks, packing): @@ -995,17 +990,14 @@ def generate_data_pairs(uniform_blocks, packing): if isscalar(m.GLSL_type): checkers.append(scalar_derp(m.GLSL_type, m.GLSL_name, - m.offset, data[0])) elif isvector(m.GLSL_type): checkers.extend(vector_derp(m.GLSL_type, m.GLSL_name, - m.offset, data)) elif ismatrix(m.GLSL_type): checkers.extend(matrix_derp(m.GLSL_type, m.GLSL_name, - m.offset, data)) return checkers, setters