|Summary:||Fix the issue that some possible source formats are ignored for float textures in texture packing for CG port|
|Product:||WebKit||Reporter:||Jun Jiang <jun.a.jiang>|
|Severity:||Normal||CC:||dino, kbr, webkit.review.bot|
|Version:||528+ (Nightly build)|
Description Jun Jiang 2013-02-04 03:43:49 PST
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.
Comment 2 Kenneth Russell 2013-02-04 18:03:38 PST
Comment on attachment 186343 [details] Patch Thanks for the patch. The fix looks good. r=me
Comment 3 WebKit Review Bot 2013-02-04 18:27:21 PST
Comment on attachment 186343 [details] Patch Clearing flags on attachment: 186343 Committed r141843: <http://trac.webkit.org/changeset/141843>
Comment 4 WebKit Review Bot 2013-02-04 18:27:24 PST
All reviewed patches have been landed. Closing bug.