WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
48877
[chromium] WebGL isFoo() tests fail in command buffer
https://bugs.webkit.org/show_bug.cgi?id=48877
Summary
[chromium] WebGL isFoo() tests fail in command buffer
Adrienne Walker
Reported
2010-11-02 15:11:35 PDT
Created
attachment 72748
[details]
Add this test to LayoutTests/fast/canvas/webgl There are unexpected errors when running the attached file on WebKit
r70788
(run with run-safari). This works fine in Chromium at the same WebKit revision. I would expect gl.isBuffer(gl.createBuffer()) to return true. Oddly, the object-deletion-behaviour.html should cover this test, but it doesn't. Once fixed, perhaps this more simple test should be pushed to the conformance suite. Here's the actual output from the test: PASS buffer = gl.createBuffer() was expected value: NO_ERROR. PASS framebuffer = gl.createFramebuffer() was expected value: NO_ERROR. PASS program = wtu.setupSimpleTextureProgram(gl) was expected value: NO_ERROR. PASS renderbuffer = gl.createRenderbuffer() was expected value: NO_ERROR. PASS shader = gl.createShader(gl.VERTEX_SHADER) was expected value: NO_ERROR. PASS texture = gl.createTexture() was expected value: NO_ERROR. FAIL gl.isBuffer(buffer) should be true. Was false. FAIL gl.isFramebuffer(framebuffer) should be true. Was false. PASS gl.isProgram(program) is true FAIL gl.isRenderbuffer(renderbuffer) should be true. Was false. PASS gl.isShader(shader) is true FAIL gl.isTexture(texture) should be true. Was false. PASS successfullyParsed is true TEST COMPLETE
Attachments
Add this test to LayoutTests/fast/canvas/webgl
(1.78 KB, text/html)
2010-11-02 15:11 PDT
,
Adrienne Walker
no flags
Details
Patch
(7.05 KB, patch)
2010-11-09 17:26 PST
,
Adrienne Walker
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kenneth Russell
Comment 1
2010-11-03 19:01:24 PDT
It looks like the reason is this sentence in the documentation for glIsBuffer: "A name returned by glGenBuffers, but not yet associated with a buffer object by calling glBindBuffer, is not the name of a buffer object." Chromium's command buffer OpenGL implementation is actually probably incorrect here. Chromium fails this test when run with --in-process-webgl. Either the WebGL implementation needs to be changed to always temporarily bind a newly created buffer so that it returns true from isBuffer, or the test needs to be updated to do so. Either way the command buffer OpenGL code probably (unfortunately) needs to change behavior to be correct.
Adrienne Walker
Comment 2
2010-11-04 09:09:39 PDT
(In reply to
comment #1
)
> It looks like the reason is this sentence in the documentation for glIsBuffer: > > "A name returned by glGenBuffers, but not yet associated with a buffer object by calling glBindBuffer, is not the name of a buffer object."
Thanks for the clarification. It looks like the command buffer will need to be fixed.
Kenneth Russell
Comment 3
2010-11-04 16:53:43 PDT
Because WebGL tries to track OpenGL behavior, I think that the conformance test should bind the objects it creates appropriately before making the is* queries. Adrienne, can you take care of this in the Khronos repo and pull the test down to the WebKit layout tests?
Adrienne Walker
Comment 4
2010-11-04 17:34:01 PDT
(In reply to
comment #3
)
> Because WebGL tries to track OpenGL behavior, I think that the conformance test should bind the objects it creates appropriately before making the is* queries. Adrienne, can you take care of this in the Khronos repo and pull the test down to the WebKit layout tests?
I'm not sure I follow. The above posted test was an example, that's not part of any existing test in the Khronos repository. If you're asking that we fix the command buffer to follow this behavior and then add a test verifying that calling isBuffer on a non-bound buffer returns false, then I agree.
Kenneth Russell
Comment 5
2010-11-04 17:37:58 PDT
(In reply to
comment #4
)
> (In reply to
comment #3
) > > Because WebGL tries to track OpenGL behavior, I think that the conformance test should bind the objects it creates appropriately before making the is* queries. Adrienne, can you take care of this in the Khronos repo and pull the test down to the WebKit layout tests? > > I'm not sure I follow. The above posted test was an example, that's not part of any existing test in the Khronos repository.
Ah. I thought this was one of the conformance tests in the Khronos repo.
> If you're asking that we fix the command buffer to follow this behavior and then add a test verifying that calling isBuffer on a non-bound buffer returns false, then I agree.
To be precise, a buffer that has never been bound. Once the name is bound, it becomes a buffer object. My thought is that we could add a test that allocates each type of object, binds / unbinds it once, and verifies that is* returns true for the object. We can add the test verifying that is* returns false before the object is bound once the command buffer code is fixed.
Adrienne Walker
Comment 6
2010-11-09 17:26:46 PST
Created
attachment 73442
[details]
Patch
Kenneth Russell
Comment 7
2010-11-10 10:17:30 PST
Comment on
attachment 73442
[details]
Patch Good catch and looks good overall. Per Brian Paul's comments on the Mesa bug you filed, if real drivers have incorrect behavior (and it seems that some do) then we may have a problem. In this case we would need to make the test more conservative, and only call isBuffer, isFramebuffer, etc. after the first bind of the object. Please add the test to the Khronos repo if you haven't already.
WebKit Commit Bot
Comment 8
2010-11-10 10:37:43 PST
Comment on
attachment 73442
[details]
Patch Clearing flags on attachment: 73442 Committed
r71753
: <
http://trac.webkit.org/changeset/71753
>
WebKit Commit Bot
Comment 9
2010-11-10 10:37:48 PST
All reviewed patches have been landed. Closing bug.
Adrienne Walker
Comment 10
2010-11-10 10:57:01 PST
Thanks. (In reply to
comment #7
)
> (From update of
attachment 73442
[details]
) > Good catch and looks good overall. Per Brian Paul's comments on the Mesa bug you filed, if real drivers have incorrect behavior (and it seems that some do) then we may have a problem. In this case we would need to make the test more conservative, and only call isBuffer, isFramebuffer, etc. after the first bind of the object.
At the very least, the driver for the ATI card in my OS X machine had correct behavior. We can certainly adjust this test later if this is a commonly mishandled edge case.
> Please add the test to the Khronos repo if you haven't already.
Done.
Zhenyao Mo
Comment 11
2010-11-10 13:26:52 PST
(In reply to
comment #10
)
> Thanks. > > (In reply to
comment #7
) > > (From update of
attachment 73442
[details]
[details]) > > Good catch and looks good overall. Per Brian Paul's comments on the Mesa bug you filed, if real drivers have incorrect behavior (and it seems that some do) then we may have a problem. In this case we would need to make the test more conservative, and only call isBuffer, isFramebuffer, etc. after the first bind of the object. > > At the very least, the driver for the ATI card in my OS X machine had correct behavior. We can certainly adjust this test later if this is a commonly mishandled edge case.
My Mac (Nvidia) also has the correct behavior, but my Windows (NVidia Quadro FX380) doesn't. So my guess is Mac drivers get this correct, but not other platforms.
> > > Please add the test to the Khronos repo if you haven't already. > > Done.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug