builtins_110_tan,
};
+/* Version 110_vs builtins */
+
+static const char *builtins_110_vs_ftransform = {
+ "((function ftransform\n"
+ " (signature vec4\n"
+ " (parameters)\n"
+ " ((return (expression vec4 *\n"
+ " (var_ref gl_ModelViewProjectionMatrix)\n"
+ " (var_ref gl_Vertex)))))\n"
+ "))\n"
+};
+
+static const char *functions_for_110_vs [] = {
+ builtins_110_vs_ftransform,
+};
+
/* Version 130 builtins */
static const char *builtins_130_equal = {
read_builtins(state, instructions, functions_for_110,
sizeof(functions_for_110) / sizeof(const char *));
+ if (state->language_version >= 110 && state->target == vertex_shader)
+ read_builtins(state, instructions, functions_for_110_vs,
+ sizeof(functions_for_110_vs) / sizeof(const char *));
+
if (state->language_version >= 130)
read_builtins(state, instructions, functions_for_130,
sizeof(functions_for_130) / sizeof(const char *));
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);
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"