diff options
author | Eric Anholt <[email protected]> | 2010-04-22 09:47:27 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-04-23 16:12:44 -0700 |
commit | ec9e73870cc150adbb3e76762a26c7f51d8aceb4 (patch) | |
tree | e0cdcb3fafbb54122348a590e24d17ecc69531eb /ir_variable.cpp | |
parent | 8d3e59f1f399d7c1f7604779f1d62e876c609d9e (diff) |
Put static pointers to vec[234]_types along with the static float_type.
Otherwise you have to type a lot of get_instance.
Diffstat (limited to 'ir_variable.cpp')
-rw-r--r-- | ir_variable.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
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, |