loadImage for GLES2 Rendersystem changes underlying Image format

Description

The code for GLES2HardwarePixelBuffer::blitFromMemory changes the format of the pixel box it receives as argument. In the case of an incoming src with format PF_R8G8B8 it will convert it to PF_B8G8R8 (will do scaled=src and then a bulkPixelConversion from src to scaled). In the case of the pixelbox coming from and Image object, the format for the image is unchanged, though the underlaying data is, so this effectively swaps the blue and red channel. Possible workarounds include:

  • Doing the bulkPixelConversion again after the data has been copied

  • changing scaled=src for scaled=mBuffer.getSubVolume(dstBox) at line 140 (though I don't know if this is correct, it works)

Environment

GLES2 Emulation on x86 Linux

Assignee

Unassigned

Reporter

Leonardo Scandolo

Labels

None

Components

Fix versions

Affects versions

Priority

Critical
Configure