Does processing halt to wait for a shader to finish?

edited October 2015 in GLSL / Shaders

Can I rely on those values (does java wait for the gpu to be done with the filter):

int start = millis();
pg.filter(pass1);
println("time: "+(millis()-start));

Or does java just continues?

Answers

  • can you not write a filter with just a big loop in it to test this?

  • Well, it should, but you can call pg.flush(); after filter() to make sure it's synchronized. Will have a look into it when I'm back home. Oh and never use millis() for time measurement, it's inaccurate to say the most. Use long time = System.nanoTime(); instead (and divide by 1000000).

  • can you not write a filter with just a big loop in it to test this?

    I was to stoned :)

  • I was to stoned

    What?! Hahahaha :D

Sign In or Register to comment.