[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Non-binding context creation attributes, specifically 'stencil'
- To: Mark Callow <callow_mark@hicorp.co.jp>
- Subject: Re: [Public WebGL] Non-binding context creation attributes, specifically 'stencil'
- From: Kenneth Russell <kbr@google.com>
- Date: Tue, 1 May 2012 16:28:35 -0700
- Cc: Cedric Vivier <cvivier@mozilla.com>, Jeff Gilbert <jgilbert@mozilla.com>, public webgl <public_webgl@khronos.org>, Gregg Tavares <gman@google.com>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-system-of-record; bh=fkEEfh8J04ZwKy01np6+RGkK8eaMpmQGJp+cIegz7xQ=; b=UmINRfeUJ4X9iu+w8+Srg+Zmy4i7h8g76NGIsmcdR0fLIOrdANXMVZlma8/N2obxcE Wx/+MOjfIOSToRSxTroToDUr2PllRFK3iqmnx/PH8TVMZ4IFSHG0l/QTEa/b64M/3PQa bMK2UxYgatle708JTS5oKODwjMz9MCjTUcVZtlQS4mTBzLkErBeBwsJc+ms+hGlK/M10 KdrEH3TGe318U39MKA/Un0FfwmFEeCnx6L5idNyIY9o9zcRck09/dNX4vYqiG6fq/81d PfMd8hg3DPh6h1EvDhtJDMbOLwZT1CI2Wi2zRCkgHi7gYmduvVs4nzN4YTiSIwopJDeu o0SQ==
- In-reply-to: <CAMYvS2f=o6dEJzW50O1MShhRJhiHKKQ0gEeiBzVopFtOAnFs7A@mail.gmail.com>
- List-id: Public WebGL Mailing List <public_webgl.khronos.org>
- References: <1644089788.167904.1334632869364.JavaMail.root@zmmbox2.mail.corp.phx1.mozilla.com> <1637830467.168306.1334634331276.JavaMail.root@zmmbox2.mail.corp.phx1.mozilla.com> <CANG5uwSqo=DD0+-aM7H8+D0=j_V8BSySem_rVuM2xaKsjbbREA@mail.gmail.com> <4F8E25A3.2030602@hicorp.co.jp> <CAMYvS2f=o6dEJzW50O1MShhRJhiHKKQ0gEeiBzVopFtOAnFs7A@mail.gmail.com>
- Sender: owner-public_webgl@khronos.org
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.
-Ken
-----------------------------------------------------------
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
-----------------------------------------------------------