From patchwork Tue Feb 5 20:59:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Gall X-Patchwork-Id: 14576 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3ED4323E39 for ; Tue, 5 Feb 2013 21:00:25 +0000 (UTC) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by fiordland.canonical.com (Postfix) with ESMTP id C4B60A18314 for ; Tue, 5 Feb 2013 21:00:24 +0000 (UTC) Received: by mail-vc0-f169.google.com with SMTP id n10so378956vcn.28 for ; Tue, 05 Feb 2013 13:00:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=tIaGa1kgCffOqbLTiy9+zU35Bg2ujFZ9DfHZOSOpiug=; b=IzzKXw6DIOjodOx7KhPnOEMQOU9SoQLVm84nEUzc9qkN7QyQNBLdUkcRcXVVFT3pfC qlBvisLW13pLX2sRv2hkqoQiituvdeFSaeOI63Id2fma27QU0sax4Wfe4yLq8XkhGABL 7h3vR3ZpljST7SPJM3FS9o24WUwhy1zbomzTZwaw+EOpHpvxdYIyHW6pmUvwItDkgHsY Clmmc+aG4UTcL0Qy+wWxiVzSsKqx/7JLQNdu/U3wJIkqcZnQqbwONQdQmrIz20NWZ3AT XGZsSvds6OA/pkbrRrxsCJrBXbe/pCfu552e7CPEl4Z4JppOOHjUmCK03L7MHL29Nv8N qbYw== X-Received: by 10.52.21.146 with SMTP id v18mr25695068vde.79.1360098024244; Tue, 05 Feb 2013 13:00:24 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.252.8 with SMTP id zo8csp147025vec; Tue, 5 Feb 2013 13:00:23 -0800 (PST) X-Received: by 10.50.222.195 with SMTP id qo3mr1027174igc.14.1360098023369; Tue, 05 Feb 2013 13:00:23 -0800 (PST) Received: from mail-ie0-x229.google.com (ie-in-x0229.1e100.net [2607:f8b0:4001:c03::229]) by mx.google.com with ESMTPS id kh8si245612igc.71.2013.02.05.13.00.23 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Feb 2013 13:00:23 -0800 (PST) Received-SPF: neutral (google.com: 2607:f8b0:4001:c03::229 is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) client-ip=2607:f8b0:4001:c03::229; Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:4001:c03::229 is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) smtp.mail=tom.gall@linaro.org Received: by mail-ie0-f169.google.com with SMTP id 13so894983iea.0 for ; Tue, 05 Feb 2013 13:00:23 -0800 (PST) X-Received: by 10.50.181.134 with SMTP id dw6mr823065igc.68.1360098022912; Tue, 05 Feb 2013 13:00:22 -0800 (PST) Received: from localhost.localdomain ([70.35.96.184]) by mx.google.com with ESMTPS id k5sm24475076igq.9.2013.02.05.13.00.22 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Feb 2013 13:00:22 -0800 (PST) From: Tom Gall To: piglit@lists.freedesktop.org Cc: patches@linaro.org, Tom Gall Subject: [PATCH 2/2] glsl2: add builtin-functions-100.vert Date: Tue, 5 Feb 2013 14:59:59 -0600 Message-Id: <1360098000-21267-2-git-send-email-tom.gall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360098000-21267-1-git-send-email-tom.gall@linaro.org> References: <1360098000-21267-1-git-send-email-tom.gall@linaro.org> X-Gm-Message-State: ALoCoQkJcjjmsPSHoY1eeeoIlEIVcEvcO4uaPSAI/ZZ/sJnwq4Z3dB1nxtdCwFBrKt6h9VdMQk6h Adds new output of gen_builtin_test.py creating builtin-fuctions-100.vert. Signed-off-by: Tom Gall --- .../glsl2/builtin-functions-100.vert | 266 ++++++++++++++++++++ 1 file changed, 266 insertions(+) create mode 100644 tests/glslparsertest/glsl2/builtin-functions-100.vert diff --git a/tests/glslparsertest/glsl2/builtin-functions-100.vert b/tests/glslparsertest/glsl2/builtin-functions-100.vert new file mode 100644 index 0000000..94b5966 --- /dev/null +++ b/tests/glslparsertest/glsl2/builtin-functions-100.vert @@ -0,0 +1,266 @@ +/* PASS */ +#version 100 + +uniform float u_float; +uniform vec2 u_vec2; +uniform vec3 u_vec3; +uniform vec4 u_vec4; +uniform ivec2 u_ivec2; +uniform ivec3 u_ivec3; +uniform ivec4 u_ivec4; +uniform bvec2 u_bvec2; +uniform bvec3 u_bvec3; +uniform bvec4 u_bvec4; +uniform mat2 u_mat2; +uniform mat3 u_mat3; +uniform mat4 u_mat4; + +void main() +{ + gl_Position = vec4(0.0); + + float t_float = float(0.0); + bool t_bool = false; + vec2 t_vec2 = vec2 (0.0); + bvec2 t_bvec2 = bvec2(0.0); + mat2 t_mat2 = mat2 (0.0); + vec3 t_vec3 = vec3 (0.0); + bvec3 t_bvec3 = bvec3(0.0); + mat3 t_mat3 = mat3 (0.0); + vec4 t_vec4 = vec4 (0.0); + bvec4 t_bvec4 = bvec4(0.0); + mat4 t_mat4 = mat4 (0.0); + + t_float += radians(u_float); + t_vec2 += radians(u_vec2); + t_vec3 += radians(u_vec3); + t_vec4 += radians(u_vec4); + t_float += degrees(u_float); + t_vec2 += degrees(u_vec2); + t_vec3 += degrees(u_vec3); + t_vec4 += degrees(u_vec4); + t_float += sin(u_float); + t_vec2 += sin(u_vec2); + t_vec3 += sin(u_vec3); + t_vec4 += sin(u_vec4); + t_float += cos(u_float); + t_vec2 += cos(u_vec2); + t_vec3 += cos(u_vec3); + t_vec4 += cos(u_vec4); + t_float += tan(u_float); + t_vec2 += tan(u_vec2); + t_vec3 += tan(u_vec3); + t_vec4 += tan(u_vec4); + t_float += asin(u_float); + t_vec2 += asin(u_vec2); + t_vec3 += asin(u_vec3); + t_vec4 += asin(u_vec4); + t_float += acos(u_float); + t_vec2 += acos(u_vec2); + t_vec3 += acos(u_vec3); + t_vec4 += acos(u_vec4); + t_float += atan(u_float); + t_vec2 += atan(u_vec2); + t_vec3 += atan(u_vec3); + t_vec4 += atan(u_vec4); + t_float += exp(u_float); + t_vec2 += exp(u_vec2); + t_vec3 += exp(u_vec3); + t_vec4 += exp(u_vec4); + t_float += log(u_float); + t_vec2 += log(u_vec2); + t_vec3 += log(u_vec3); + t_vec4 += log(u_vec4); + t_float += exp2(u_float); + t_vec2 += exp2(u_vec2); + t_vec3 += exp2(u_vec3); + t_vec4 += exp2(u_vec4); + t_float += log2(u_float); + t_vec2 += log2(u_vec2); + t_vec3 += log2(u_vec3); + t_vec4 += log2(u_vec4); + t_float += sqrt(u_float); + t_vec2 += sqrt(u_vec2); + t_vec3 += sqrt(u_vec3); + t_vec4 += sqrt(u_vec4); + t_float += inversesqrt(u_float); + t_vec2 += inversesqrt(u_vec2); + t_vec3 += inversesqrt(u_vec3); + t_vec4 += inversesqrt(u_vec4); + t_float += abs(u_float); + t_vec2 += abs(u_vec2); + t_vec3 += abs(u_vec3); + t_vec4 += abs(u_vec4); + t_float += sign(u_float); + t_vec2 += sign(u_vec2); + t_vec3 += sign(u_vec3); + t_vec4 += sign(u_vec4); + t_float += floor(u_float); + t_vec2 += floor(u_vec2); + t_vec3 += floor(u_vec3); + t_vec4 += floor(u_vec4); + t_float += ceil(u_float); + t_vec2 += ceil(u_vec2); + t_vec3 += ceil(u_vec3); + t_vec4 += ceil(u_vec4); + t_float += fract(u_float); + t_vec2 += fract(u_vec2); + t_vec3 += fract(u_vec3); + t_vec4 += fract(u_vec4); + t_float += length(u_float); + t_vec2 += length(u_vec2); + t_vec3 += length(u_vec3); + t_vec4 += length(u_vec4); + t_float += normalize(u_float); + t_vec2 += normalize(u_vec2); + t_vec3 += normalize(u_vec3); + t_vec4 += normalize(u_vec4); + + t_float += atan(u_float, -u_float); + t_vec2 += atan(u_vec2, -u_vec2); + t_vec3 += atan(u_vec3, -u_vec3); + t_vec4 += atan(u_vec4, -u_vec4); + t_float += pow(u_float, -u_float); + t_vec2 += pow(u_vec2, -u_vec2); + t_vec3 += pow(u_vec3, -u_vec3); + t_vec4 += pow(u_vec4, -u_vec4); + t_float += mod(u_float, -u_float); + t_vec2 += mod(u_vec2, -u_vec2); + t_vec3 += mod(u_vec3, -u_vec3); + t_vec4 += mod(u_vec4, -u_vec4); + t_float += min(u_float, -u_float); + t_vec2 += min(u_vec2, -u_vec2); + t_vec3 += min(u_vec3, -u_vec3); + t_vec4 += min(u_vec4, -u_vec4); + t_float += max(u_float, -u_float); + t_vec2 += max(u_vec2, -u_vec2); + t_vec3 += max(u_vec3, -u_vec3); + t_vec4 += max(u_vec4, -u_vec4); + t_float += step(u_float, -u_float); + t_vec2 += step(u_vec2, -u_vec2); + t_vec3 += step(u_vec3, -u_vec3); + t_vec4 += step(u_vec4, -u_vec4); + t_float += distance(u_float, -u_float); + t_vec2 += distance(u_vec2, -u_vec2); + t_vec3 += distance(u_vec3, -u_vec3); + t_vec4 += distance(u_vec4, -u_vec4); + t_float += dot(u_float, -u_float); + t_vec2 += dot(u_vec2, -u_vec2); + t_vec3 += dot(u_vec3, -u_vec3); + t_vec4 += dot(u_vec4, -u_vec4); + t_float += reflect(u_float, -u_float); + t_vec2 += reflect(u_vec2, -u_vec2); + t_vec3 += reflect(u_vec3, -u_vec3); + t_vec4 += reflect(u_vec4, -u_vec4); + + t_float += clamp(u_float, -u_float, 11.7 * u_float); + t_vec2 += clamp(u_vec2, -u_vec2, 11.7 * u_vec2); + t_vec3 += clamp(u_vec3, -u_vec3, 11.7 * u_vec3); + t_vec4 += clamp(u_vec4, -u_vec4, 11.7 * u_vec4); + t_float += mix(u_float, -u_float, 11.7 * u_float); + t_vec2 += mix(u_vec2, -u_vec2, 11.7 * u_vec2); + t_vec3 += mix(u_vec3, -u_vec3, 11.7 * u_vec3); + t_vec4 += mix(u_vec4, -u_vec4, 11.7 * u_vec4); + t_float += smoothstep(u_float, -u_float, 11.7 * u_float); + t_vec2 += smoothstep(u_vec2, -u_vec2, 11.7 * u_vec2); + t_vec3 += smoothstep(u_vec3, -u_vec3, 11.7 * u_vec3); + t_vec4 += smoothstep(u_vec4, -u_vec4, 11.7 * u_vec4); + t_float += faceforward(u_float, -u_float, 11.7 * u_float); + t_vec2 += faceforward(u_vec2, -u_vec2, 11.7 * u_vec2); + t_vec3 += faceforward(u_vec3, -u_vec3, 11.7 * u_vec3); + t_vec4 += faceforward(u_vec4, -u_vec4, 11.7 * u_vec4); + + t_float = mod(u_float, u_float); + t_vec2 = mod(u_vec2, u_float); + t_vec3 = mod(u_vec3, u_float); + t_vec4 = mod(u_vec4, u_float); + t_float = min(u_float, u_float); + t_vec2 = min(u_vec2, u_float); + t_vec3 = min(u_vec3, u_float); + t_vec4 = min(u_vec4, u_float); + t_float = max(u_float, u_float); + t_vec2 = max(u_vec2, u_float); + t_vec3 = max(u_vec3, u_float); + t_vec4 = max(u_vec4, u_float); + t_float = clamp(u_float, u_float, u_float); + t_vec2 = clamp(u_vec2, u_float, u_float); + t_vec3 = clamp(u_vec3, u_float, u_float); + t_vec4 = clamp(u_vec4, u_float, u_float); + t_float = mix(u_float, u_float, u_float); + t_vec2 = mix(u_vec2, u_vec2, u_float); + t_vec3 = mix(u_vec3, u_vec3, u_float); + t_vec4 = mix(u_vec4, u_vec4, u_float); + t_float = step(u_float, u_float); + t_vec2 = step(u_float, u_vec2); + t_vec3 = step(u_float, u_vec3); + t_vec4 = step(u_float, u_vec4); + t_float = smoothstep(u_float, u_float, u_float); + t_vec2 = smoothstep(u_float, u_float, u_vec2); + t_vec3 = smoothstep(u_float, u_float, u_vec3); + t_vec4 = smoothstep(u_float, u_float, u_vec4); + t_float = refract(u_float, u_float, u_float); + t_vec2 = refract(u_vec2, u_vec2, u_float); + t_vec3 = refract(u_vec3, u_vec3, u_float); + t_vec4 = refract(u_vec4, u_vec4, u_float); + t_vec3 = cross(u_vec3, u_vec3); + t_vec3 = cross(u_vec3, u_vec3); + t_vec3 = cross(u_vec3, u_vec3); + t_vec3 = cross(u_vec3, u_vec3); + + t_bvec2 = lessThan(u_vec2, u_vec2); + t_bvec3 = lessThan(u_vec3, u_vec3); + t_bvec4 = lessThan(u_vec4, u_vec4); + t_bvec2 = lessThan(u_ivec2, u_ivec2); + t_bvec3 = lessThan(u_ivec3, u_ivec3); + t_bvec4 = lessThan(u_ivec4, u_ivec4); + t_bvec2 = lessThanEqual(u_vec2, u_vec2); + t_bvec3 = lessThanEqual(u_vec3, u_vec3); + t_bvec4 = lessThanEqual(u_vec4, u_vec4); + t_bvec2 = lessThanEqual(u_ivec2, u_ivec2); + t_bvec3 = lessThanEqual(u_ivec3, u_ivec3); + t_bvec4 = lessThanEqual(u_ivec4, u_ivec4); + t_bvec2 = greaterThan(u_vec2, u_vec2); + t_bvec3 = greaterThan(u_vec3, u_vec3); + t_bvec4 = greaterThan(u_vec4, u_vec4); + t_bvec2 = greaterThan(u_ivec2, u_ivec2); + t_bvec3 = greaterThan(u_ivec3, u_ivec3); + t_bvec4 = greaterThan(u_ivec4, u_ivec4); + t_bvec2 = greaterThanEqual(u_vec2, u_vec2); + t_bvec3 = greaterThanEqual(u_vec3, u_vec3); + t_bvec4 = greaterThanEqual(u_vec4, u_vec4); + t_bvec2 = greaterThanEqual(u_ivec2, u_ivec2); + t_bvec3 = greaterThanEqual(u_ivec3, u_ivec3); + t_bvec4 = greaterThanEqual(u_ivec4, u_ivec4); + t_bvec2 = equal(u_vec2, u_vec2); + t_bvec3 = equal(u_vec3, u_vec3); + t_bvec4 = equal(u_vec4, u_vec4); + t_bvec2 = equal(u_ivec2, u_ivec2); + t_bvec3 = equal(u_ivec3, u_ivec3); + t_bvec4 = equal(u_ivec4, u_ivec4); + t_bvec2 = notEqual(u_vec2, u_vec2); + t_bvec3 = notEqual(u_vec3, u_vec3); + t_bvec4 = notEqual(u_vec4, u_vec4); + t_bvec2 = notEqual(u_ivec2, u_ivec2); + t_bvec3 = notEqual(u_ivec3, u_ivec3); + t_bvec4 = notEqual(u_ivec4, u_ivec4); + + t_bvec2 = equal(u_bvec2, u_bvec2); + t_bvec3 = equal(u_bvec3, u_bvec3); + t_bvec4 = equal(u_bvec4, u_bvec4); + t_bvec2 = notEqual(u_bvec2, u_bvec2); + t_bvec3 = notEqual(u_bvec3, u_bvec3); + t_bvec4 = notEqual(u_bvec4, u_bvec4); + t_bool = any(u_bvec2); + t_bool = any(u_bvec3); + t_bool = any(u_bvec4); + t_bool = all(u_bvec2); + t_bool = all(u_bvec3); + t_bool = all(u_bvec4); + t_bvec2 = not(u_bvec2); + t_bvec3 = not(u_bvec3); + t_bvec4 = not(u_bvec4); + + t_mat2 = matrixCompMult(u_mat2, u_mat2); + t_mat3 = matrixCompMult(u_mat3, u_mat3); + t_mat4 = matrixCompMult(u_mat4, u_mat4); +}