@@ -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 commit comments