summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-06-03 14:51:40 -0700
committerKenneth Graunke <kenneth@whitecape.org>2010-06-09 11:14:57 -0700
commit9d1fc46f0cdf63677aac05f987cdd5b18453da2f (patch)
tree78d303405b2eb37f17a18be860e0ea08ba3e2534
parent56d3f6ad782e9819b40544494826954d3fcf978b (diff)
generate_builtins.pl: Support _fs directories as well as _vs.
-rwxr-xr-xbuiltins/tools/generate_builtins.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtins/tools/generate_builtins.pl b/builtins/tools/generate_builtins.pl
index 9ce0ce3a60..71c0a4d8c0 100755
--- a/builtins/tools/generate_builtins.pl
+++ b/builtins/tools/generate_builtins.pl
@@ -102,10 +102,12 @@ foreach $version (@versions) {
$version_number = $version;
if ($version =~ m/_vs/) {
$version_check = " && state->target == vertex_shader";
- $version_number =~ s/_vs//;
+ } elsif ($version =~ m/_fs/) {
+ $version_check = " && state->target == fragment_shader";
} else {
$version_check = "";
}
+ $version_number =~ s/_[vf]s//;
print " if (state->language_version >= $version_number$version_check)\n";
print " read_builtins(state, instructions, functions_for_$version,\n";
print " sizeof(functions_for_$version) / ";