From: Eric Anholt Date: Sat, 27 Mar 2010 19:48:57 +0000 (-0700) Subject: Add support for builtin deprecated fs varyings. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0f09aea3bfe90378f6fdfa7b6798cf597a20cd37;p=mesa.git Add support for builtin deprecated fs varyings. Fixes glsl-color.frag. --- 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]. */ }