Since the r128 has no hardware tcl and tcl has to be done in software anyway I think it should have a full-featured tcl. This patch enables some extensions:
GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_EXT_cull_vertex GL_EXT_multi_draw_arrays GL_MESA_pack_invert GL_NV_vertex_program GL_NV_vertex_program1_1 The last two can be disabled using driconf if desired for the same reasons I made them disabled by default when I added vertex program support to the r200 driver a year ago. I tested with the programs in Mesa/progs/demos and Mesa/progs/tests and everything seems to work fine except vptest1 and vptest2. Since these two don't work on my i915 either I suppose the problem is with Mesa's program parsing and not r128-specific. Philipp
? depend ? r128_software.patch Index: r128_context.c =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r128/r128_context.c,v retrieving revision 1.19 diff --unified -r1.19 r128_context.c --- r128_context.c 28 Jul 2005 00:29:52 -0000 1.19 +++ r128_context.c 14 Aug 2005 18:29:42 -0000 @@ -68,7 +68,12 @@ #define need_GL_ARB_multisample #define need_GL_ARB_texture_compression +#define need_GL_ARB_vertex_buffer_object +#define need_GL_ARB_vertex_program #define need_GL_EXT_blend_minmax +#define need_GL_EXT_cull_vertex +#define need_GL_EXT_multi_draw_arrays +#define need_GL_NV_vertex_program #include "extension_helper.h" const struct dri_extension card_extensions[] = @@ -78,14 +83,26 @@ { "GL_ARB_texture_compression", GL_ARB_texture_compression_functions }, { "GL_ARB_texture_env_add", NULL }, { "GL_ARB_texture_mirrored_repeat", NULL }, + { "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions }, + { "GL_ARB_vertex_program", GL_ARB_vertex_program_functions }, { "GL_EXT_blend_subtract", GL_EXT_blend_minmax_functions }, + { "GL_EXT_cull_vertex", GL_EXT_cull_vertex_functions }, + { "GL_EXT_multi_draw_arrays", GL_EXT_multi_draw_arrays_functions }, { "GL_EXT_texture_edge_clamp", NULL }, + { "GL_MESA_pack_invert", NULL }, { "GL_MESA_ycbcr_texture", NULL }, { "GL_NV_blend_square", NULL }, { "GL_SGIS_generate_mipmap", NULL }, { NULL, NULL } }; +const struct dri_extension NV_vp_extensions[] = { + { "GL_NV_vertex_program", GL_NV_vertex_program_functions }, + { "GL_NV_vertex_program1_1", NULL }, + { NULL, NULL } +}; + + static const struct dri_debug_control debug_control[] = { { "ioctl", DEBUG_VERBOSE_IOCTL }, @@ -248,6 +265,8 @@ driInitExtensions( ctx, card_extensions, GL_TRUE ); if (sPriv->drmMinor >= 4) _mesa_enable_extension( ctx, "GL_MESA_ycbcr_texture" ); + if(driQueryOptionb(&rmesa->optionCache, "nv_vertex_program")) + driInitExtensions( ctx, NV_vp_extensions, GL_FALSE ); r128InitTriFuncs( ctx ); r128DDInitStateFuncs( ctx ); Index: r128_dd.c =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r128/r128_dd.c,v retrieving revision 1.5 diff --unified -r1.5 r128_dd.c --- r128_dd.c 4 May 2005 20:11:38 -0000 1.5 +++ r128_dd.c 14 Aug 2005 18:29:42 -0000 @@ -44,7 +44,7 @@ #include "utils.h" -#define DRIVER_DATE "20041026" +#define DRIVER_DATE "20050814" /* Return the width and height of the current color buffer. Index: r128_screen.c =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r128/r128_screen.c,v retrieving revision 1.21 diff --unified -r1.21 r128_screen.c --- r128_screen.c 29 Jul 2005 00:19:36 -0000 1.21 +++ r128_screen.c 14 Aug 2005 18:29:43 -0000 @@ -68,11 +68,14 @@ DRI_CONF_PERFORMANCE_BOXES(false) #endif DRI_CONF_SECTION_END + DRI_CONF_SECTION_SOFTWARE + DRI_CONF_NV_VERTEX_PROGRAM(true) + DRI_CONF_SECTION_END DRI_CONF_END; #if ENABLE_PERF_BOXES -static const GLuint __driNConfigOptions = 4; +static const GLuint __driNConfigOptions = 5; #else -static const GLuint __driNConfigOptions = 3; +static const GLuint __driNConfigOptions = 4; #endif extern const struct dri_extension card_extensions[];