From ec9e73870cc150adbb3e76762a26c7f51d8aceb4 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 22 Apr 2010 09:47:27 -0700 Subject: Put static pointers to vec[234]_types along with the static float_type. Otherwise you have to type a lot of get_instance. --- ir_variable.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'ir_variable.cpp') diff --git a/ir_variable.cpp b/ir_variable.cpp index a2c0803e55a..ba91d566dfc 100644 --- a/ir_variable.cpp +++ b/ir_variable.cpp @@ -137,10 +137,8 @@ generate_110_vs_variables(exec_list *instructions, * FINISHME: value of GL_MAX_TEXTURE_COORDS. GL_MAX_TEXTURE_COORDS must be * FINISHME: at least 2, so hard-code 2 for now. */ - const glsl_type *const vec4_type = - glsl_type::get_instance(GLSL_TYPE_FLOAT, 4, 1); const glsl_type *const vec4_array_type = - glsl_type::get_array_instance(vec4_type, 2); + glsl_type::get_array_instance(glsl_type::vec4_type, 2); add_variable("gl_TexCoord", ir_var_out, vec4_array_type, instructions, symtab); @@ -219,10 +217,8 @@ generate_110_fs_variables(exec_list *instructions, * FINISHME: value of GL_MAX_TEXTURE_COORDS. GL_MAX_TEXTURE_COORDS must be * FINISHME: at least 2, so hard-code 2 for now. */ - const glsl_type *const vec4_type = - glsl_type::get_instance(GLSL_TYPE_FLOAT, 4, 1); const glsl_type *const vec4_array_type = - glsl_type::get_array_instance(vec4_type, 2); + glsl_type::get_array_instance(glsl_type::vec4_type, 2); add_variable("gl_TexCoord", ir_var_in, vec4_array_type, instructions, symtab); @@ -237,10 +233,8 @@ generate_ARB_draw_buffers_fs_variables(exec_list *instructions, * FINISHME: value of GL_MAX_DRAW_BUFFERS. GL_MAX_DRAW_BUFFERS must be * FINISHME: at least 1, so hard-code 1 for now. */ - const glsl_type *const vec4_type = - glsl_type::get_instance(GLSL_TYPE_FLOAT, 4, 1); const glsl_type *const vec4_array_type = - glsl_type::get_array_instance(vec4_type, 1); + glsl_type::get_array_instance(glsl_type::vec4_type, 1); ir_variable *const fd = add_variable("gl_FragData", ir_var_out, vec4_array_type, instructions, -- cgit v1.2.3