diff options
author | Eric Anholt <eric@anholt.net> | 2010-05-19 13:57:01 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-06-01 15:15:05 -0700 |
commit | da46e5f5345ed2fa9c74d135267f3d5729c04ed1 (patch) | |
tree | 414a1c55e7712196a285a1f906d93e5098ade712 /builtins/tools | |
parent | 0ca171908d04732176cbcaf2625fed8208a93dc9 (diff) |
builtins: Add ftransform().
Fixes glsl-orangebook-ch06-bump.vert.
Diffstat (limited to 'builtins/tools')
-rwxr-xr-x | builtins/tools/generate_builtins.pl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/builtins/tools/generate_builtins.pl b/builtins/tools/generate_builtins.pl index e7ec8ef56f..9ce0ce3a60 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" |