Bug 126926 - [WebGL] WebGLRenderingContext::validateCompressedTexDimensions Improperly Calculates Values
Summary: [WebGL] WebGLRenderingContext::validateCompressedTexDimensions Improperly Cal...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-01-13 12:22 PST by Brent Fulgham
Modified: 2014-01-15 09:06 PST (History)
9 users (show)

See Also:


Attachments
Patch (4.94 KB, patch)
2014-01-14 17:49 PST, Brent Fulgham
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 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.
Comment 1 Brent Fulgham 2014-01-14 16:34:03 PST
<rdar://problem/15818118>
Comment 2 Brent Fulgham 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.
Comment 3 Brent Fulgham 2014-01-14 17:49:27 PST
Created attachment 221218 [details]
Patch
Comment 4 Dean Jackson 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 ()
Comment 5 Brent Fulgham 2014-01-14 17:59:42 PST
Committed r162031: <http://trac.webkit.org/changeset/162031>
Comment 7 Brent Fulgham 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.
Comment 8 Brent Fulgham 2014-01-15 09:06:40 PST
ML Rebaseline in https://trac.webkit.org/r162070.