ofClear / Shader issue on intel gpu

Hello,

I have a fairly involved set of shaders that run really nicely on my macBook’s Radeon GPU. But, when I force them to run on the integrated Intel gpu I don’t get anything like the correct result - basically I just get a screen full of random coloured pixel noise.

Is anyone able to give any tips as to common issues that might cause this?

S

Seems like the ofClear(0,0,0,0) call as part of my shader Fbo preparation is causing some kind of bugginess. Is this a thing? Or is there an alternative way of clearing the fbo information?

S

can you try ofClear(0,0,0,1) instead? clearing without alpha usually doesn’t make sense unless you really need the fbo to be transparent

Hmmm that’s not it - have been through all my clear calls and checked. Have also tried deleting a load of the clear calls and just drawing a masking out rectangle, which maybe made some difference but didn’t solve it. I am using GL_RGB16F formats to my FBO’s, maybe the intel chip doesn’t like that?

Here’s what it should look like:

And here’s a couple of shots of the kind of stuff it does do. Funky but not what I’m after:


[edit] if you look really closely at the first of the glitcher images, you can see the underlying heat map is there - it is just being messed up by a load of other stuff. In the second image, shrug, who knows.

Getting a bit closer now. Maybe…

In the following code, when I run on the intel chip, with the commented line enabled, I get an interference pattern (first image below). When I comment it out, I don’t, but conversely, the code doesn’t record the heat map properly as the seenFbo doesn’t get zeroed out on each round before recording the found ‘exposes’ shapes (second image below).

When I run on the AMD chip, with the commented line, everything is fine.

    fboSeen.begin();
    //ofClear(ofFloatColor(0,0,0,1));  //this one stops the overload at the top end but including it causes interference in intel
    ofSetColor(255);
    ofEnableBlendMode(OF_BLENDMODE_ADD);
    for(int j = 0; j<exposes.size(); j++){
        exposes[j].simplify(0.1);
        exposes[j].draw();
    }
    ofDisableBlendMode();
    fboSeen.end();

Screenshot with interference:

Screenshot with zeroing out lost:

I need to keep the zeroing out function in order to record accurately from frame to frame. But both ofClear(0,0,0) and drawing a rectangle with ofColor(0,0,0) cause an interference issue on the intel chip. Why would this be?

S

Might give up on this, I can’t find a solution. Maybe it’s just an intel driver thing :-/

It looks like you might be using something without initializing it, perhaps the amd driver zeros out that texture but the intel one does not so you see the glitch. i’d recommend using renderdoc to debug what’s going on

Cheap trick, instead of trying ofClear(0, 0, 0) you can try drawing a white rectangle at screen size at every draw call before the rest? Definitely not as efficient, but could do the trick.

yeah I tried that originally. replaced all the clears with it - still got the same glitcher look

interestingly I was in Beijing for the last four days, and there were people there using the app on machines with intel chips and having no issues. argg