[Piglit] [PATCH] glBeginConditionalRenderNV begin zero
Zhou, Jin
Jin.Zhou at amd.com
Fri Dec 13 23:34:24 PST 2013
I agree. Should I submit the new change again ? Or you commit the patch since you have the right patch now.
Thanks,
Jin
-----Original Message-----
From: piglit-bounces at lists.freedesktop.org [mailto:piglit-bounces at lists.freedesktop.org] On Behalf Of Ian Romanick
Sent: Saturday, December 14, 2013 3:59 AM
To: Jin Zhou; piglit at lists.freedesktop.org
Subject: Re: [Piglit] [PATCH] glBeginConditionalRenderNV begin zero
On 12/10/2013 04:08 AM, Jin Zhou wrote:
> From: Jin Zhou <jin.zhou at amd.com>
>
> a INVALID_VALUE error should be genrated, instead of INVALID_OPERATION
>
> ---
> tests/spec/nv_conditional_render/begin-zero.c | 13 ++++---------
> 1 file changed, 4 insertions(+), 9 deletions(-) mode change 100644
> => 100755 tests/spec/nv_conditional_render/begin-zero.c
>
> diff --git a/tests/spec/nv_conditional_render/begin-zero.c
> b/tests/spec/nv_conditional_render/begin-zero.c
> old mode 100644
> new mode 100755
> index 3d85b92..c898499
> --- a/tests/spec/nv_conditional_render/begin-zero.c
> +++ b/tests/spec/nv_conditional_render/begin-zero.c
> @@ -27,17 +27,12 @@
> * @file begin-zero.c
> *
> * Tests that starting conditional rendering on a 0 query object
> - * results in INVALID_OPERATION.
> + * results in INVALID_VALUE.
> *
> * From the NV_conditional_render spec:
> *
> - * "BeginQuery sets the active query object name for the query
> - * type given by <target> to <id>. If BeginQuery is called with
> - * an <id> of zero, if the active query object name for <target>
> - * is non-zero, if <id> is the active query object name for any
> - * query type, or if <id> is the active query object for
> - * condtional rendering (Section 2.X), the error INVALID
> - * OPERATION is generated."
> + * "INVALID_VALUE is generated by BeginConditionalRenderNVX if <id> is not the
> + * name of an existing occlusion query object."
This isn't a test of NVX_conditional_render, so quoting that specification is inappropriate. It looks like the test quoted the wrong part of the correct spec. That should have been obvious since the text mentions BeginQuery but the test calls BeginConditionalRenderNV. :(
How about if we change the comment to:
/**
* @file begin-zero.c
*
* Tests that starting conditional rendering on a 0 query object
* results in INVALID_VALUE.
*
* From the NV_conditional_render spec:
*
* "If BeginConditionalRenderNV is called while conditional rendering is
* in progress, or if EndConditionalRenderNV is called while conditional
* rendering is not in progress, the error INVALID_OPERATION is
* generated. The error INVALID_VALUE is generated if <id> is not the
* name of an existing query object query."
*/
With that change, this patch is
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
> */
>
> PIGLIT_GL_TEST_CONFIG_BEGIN
> @@ -64,7 +59,7 @@ piglit_init(int argc, char **argv)
> piglit_require_extension("GL_NV_conditional_render");
>
> glBeginConditionalRenderNV(0, GL_QUERY_WAIT_NV);
> - if (!piglit_check_gl_error(GL_INVALID_OPERATION))
> + if (!piglit_check_gl_error(GL_INVALID_VALUE))
> piglit_report_result(PIGLIT_FAIL);
>
> piglit_report_result(PIGLIT_PASS);
>
_______________________________________________
Piglit mailing list
Piglit at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit
More information about the Piglit
mailing list