From: Brian Paul Date: Mon, 28 Aug 2006 19:42:41 +0000 (+0000) Subject: Check mesa_vp->Base.NumInstructions == 0 instead of mesa_vp->Base.String to X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5a2fc125516f46fade82a8c65527ffe77cab5c2;p=mesa.git Check mesa_vp->Base.NumInstructions == 0 instead of mesa_vp->Base.String to determine if we actually have a program. See "[r300] TCL fallback with Quake3". --- diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c index 32d0d8eadaa..b0f13e5f0a3 100644 --- a/src/mesa/drivers/dri/r200/r200_vertprog.c +++ b/src/mesa/drivers/dri/r200/r200_vertprog.c @@ -407,7 +407,7 @@ static GLboolean r200_translate_vertex_program(struct r200_vertex_program *vp) vp->native = GL_FALSE; - if (!mesa_vp->Base.String) + if (mesa_vp->Base.NumInstructions == 0) return GL_FALSE; if ((mesa_vp->Base.InputsRead & diff --git a/src/mesa/drivers/dri/r300/r300_vertexprog.c b/src/mesa/drivers/dri/r300/r300_vertexprog.c index e45300b106b..cc932b86d99 100644 --- a/src/mesa/drivers/dri/r300/r300_vertexprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertexprog.c @@ -399,7 +399,7 @@ void r300_translate_vertex_shader(struct r300_vertex_program *vp) int u_temp_i=VSF_MAX_FRAGMENT_TEMPS-1; struct prog_src_register src[3]; - if (!mesa_vp->Base.String) + if (mesa_vp->Base.NumInstructions == 0) return; if (getenv("R300_VP_SAFETY")) {