Bug 126926

Summary: [WebGL] WebGLRenderingContext::validateCompressedTexDimensions Improperly Calculates Values
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebGLAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, dino, esprehn+autocc, gyuyoung.kim, kondapallykalyan, roger_fong, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch dino: review+

Brent Fulgham
Reported 2014-01-13 12:22:31 PST
The logic in WebGLRenderingContext::validateCompressedTexDimensions is overly permissive. For example, it claims that 256x256 is a valid set of dimensions for a 1x1 buffer.
Attachments
Patch (4.94 KB, patch)
2014-01-14 17:49 PST, Brent Fulgham
dino: review+
Brent Fulgham
Comment 1 2014-01-14 16:34:03 PST
Brent Fulgham
Comment 2 2014-01-14 16:52:03 PST
Part of the problem is that it doesn't actually validate that the dimensions are correct, just that they are even multiples of the compression block size.
Brent Fulgham
Comment 3 2014-01-14 17:49:27 PST
Dean Jackson
Comment 4 2014-01-14 17:52:44 PST
Comment on attachment 221218 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=221218&action=review > Source/WebCore/html/canvas/WebGLRenderingContext.cpp:5391 > + const GC3Dint maxTextureSize = (target) ? m_maxTextureSize : m_maxCubeMapTextureSize; No need for ()
Brent Fulgham
Comment 5 2014-01-14 17:59:42 PST
Brent Fulgham
Comment 7 2014-01-15 09:06:08 PST
(In reply to comment #6) > Still seeing some test output diffs: > http://build.webkit.org/results/Apple%20Mavericks%20Release%20WK2%20(Tests)/r162050%20(2225)/fast/canvas/webgl/webgl-compressed-texture-size-limit-pretty-diff.html I added a ML baseline for the difference in driver error output.
Brent Fulgham
Comment 8 2014-01-15 09:06:40 PST
Note You need to log in before you can comment on or make changes to this bug.