[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Non-binding context creation attributes, specifically 'stencil'

On Fri, Apr 27, 2012 at 7:30 PM, Kenneth Russell <kbr@google.com> wrote:
> On Tue, Apr 17, 2012 at 7:23 PM, Mark Callow <callow_mark@hicorp.co.jp> wrote:
>> On 17/04/2012 23:07, Cedric Vivier wrote:
>> I don't think the Chrome behavior is acceptable.
>> ... (ie. "If the value is false, no stencil buffer is
>> available." as written in the spec)...
>> +1
>> Seem's we need a conformance test for this.
>> I can no longer recall why we made the attributes non-binding, except for
>> anti-alias, which is not available in all OpenGL ES 2.0 implementations.
> I'm currently investigating this. Here are the results so far:
> History: there was a supposition that some combinations of depth and
> stencil may not be supported by certain hardware; for example,
> requesting a stencil buffer but no depth buffer. Further, there was a
> supposition that it would be difficult to emulate the behavior that
> one or the other buffer was missing, if under the hood, the buffer was
> actually allocated.
> However, in light of the current situation I agree that it's bad for
> compatibility that depth and stencil are non-binding. Jeff, I agree
> with you that the spec should be changed so that if depth or stencil
> are false, that the context acts as though those buffers aren't
> present, even if they are allocated under the hood. It doesn't *seem*
> to be that difficult to emulate the absence of a depth or stencil
> buffer.
> Is there agreement that the spec should be updated in this manner? If
> so, I'll make this change.
> Here's the interesting part: Chrome, like Firefox, attempts to act as
> though there is no stencil buffer if the context is allocated with
> {stencil:false}. However, something is going wrong in this emulation.
> The conformance test
> context/context-attributes-alpha-depth-stencil-antialias.html attempts
> to verify this behavior, but isn't catching the problem that the demo
> exposes. I'll continue to investigate why the demo slips by this
> emulation and update the conformance test to catch the bug.

The root cause of the issue in Chrome was that if "depth:true,
stencil:false" was passed in the context creation attributes, a
stencil buffer was actually being allocated (i.e.
getContextAttributes().stencil was true). This was a recent
regression, I believe. https://bugs.webkit.org/show_bug.cgi?id=85317
has been filed to fix this in Chrome and Safari.

The spec has been updated to indicate that a "false" value for any of
the depth, stencil or antialias context creation attributes must be
honored. context-attributes-alpha-depth-stencil-antialias.html has
been updated to verify a couple of cases it was missing (and would now
have caught the original issue).

Thanks for pointing out this issue; please post if there are any
problems with the changes above.


You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl