Index: src/mesa/drivers/dri/r300/r300_context.c =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_context.c,v retrieving revision 1.54 diff -u -r1.54 r300_context.c --- src/mesa/drivers/dri/r300/r300_context.c 11 Jun 2006 09:12:27 -0000 1.54 +++ src/mesa/drivers/dri/r300/r300_context.c 18 Jun 2006 11:26:06 -0000 @@ -83,9 +83,20 @@ #define need_GL_EXT_blend_equation_separate #define need_GL_EXT_blend_func_separate #define need_GL_NV_vertex_program + +#define need_GL_ARB_shader_objects +#define need_GL_ARB_shading_language_100 +#define need_GL_ARB_vertex_shader +#define need_GL_ARB_fragment_shader + #include "extension_helper.h" const struct dri_extension card_extensions[] = { + {"GL_ARB_shader_objects", GL_ARB_shader_objects_functions}, + {"GL_ARB_shading_language_100", NULL}, + {"GL_ARB_vertex_shader", GL_ARB_vertex_shader_functions}, + {"GL_ARB_fragment_shader", GL_ARB_vertex_shader_functions}, + {"GL_ARB_multisample", GL_ARB_multisample_functions}, {"GL_ARB_multitexture", NULL}, {"GL_ARB_texture_border_clamp", NULL}, Index: src/mesa/drivers/dri/r300/r300_render.c =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_render.c,v retrieving revision 1.106 diff -u -r1.106 r300_render.c --- src/mesa/drivers/dri/r300/r300_render.c 23 Apr 2006 08:04:50 -0000 1.106 +++ src/mesa/drivers/dri/r300/r300_render.c 18 Jun 2006 11:26:22 -0000 @@ -462,6 +462,11 @@ { int i; + if (ctx->ShaderObjects._FragmentShaderPresent) + return R300_FALLBACK_RAST; + if (ctx->ShaderObjects._VertexShaderPresent) + return R300_FALLBACK_TCL; + FALLBACK_IF(ctx->RenderMode != GL_RENDER); // We do not do SELECT or FEEDBACK (yet ?) #if 0 /* These should work now.. */ Index: src/mesa/shader/grammar/grammar.c =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/shader/grammar/grammar.c,v retrieving revision 1.3 diff -u -r1.3 grammar.c --- src/mesa/shader/grammar/grammar.c 28 Jul 2005 00:11:11 -0000 1.3 +++ src/mesa/shader/grammar/grammar.c 18 Jun 2006 11:37:52 -0000 @@ -2410,7 +2410,7 @@ } else if (result == mr_matched) { - if (barray_push (ba, sp->m_emits, text[ind - 1], save_ind, &ctx) || + if (barray_push (ba, sp->m_emits, text[ind > 0 ? ind - 1 : ind], save_ind, &ctx) || barray_append (ba, &array)) { free_regbyte_ctx_stack (ctx, *rbc); @@ -2469,7 +2469,7 @@ if (status == mr_matched) { if (sp->m_emits) - if (barray_push (ba, sp->m_emits, text[ind - 1], save_ind, &ctx)) + if (barray_push (ba, sp->m_emits, text[ind > 0 ? ind - 1 : ind], save_ind, &ctx)) { free_regbyte_ctx_stack (ctx, *rbc); barray_destroy (&array); @@ -2629,7 +2629,7 @@ { if (sp->m_emits != NULL) { - if (emit_push (sp->m_emits, _BP->_F + _P, text[ind - 1], save_ind, &ctx)) + if (emit_push (sp->m_emits, _BP->_F + _P, text[ind > 0 ? ind - 1 : ind], save_ind, &ctx)) { free_regbyte_ctx_stack (ctx, *rbc); return mr_internal_error; @@ -2686,7 +2686,7 @@ if (status == mr_matched) { if (sp->m_emits != NULL) - if (emit_push (sp->m_emits, _BP->_F + _P, text[ind - 1], save_ind, &ctx)) + if (emit_push (sp->m_emits, _BP->_F + _P, text[ind > 0 ? ind - 1 : ind], save_ind, &ctx)) { free_regbyte_ctx_stack (ctx, *rbc); return mr_internal_error;