There is a bug affecting CG port in the texture packing code when the destination type is float. The possible formats from DOM elements or ImageData are specified in function srcFormatComeFromDOMElementOrImageData() which was defined in GraphicsContext3D.h. For non-CG port, it could be only BGRA8 or RGBA8 only. But for CG port, there are several other possible formats. In the FormatConverter::convert(...) function, when the destination type is float, if the source format type is not float, then the source format must be from DOM elements or ImageData. In the conditional statement to check this kinds of combination, the possible source formats are hard coded to RGBA8 and BGRA8 which would result in early return for CG port when the source formats are of other possible formats(RGB8, etc). Moreover, there is a more precise checking for source formats from DOM elements or ImageData afterwards and the checking code stated above is really redundant. The other issue is that the unpack functions to convert other possible source formats(RGB8, etc) to RGBA32F is missing. What we need to do is adding those missing functions and remove the non-accurate checking code. Then it will go to the checking code like "if (!srcFormatComesFromDOMElementOrImageData && SrcFormat != DstFormat)" and make the right decision.
Created attachment 186343 [details] Patch
Comment on attachment 186343 [details] Patch Thanks for the patch. The fix looks good. r=me
Comment on attachment 186343 [details] Patch Clearing flags on attachment: 186343 Committed r141843: <http://trac.webkit.org/changeset/141843>
All reviewed patches have been landed. Closing bug.