From 0f09aea3bfe90378f6fdfa7b6798cf597a20cd37 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 27 Mar 2010 12:48:57 -0700 Subject: [PATCH] Add support for builtin deprecated fs varyings. Fixes glsl-color.frag. --- builtin_variables.h | 6 ++++++ ir_variable.cpp | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/builtin_variables.h b/builtin_variables.h index 5b18446a0da..a742a1562d2 100644 --- a/builtin_variables.h +++ b/builtin_variables.h @@ -39,6 +39,12 @@ static const builtin_variable builtin_core_fs_variables[] = { { ir_var_out, "float", "gl_FragDepth" }, }; +static const builtin_variable builtin_110_deprecated_fs_variables[] = { + { ir_var_in, "vec4", "gl_Color" }, + { ir_var_in, "vec4", "gl_SecondaryColor" }, + { ir_var_in, "vec4", "gl_FogFragCoord" }, +}; + static const builtin_variable builtin_110_deprecated_vs_variables[] = { { ir_var_in, "vec4", "gl_Vertex" }, { ir_var_in, "vec4", "gl_Normal" }, diff --git a/ir_variable.cpp b/ir_variable.cpp index 9344170613d..df8e4c3ba82 100644 --- a/ir_variable.cpp +++ b/ir_variable.cpp @@ -136,6 +136,14 @@ generate_110_fs_variables(exec_list *instructions, instructions, symtab); } + /* FINISHME: Add support for gl_TexCoord[] */ + for (unsigned i = 0 + ; i < Elements(builtin_110_deprecated_fs_variables) + ; i++) { + add_builtin_variable(& builtin_110_deprecated_fs_variables[i], + instructions, symtab); + } + /* FINISHME: Add support for gl_FragData[GL_MAX_DRAW_BUFFERS]. */ } -- 2.30.2