processing / processing

Source code for the Processing Core and Development Environment (PDE)
http://processing.org
Other
6.47k stars 1.5k forks source link

Demos/Graphics/Wiggling regressed from 17 fps to 8.3 fps between a11 and b1 #3561

Closed gohai closed 9 years ago

gohai commented 9 years ago

Please close if this is a known.. FPS in the demo halved for me on the Raspberry Pi using the new Mesa driver. @JakubValtar?

JakubValtar commented 9 years ago

Hi @gohai,

do all faces in the Wiggling example you've been running have circular holes in them or only three of them? I'm trying to figure out if you are using the old version or the new version, because I updated this example recently.

Could you please copy and paste this version into both 3.0a11 and 3.0b1 and tell me how fast it is?

gohai commented 9 years ago

Hi @JakubValtar, greetings from Vídeň!

I tried with the version you linked: it's 8 fps on 3.0b1 and 22 fps on 3.0a11. Looks similar visually.

JakubValtar commented 9 years ago

Thanks @gohai :)

(Un)fortunately, both releases run the same on my machine. If you have some time, I'd like to ask you for help.

I identified some changes which could cause the framerate drop and I need you to test which one it was. Could you please build the repo at these commits and report the framerate?

Edit: (sorry, linked to wrong commits, now fixed) 71c688d5585c23ae3b521178b41349d6f98c3253 07e9403289f4fdee710f38c90583c4f269adef19 deb29b3d30127763aebf2b0eb977941837b9bbd0

It's okay if you don't have time for this, but I can't solve it without identifying the commit which caused it (and you seem to be the only one running on Pi).

gohai commented 9 years ago

71c688d5585c23ae3b521178b41349d6f98c3253 already has the low fps with the updated sketch you linked, skipping the other commits.

Since I had to manually make a few changes to the commit to get it to run on the Pi (updated build.xml, new JOGL, two shader hacks), I am now also trying plain a11 with the same modifications on top, to be sure.

gohai commented 9 years ago

I quickly disabled SAVE_SURFACE_TO_PIXELS_HACK in 71c688d5585c23ae3b521178b41349d6f98c3253, and yes, it's that very commit (got 21+ fps).

Is there a way to establish whether this hack is needed on a particular platform? If not, could we potentially disable it on the underpowered Pi? (@codeanticode)

Thanks!

benfry commented 9 years ago

From the looks of https://github.com/processing/processing/issues/3559 it seems like SAVE_SURFACE_TO_PIXELS_HACK may not even be working as intended. But I think @codeanticode has some ideas about how to fix this. Who's taking this one?

JakubValtar commented 9 years ago

We are working together with @codeanticode on it.

gohai commented 9 years ago

@JakubValtar @codeanticode It'd be fantastic if any new scheme would also have a path for GLES2!

codeanticode commented 9 years ago

Hey guys, this commit should solve most of the problems.

@gohai could you test if things work as expected and without framerate drop?

@JakubValtar could you test static sketches on integrated intel?

gohai commented 9 years ago

Getting 21 fps with https://github.com/processing/processing/commit/eeb9deccb2601793fd3e19b015f956d9da14954f. Thanks @codeanticode! I'll test tomorrow with the binary driver.

codeanticode commented 9 years ago

Excellent! Do you see any unintended side effects? Can you run static sketches (no draw() function, or noLoop()) without artifacts (particularly, window turning black after the first frame)?

gohai commented 9 years ago

Will try tomorrow!

On Thu, Aug 13, 2015 at 7:38 PM, codeanticode notifications@github.com wrote:

Excellent! Do you see any unintended side effects? Can you run static sketches (no draw() function, or noLoop()) without artifacts (particularly, window turning black after the first frame)?

— Reply to this email directly or view it on GitHub https://github.com/processing/processing/issues/3561#issuecomment-130773891 .

JakubValtar commented 9 years ago

@codeanticode does not work :(((

Just white screen

public void settings() {
  size(200, 200, P2D);
}

public void setup() {
  background(255);
  fill(255);
  rect(10, 10, 80, 80);
}

public void draw() { }

Swaps the image and black

public void settings() {
  size(200, 200, P2D);
}

public void setup() {
  background(255);
  fill(255);
  rect(10, 10, 80, 80);
  noLoop();
}

public void draw() { }

Displays the image, no flickering

public void settings() {
  size(200, 200, P2D);
}

public void setup() {
  background(255);
  fill(255);
  rect(10, 10, 80, 80);
}

public void draw() {
  background(255);
  fill(255);
  rect(10, 10, 80, 80);
}

Swaps the image and default background gray

public void settings() {
  size(200, 200, P2D);
}

public void setup() {
  background(255);
  fill(255);
  rect(10, 10, 80, 80);
}

public void draw() {
  background(255);
  fill(255);
  rect(10, 10, 80, 80);
  noLoop();
}
gohai commented 9 years ago

Still want me to test anything?

JakubValtar commented 9 years ago

Thanks for the offer!

We don't have anything right now. I'll let you know once we solve the flickering without the hack.

codeanticode commented 9 years ago

fixed with https://github.com/processing/processing/commit/3b8768165645a82ba87fcb15ab569f37f9d6efcc, https://github.com/processing/processing/commit/abe7b52e1ec33c5d86ed5fbf64980ee7f3bc9703 and https://github.com/processing/processing/commit/ea13eda65db426d0f6d47c695825667752627192

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.