diff options
author | Eric Anholt <[email protected]> | 2010-05-19 13:57:01 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-06-01 15:15:05 -0700 |
commit | da46e5f5345ed2fa9c74d135267f3d5729c04ed1 (patch) | |
tree | 414a1c55e7712196a285a1f906d93e5098ade712 /builtins | |
parent | 0ca171908d04732176cbcaf2625fed8208a93dc9 (diff) |
builtins: Add ftransform().
Fixes glsl-orangebook-ch06-bump.vert.
Diffstat (limited to 'builtins')
-rw-r--r-- | builtins/110_vs/ftransform | 7 | ||||
-rwxr-xr-x | builtins/tools/generate_builtins.pl | 11 |
2 files changed, 16 insertions, 2 deletions
diff --git a/builtins/110_vs/ftransform b/builtins/110_vs/ftransform new file mode 100644 index 00000000000..3a5e8ccecfc --- /dev/null +++ b/builtins/110_vs/ftransform @@ -0,0 +1,7 @@ +((function ftransform + (signature vec4 + (parameters) + ((return (expression vec4 * + (var_ref gl_ModelViewProjectionMatrix) + (var_ref gl_Vertex))))) +)) diff --git a/builtins/tools/generate_builtins.pl b/builtins/tools/generate_builtins.pl index e7ec8ef56ff..9ce0ce3a608 100755 --- a/builtins/tools/generate_builtins.pl +++ b/builtins/tools/generate_builtins.pl @@ -85,7 +85,7 @@ read_builtins(_mesa_glsl_parse_state *st, exec_list *instructions, EOF -@versions = sort(<builtins/[1-9][0-9][0-9]>); +@versions = sort(<builtins/[1-9][0-9][0-9]*>); foreach $version (@versions) { $version =~ s!builtins/!!g; process_version($version); @@ -99,7 +99,14 @@ _mesa_glsl_initialize_functions(exec_list *instructions, EOF foreach $version (@versions) { - print " if (state->language_version >= $version)\n"; + $version_number = $version; + if ($version =~ m/_vs/) { + $version_check = " && state->target == vertex_shader"; + $version_number =~ s/_vs//; + } else { + $version_check = ""; + } + print " if (state->language_version >= $version_number$version_check)\n"; print " read_builtins(state, instructions, functions_for_$version,\n"; print " sizeof(functions_for_$version) / "; print "sizeof(const char *));\n\n" |