Check mesa_vp->Base.NumInstructions == 0 instead of mesa_vp->Base.String to
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 28 Aug 2006 19:42:41 +0000 (19:42 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 28 Aug 2006 19:42:41 +0000 (19:42 +0000)
determine if we actually have a program.  See "[r300] TCL fallback with Quake3".

src/mesa/drivers/dri/r200/r200_vertprog.c
src/mesa/drivers/dri/r300/r300_vertexprog.c

index 32d0d8eadaa18ad1852b54c85b19c75302658dac..b0f13e5f0a3c76ab1b3913608b4e20976a02db9b 100644 (file)
@@ -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 &
index e45300b106b8cf5a7bde457d93310da1488a3a33..cc932b86d99f6bb53368b393b440ed9a97669d6f 100644 (file)
@@ -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")) {