Skip to content Skip to sidebar Skip to footer

Renderscript Code Not Working Without Rsdebug

I'm completely new to RenderScript. I was trying to get a simple example shown by Romain Guy in http://www.youtube.com/watch?v=5jz0kSuR2j4 working. First off, here's the code. Main

Solution 1:

I've just encountered the same issue. It seems to be fixed when rsDebug is somewhere in the same function. This fixed it for me:

if(x > 0) {
    if(x < 0) {
        rsDebug("Workaround for renderscript bug", 0.0f);
    }

    /* Code */
}

Using this, rsDebug is never actually called, so it will not output anything.

Note this does not work:

if(0) {
    rsDebug("Workaround for renderscript bug", 0.0f);
}

This is probably optimized out.

Post a Comment for "Renderscript Code Not Working Without Rsdebug"