Samsung S3 with Qualcomm SoC, black textures after CCRenderTexture::saveToFile

I’m working on game which widely uses CCRenderTexture, and we encountered problem on S3 devices with Qualcomm graphic card in case when texture generated with CCRenderTexture, saved to file and than loaded as Sprite. Texture generation occures on start-up if it wasn’t generated before, and generated texture is always black.

AFAIK there was some problems with CCRenderTexture on same devices, and it was fixed in master at February, 28. Looks like saveToFile() method is not covered by that fix. Unfortunately I have Samsung S3 device with ARM Mali videocard and cannot reproduce problem.

Device where all is OK:

GL_VENDOR:     ARM
GL_RENDERER:   Mali-400 MP
GL_VERSION:    OpenGL ES 2.0
GL_MAX_TEXTURE_SIZE: 4096
GL_MAX_TEXTURE_UNITS: 8
GL supports PVRTC: NO
GL supports BGRA8888 textures: NO
GL supports NPOT textures: YES
GL supports discard_framebuffer: YES
GL supports shareable VAO: NO

Device where problem appears:

GL_VENDOR:     Qualcomm
GL_RENDERER:   Adreno (TM) 225
GL_VERSION:    OpenGL ES 2.0 2184622
GL_MAX_TEXTURE_SIZE: 4096
GL_MAX_TEXTURE_UNITS: 20
GL supports PVRTC: NO
GL supports BGRA8888 textures: NO
GL supports NPOT textures: YES
GL supports discard_framebuffer: NO
GL supports shareable VAO: YES
compiled with Profiling Support: NO

Samsung Galaxy S3 AT&T          SGH-i747, 720 x 1280, 1.5GHz Advanced Dual Core, Qualcomm, 2 GB, 4.0.4
Samsung Galaxy S3 Verizon       SCH-I535, 720 x 1280, Qualcomm Snapdragon MSM8960, 2 GB, 4.0.4
Samsung Galaxy S3 T-Mobile      SGH-T999, 1280 x 720, Qualcomm MSM8960 Snapdragon, 1.5 GHz dual core, 2 GB, 4.1.2

Also we use a small tweak in cocos2d-x to enable saving rendered texture into transparent PNG:

bool CCRenderTexture::saveToFile(const char *fileName, tCCImageFormat format)
{
    bool bRet = false;
    CCAssert(format == kCCImageFormatJPEG || format == kCCImageFormatPNG,
             "the image can only be saved as JPG or PNG format");

    CCImage *pImage = newCCImage(true);
    if (pImage)
    {
        std::string fullpath = CCFileUtils::sharedFileUtils()->getWritablePath() + fileName;

        /* True in original sources, false in our tweak, in order to force RGBA and not RGB */
        bRet = pImage->saveToFile(fullpath.c_str(), true);
    }

    CC_SAFE_DELETE(pImage);

    return bRet;
}