-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 24 August 2004 18:01, Ronny V. Vindenes wrote:
> tir, 24,.08.2004 kl. 13.40 -0700, skrev Ian Romanick:
> > Ronny V. Vindenes wrote:
> > Of course, once we get to that point, I think we should get the existing
> > TCL paths and run everything as a vertex program.  I guess we can cross
> > (and debate) that bridge when we come to it...
>
> I agree, my concern was that particularly games test for certain
> extensions then pick a suitable code path, either because it's
> theoretically faster or because it allows more/better eye-candy, under
> the assumption that any supported extension is fully accelerated. I
> don't know if GL_ARB_vertex_program is actually used like that, it just
> happened to make me think (out loud).
>
> I've now briefly tested Philipp's patches on x86-64; didn't see anything
> break and the GL_ARB_vertex_program tests in progs/{demos,tests} all
> seemed to work.

NV_vertex_program however...

The codegen version of NV_vertex_program is busted.  The body of the C 
representation refers to a 'param' variable, but the function doesn't have 
any argument named 'param', but instead local_param and env_param.  The real 
fun is that we don't handle an error from tcc at all correctly, so rather 
than falling back to interpreted vertex programs we just segfault.

Attached patch is the "obvious" fix, but it's still wrong, fplight and fptest1 
render wrong, though they at least run.  Perhaps UREG_TYPE_PARAM means 
env_param instead of local_param...  Also I'm pretty sure the 
UREG_TYPE_ENV_CONST case is wrong, since we never declare an env_const 
variable in the generated C.

- - ajax
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBK8UjW4otUKDs0NMRAprlAJ9fe2wI1P6vkMwNsmroY2ofIz+QEACgykcn
3JZ0TtwEcm51cvYZmSktDh4=
=xJCf
-----END PGP SIGNATURE-----
Index: s_fragprog_to_c.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/swrast/s_fragprog_to_c.c,v
retrieving revision 1.7
diff -u -r1.7 s_fragprog_to_c.c
--- s_fragprog_to_c.c	15 Apr 2004 11:20:48 -0000	1.7
+++ s_fragprog_to_c.c	24 Aug 2004 22:37:08 -0000
@@ -297,7 +297,7 @@
    case UREG_TYPE_LOCAL_CONST: emit(p, "local_const"); break;
    case UREG_TYPE_ENV_CONST: emit(p, "env_const"); break;
    case UREG_TYPE_STATE_CONST: emit(p, "state_param"); break;
-   case UREG_TYPE_PARAM: emit(p, "param"); break;
+   case UREG_TYPE_PARAM: emit(p, "local_param"); break;
    };
    
    emit(p, "[%d]", GET_UREG_NR(arg));

Reply via email to