[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Error codes in drawArrays / drawElements
- To: Benoit Jacob <bjacob@mozilla.com>
- Subject: Re: [Public WebGL] Error codes in drawArrays / drawElements
- From: "Mo, Zhenyao" <zhenyao@gmail.com>
- Date: Thu, 3 Jun 2010 14:33:58 -0700
- Cc: Kenneth Russell <kbr@google.com>, public webgl <public_webgl@khronos.org>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=rp07PiR3RgTloOAzu40peJBR2+XvUEqf+MAi5bwT0vU=; b=WzhKjb82SWfr1GhWJwjazeYDnIGGYFk4OMWqUVEbW7aDGH8kshPmWfjzWZMSpRTXXR DOAOlwFpIdRldLNlLouv30nzAJJ+oJ0Hik/CFxGGBvkahhN4XkzobJAGmxZZdwuMQjQF dDZjldSjXFPmhm8OLai/j8O8Ccqljr/u+Pdd8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=mtmrk2VAlcfTffEMvv+UsIlR69IW9LSc0LxLbyzZB7dy/HSJMyXM5NdYwLcLJYtQqe i+NGik3wYYwgLUzkibMbpOLRHLMa7cZAA1vVeEmHDafubZVgRCpTpfp/pXthwkNnhmRz 62u8M1JRXULm2liqp6oO1RThEZxvQ+3RXHWsg=
- In-reply-to: <2013385593.343704.1275596266915.JavaMail.root@cm-mail03.mozilla.org>
- References: <444553213.343693.1275596182179.JavaMail.root@cm-mail03.mozilla.org> <2013385593.343704.1275596266915.JavaMail.root@cm-mail03.mozilla.org>
- Sender: owner-public_webgl@khronos.org
On Thu, Jun 3, 2010 at 1:17 PM, Benoit Jacob <bjacob@mozilla.com> wrote:
>
> ----- "Kenneth Russell" <kbr@google.com> wrote:
>
>> On Wed, Jun 2, 2010 at 3:22 PM, Benoit Jacob <bjacob@mozilla.com>
>> wrote:
>> > Hi,
>> >
>> > These Khronos tests suggests that in certain circumstances drawArray
>> / drawElements give INVALID_OPERATION, as opposed to INVALID_VALUE:
>> >
>> >
>> https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/fast/draw-arrays-out-of-bounds.html
>> >
>> https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/fast/draw-elements-out-of-bounds.html
>> >
>> > But neither the WebGL spec, nor the OpenGL ES documentation, say
>> that these functions can give INVALID_OPERATION.
>>
>> Section 4.1 of the WebGL indicates, but does not currently specify,
>> this behavior.
>>
>> We agreed at the F2F that generating an INVALID_OPERATION error will
>> be the specified behavior. The spec still needs to catch up but the
>> tests verify the intended behavior.
>
> Thanks for the answer, I now have a more specific question:
>
> From the draw-elements-out-of-bounds test:
>
> shouldGenerateGLError(context, context.INVALID_VALUE,
> "context.drawArrays(context.TRIANGLES, 0, -1)");
> shouldGenerateGLError(context, context.INVALID_OPERATION,
> "context.drawArrays(context.TRIANGLES, 1, 0)");
> shouldGenerateGLError(context, context.INVALID_VALUE,
> "context.drawArrays(context.TRIANGLES, -1, 0)");
> shouldGenerateGLError(context, context.INVALID_OPERATION,
> "context.drawArrays(context.TRIANGLES, 1, -1)");
> shouldGenerateGLError(context, context.INVALID_OPERATION,
> "context.drawArrays(context.TRIANGLES, -1, 1)");
>
> Could you please explain me the logic here, choosing between VALUE and OPERATION?
>
> Benoit
>
I think with negative first/count, it should generate INVALID_VALUE.
INVALID_OPERATION is for out-of-boundary errors.
For the situation where count==0 and first is out of boundary, I am
not sure if an error should be generated.
-----------------------------------------------------------
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: