glsl2: Rework builtin function generation.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 11 Aug 2010 23:53:52 +0000 (16:53 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Sat, 14 Aug 2010 02:09:36 +0000 (19:09 -0700)
commit43ff8f1a4b90554eae489cebb7e05f983dd9ad66
treed9a63bb1ce1257b45aea4bbcae450959b75cc64c
parentd802ba110f78c3eee9541867cde819ada1b2c449
glsl2: Rework builtin function generation.

Each language version/extension and target now has a "profile" containing
all of the available builtin function prototypes.  These are written in
GLSL, and come directly out of the GLSL spec (except for expanding genType).

A new builtins/ir/ folder contains the hand-written IR for each builtin,
regardless of what version includes it.  Only those definitions that have
prototypes in the profile will be included.

The autogenerated IR for texture builtins is no longer written to disk,
so there's no longer any confusion as to what's hand-written or
generated.

All scripts are now in python instead of perl.
152 files changed:
src/glsl/Makefile
src/glsl/builtin_function.cpp
src/glsl/builtins/110/abs [deleted file]
src/glsl/builtins/110/all [deleted file]
src/glsl/builtins/110/any [deleted file]
src/glsl/builtins/110/asin [deleted file]
src/glsl/builtins/110/atan [deleted file]
src/glsl/builtins/110/ceil [deleted file]
src/glsl/builtins/110/clamp [deleted file]
src/glsl/builtins/110/cos [deleted file]
src/glsl/builtins/110/cross [deleted file]
src/glsl/builtins/110/degrees [deleted file]
src/glsl/builtins/110/distance [deleted file]
src/glsl/builtins/110/dot [deleted file]
src/glsl/builtins/110/equal [deleted file]
src/glsl/builtins/110/exp [deleted file]
src/glsl/builtins/110/exp2 [deleted file]
src/glsl/builtins/110/faceforward [deleted file]
src/glsl/builtins/110/floor [deleted file]
src/glsl/builtins/110/fract [deleted file]
src/glsl/builtins/110/greaterThan [deleted file]
src/glsl/builtins/110/greaterThanEqual [deleted file]
src/glsl/builtins/110/inversesqrt [deleted file]
src/glsl/builtins/110/length [deleted file]
src/glsl/builtins/110/lessThan [deleted file]
src/glsl/builtins/110/lessThanEqual [deleted file]
src/glsl/builtins/110/log [deleted file]
src/glsl/builtins/110/log2 [deleted file]
src/glsl/builtins/110/matrixCompMult [deleted file]
src/glsl/builtins/110/max [deleted file]
src/glsl/builtins/110/min [deleted file]
src/glsl/builtins/110/mix [deleted file]
src/glsl/builtins/110/mod [deleted file]
src/glsl/builtins/110/noise_fake [deleted file]
src/glsl/builtins/110/normalize [deleted file]
src/glsl/builtins/110/not [deleted file]
src/glsl/builtins/110/notEqual [deleted file]
src/glsl/builtins/110/pow [deleted file]
src/glsl/builtins/110/radians [deleted file]
src/glsl/builtins/110/reflect [deleted file]
src/glsl/builtins/110/refract [deleted file]
src/glsl/builtins/110/sign [deleted file]
src/glsl/builtins/110/sin [deleted file]
src/glsl/builtins/110/smoothstep [deleted file]
src/glsl/builtins/110/sqrt [deleted file]
src/glsl/builtins/110/step [deleted file]
src/glsl/builtins/110/tan [deleted file]
src/glsl/builtins/110/textures [deleted file]
src/glsl/builtins/110_fs/derivatives [deleted file]
src/glsl/builtins/110_fs/textures [deleted file]
src/glsl/builtins/110_vs/ftransform [deleted file]
src/glsl/builtins/120/matrixCompMult [deleted file]
src/glsl/builtins/120/outerProduct [deleted file]
src/glsl/builtins/120/transpose [deleted file]
src/glsl/builtins/130/clamp [deleted file]
src/glsl/builtins/130/cosh [deleted file]
src/glsl/builtins/130/equal [deleted file]
src/glsl/builtins/130/greaterThan [deleted file]
src/glsl/builtins/130/greaterThanEqual [deleted file]
src/glsl/builtins/130/lessThan [deleted file]
src/glsl/builtins/130/lessThanEqual [deleted file]
src/glsl/builtins/130/max [deleted file]
src/glsl/builtins/130/min [deleted file]
src/glsl/builtins/130/mix [deleted file]
src/glsl/builtins/130/notEqual [deleted file]
src/glsl/builtins/130/sign [deleted file]
src/glsl/builtins/130/sinh [deleted file]
src/glsl/builtins/130/tanh [deleted file]
src/glsl/builtins/130/texelFetch [deleted file]
src/glsl/builtins/130/texture [deleted file]
src/glsl/builtins/130/textureGrad [deleted file]
src/glsl/builtins/130/textureLod [deleted file]
src/glsl/builtins/130/textureProj [deleted file]
src/glsl/builtins/130/textureProjGrad [deleted file]
src/glsl/builtins/130/textureProjLod [deleted file]
src/glsl/builtins/130_fs/texture [deleted file]
src/glsl/builtins/130_fs/textureProj [deleted file]
src/glsl/builtins/ARB_texture_rectangle/textures [deleted file]
src/glsl/builtins/EXT_texture_array/textures [deleted file]
src/glsl/builtins/EXT_texture_array_fs/textures [deleted file]
src/glsl/builtins/ir/abs [new file with mode: 0644]
src/glsl/builtins/ir/acos [new file with mode: 0644]
src/glsl/builtins/ir/all [new file with mode: 0644]
src/glsl/builtins/ir/any [new file with mode: 0644]
src/glsl/builtins/ir/asin [new file with mode: 0644]
src/glsl/builtins/ir/atan [new file with mode: 0644]
src/glsl/builtins/ir/ceil [new file with mode: 0644]
src/glsl/builtins/ir/clamp [new file with mode: 0644]
src/glsl/builtins/ir/cos [new file with mode: 0644]
src/glsl/builtins/ir/cosh [new file with mode: 0644]
src/glsl/builtins/ir/cross [new file with mode: 0644]
src/glsl/builtins/ir/dFdx [new file with mode: 0644]
src/glsl/builtins/ir/dFdy [new file with mode: 0644]
src/glsl/builtins/ir/degrees [new file with mode: 0644]
src/glsl/builtins/ir/distance [new file with mode: 0644]
src/glsl/builtins/ir/dot [new file with mode: 0644]
src/glsl/builtins/ir/equal [new file with mode: 0644]
src/glsl/builtins/ir/exp [new file with mode: 0644]
src/glsl/builtins/ir/exp2 [new file with mode: 0644]
src/glsl/builtins/ir/faceforward [new file with mode: 0644]
src/glsl/builtins/ir/floor [new file with mode: 0644]
src/glsl/builtins/ir/fract [new file with mode: 0644]
src/glsl/builtins/ir/ftransform [new file with mode: 0644]
src/glsl/builtins/ir/fwidth [new file with mode: 0644]
src/glsl/builtins/ir/greaterThan [new file with mode: 0644]
src/glsl/builtins/ir/greaterThanEqual [new file with mode: 0644]
src/glsl/builtins/ir/inversesqrt [new file with mode: 0644]
src/glsl/builtins/ir/length [new file with mode: 0644]
src/glsl/builtins/ir/lessThan [new file with mode: 0644]
src/glsl/builtins/ir/lessThanEqual [new file with mode: 0644]
src/glsl/builtins/ir/log [new file with mode: 0644]
src/glsl/builtins/ir/log2 [new file with mode: 0644]
src/glsl/builtins/ir/matrixCompMult [new file with mode: 0644]
src/glsl/builtins/ir/max [new file with mode: 0644]
src/glsl/builtins/ir/min [new file with mode: 0644]
src/glsl/builtins/ir/mix [new file with mode: 0644]
src/glsl/builtins/ir/mod [new file with mode: 0644]
src/glsl/builtins/ir/noise1 [new file with mode: 0644]
src/glsl/builtins/ir/noise2 [new file with mode: 0644]
src/glsl/builtins/ir/noise3 [new file with mode: 0644]
src/glsl/builtins/ir/noise4 [new file with mode: 0644]
src/glsl/builtins/ir/normalize [new file with mode: 0644]
src/glsl/builtins/ir/not [new file with mode: 0644]
src/glsl/builtins/ir/notEqual [new file with mode: 0644]
src/glsl/builtins/ir/outerProduct [new file with mode: 0644]
src/glsl/builtins/ir/pow [new file with mode: 0644]
src/glsl/builtins/ir/radians [new file with mode: 0644]
src/glsl/builtins/ir/reflect [new file with mode: 0644]
src/glsl/builtins/ir/refract [new file with mode: 0644]
src/glsl/builtins/ir/sign [new file with mode: 0644]
src/glsl/builtins/ir/sin [new file with mode: 0644]
src/glsl/builtins/ir/sinh [new file with mode: 0644]
src/glsl/builtins/ir/smoothstep [new file with mode: 0644]
src/glsl/builtins/ir/sqrt [new file with mode: 0644]
src/glsl/builtins/ir/step [new file with mode: 0644]
src/glsl/builtins/ir/tan [new file with mode: 0644]
src/glsl/builtins/ir/tanh [new file with mode: 0644]
src/glsl/builtins/ir/transpose [new file with mode: 0644]
src/glsl/builtins/profiles/110.frag [new file with mode: 0644]
src/glsl/builtins/profiles/110.vert [new file with mode: 0644]
src/glsl/builtins/profiles/120.frag [new file with mode: 0644]
src/glsl/builtins/profiles/120.vert [new file with mode: 0644]
src/glsl/builtins/profiles/ARB_texture_rectangle.frag [new file with mode: 0644]
src/glsl/builtins/profiles/ARB_texture_rectangle.vert [new file with mode: 0644]
src/glsl/builtins/profiles/EXT_texture_array.frag [new file with mode: 0644]
src/glsl/builtins/profiles/EXT_texture_array.vert [new file with mode: 0644]
src/glsl/builtins/tools/builtin_function.cpp [new file with mode: 0644]
src/glsl/builtins/tools/generate_builtins.pl [deleted file]
src/glsl/builtins/tools/generate_builtins.py [new file with mode: 0755]
src/glsl/builtins/tools/texture_builtins.py
src/glsl/ir_reader.cpp
src/glsl/ir_reader.h