Skip to content

Commit b4193b5

Browse files
author
Sebastien Bourdeauducq
committedNov 24, 2011
compiler: do not bind internal variables
1 parent 93dd584 commit b4193b5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

Diff for: ‎src/renderer/compiler.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ static bool init_pfv(struct compiler_sc *sc)
275275
int i;
276276

277277
fpvm_init(&sc->pfv_fragment, 0);
278-
fpvm_set_bind_mode(&sc->pfv_fragment, 1);
278+
fpvm_set_bind_mode(&sc->pfv_fragment, FPVM_BIND_ALL);
279279
for(i=0;i<COMP_PFV_COUNT;i++)
280280
sc->p->pfv_allocation[i] = -1;
281281
fpvm_set_bind_callback(&sc->pfv_fragment, pfv_bind_callback, sc);
@@ -425,17 +425,18 @@ static bool init_pvv(struct compiler_sc *sc)
425425
int i;
426426

427427
fpvm_init(&sc->pvv_fragment, 1);
428-
fpvm_set_bind_mode(&sc->pvv_fragment, 1);
429428
for(i=0;i<COMP_PVV_COUNT;i++)
430429
sc->p->pvv_allocation[i] = -1;
431430
fpvm_set_bind_callback(&sc->pvv_fragment, pvv_bind_callback, sc);
432-
431+
432+
fpvm_set_bind_mode(&sc->pvv_fragment, FPVM_BIND_SOURCE);
433433
#define A(dest, val) if(!fpvm_assign(&sc->pvv_fragment, dest, val)) goto fail_assign
434434
A("x", "i2f(_Xi)*_hmeshsize");
435435
A("y", "i2f(_Yi)*_vmeshsize");
436436
A("rad", "sqrt(sqr(x-0.5)+sqr(y-0.5))");
437437
/* TODO: generate ang */
438438
#undef A
439+
fpvm_set_bind_mode(&sc->pvv_fragment, FPVM_BIND_ALL);
439440

440441
return true;
441442

@@ -446,6 +447,8 @@ static bool init_pvv(struct compiler_sc *sc)
446447

447448
static int finalize_pvv(struct compiler_sc *sc)
448449
{
450+
fpvm_set_bind_mode(&sc->pvv_fragment, FPVM_BIND_SOURCE);
451+
449452
#define A(dest, val) if(!fpvm_assign(&sc->pvv_fragment, dest, val)) goto fail_assign
450453

451454
/* Zoom */

0 commit comments

Comments
 (0)
Please sign in to comment.