Bug 36574 - Inconsistent failure modes from uniform[Matrix]* with null WebGLUniformLocation
Summary: Inconsistent failure modes from uniform[Matrix]* with null WebGLUniformLocation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Kenneth Russell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-24 20:17 PDT by Kenneth Russell
Modified: 2010-04-03 00:49 PDT (History)
6 users (show)

See Also:


Attachments
Patch (28.11 KB, patch)
2010-04-02 16:13 PDT, Kenneth Russell
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Russell 2010-03-24 20:17:45 PDT
The JSC and V8 custom bindings produce different failure modes when uniformMatrix4fv (and, likely, other uniform calls) are made with a null WebGLUniformLocation. V8 synthesizes a DOM SYNTAX_ERR. JSC allows the null value to go through to the WebGLRenderingContext, which synthesizes an INVALID_VALUE OpenGL error. The latter behavior is desired, and the V8 custom bindings should be changed to match it.
Comment 1 Kenneth Russell 2010-04-02 16:13:24 PDT
Created attachment 52462 [details]
Patch
Comment 2 Darin Fisher (:fishd, Google) 2010-04-02 21:41:14 PDT
Comment on attachment 52462 [details]
Patch

> Index: WebCore/html/canvas/WebGLRenderingContext.cpp

> +    if (!location) {
> +        m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
> +        return;
> +    }
> +
> +    if (location->program() != m_currentProgram) {
>          m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
>          return;
>      }

R=me, but perhaps we should have a helper method for this replicated code.
Comment 3 WebKit Commit Bot 2010-04-03 00:29:51 PDT
Comment on attachment 52462 [details]
Patch

Rejecting patch 52462 from commit-queue.

Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--quiet']" exit_code: 1
Running build-dumprendertree
Compiling Java tests
make: Nothing to be done for `default'.
Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests
Testing 12621 test cases.
transitions/transition-end-event-transform.html -> failed

Exiting early after 1 failures. 11643 tests run.
287.40s total testing time

11642 test cases (99%) succeeded
1 test case (<1%) had incorrect layout
10 test cases (<1%) had stderr output

Full output: http://webkit-commit-queue.appspot.com/results/1653117
Comment 4 Adam Barth 2010-04-03 00:33:51 PDT
Comment on attachment 52462 [details]
Patch

Let's try again.
Comment 5 WebKit Commit Bot 2010-04-03 00:49:27 PDT
Comment on attachment 52462 [details]
Patch

Clearing flags on attachment: 52462

Committed r57049: <http://trac.webkit.org/changeset/57049>
Comment 6 WebKit Commit Bot 2010-04-03 00:49:32 PDT
All reviewed patches have been landed.  Closing bug.