Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

compiler: do not bind internal variables

  • Loading branch information...
commit b4193b58493cb7860e15dee3350e1804d9532777 1 parent 93dd584
Sébastien Bourdeauducq authored November 24, 2011

Showing 1 changed file with 6 additions and 3 deletions. Show diff stats Hide diff stats

  1. 9  src/renderer/compiler.c
9  src/renderer/compiler.c
@@ -275,7 +275,7 @@ static bool init_pfv(struct compiler_sc *sc)
275 275
 	int i;
276 276
 
277 277
 	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);
279 279
 	for(i=0;i<COMP_PFV_COUNT;i++)
280 280
 		sc->p->pfv_allocation[i] = -1;
281 281
 	fpvm_set_bind_callback(&sc->pfv_fragment, pfv_bind_callback, sc);
@@ -425,17 +425,18 @@ static bool init_pvv(struct compiler_sc *sc)
425 425
 	int i;
426 426
 
427 427
 	fpvm_init(&sc->pvv_fragment, 1);
428  
-	fpvm_set_bind_mode(&sc->pvv_fragment, 1);
429 428
 	for(i=0;i<COMP_PVV_COUNT;i++)
430 429
 		sc->p->pvv_allocation[i] = -1;
431 430
 	fpvm_set_bind_callback(&sc->pvv_fragment, pvv_bind_callback, sc);
432  
-
  431
+	
  432
+	fpvm_set_bind_mode(&sc->pvv_fragment, FPVM_BIND_SOURCE);
433 433
 	#define A(dest, val) if(!fpvm_assign(&sc->pvv_fragment, dest, val)) goto fail_assign
434 434
 	A("x", "i2f(_Xi)*_hmeshsize");
435 435
 	A("y", "i2f(_Yi)*_vmeshsize");
436 436
 	A("rad", "sqrt(sqr(x-0.5)+sqr(y-0.5))");
437 437
 	/* TODO: generate ang */
438 438
 	#undef A
  439
+	fpvm_set_bind_mode(&sc->pvv_fragment, FPVM_BIND_ALL);
439 440
 	
440 441
 	return true;
441 442
 
@@ -446,6 +447,8 @@ static bool init_pvv(struct compiler_sc *sc)
446 447
 
447 448
 static int finalize_pvv(struct compiler_sc *sc)
448 449
 {
  450
+	fpvm_set_bind_mode(&sc->pvv_fragment, FPVM_BIND_SOURCE);
  451
+	
449 452
 	#define A(dest, val) if(!fpvm_assign(&sc->pvv_fragment, dest, val)) goto fail_assign
450 453
 
451 454
 	/* Zoom */

0 notes on commit b4193b5

Please sign in to comment.
Something went wrong with that request. Please try again.