[Piglit] [PATCH] arb_direct_state_access-texunits: fix incorrect error test
Tapani Pälli
tapani.palli at intel.com
Fri Oct 2 10:55:44 PDT 2015
Indeed, sorry I did not notice this before :)
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
On 10/01/2015 12:34 AM, Brian Paul wrote:
> Check for GL_INVALID_VALUE, not GL_INVALID_OPERATION. The extension spec
> isn't clear on this, but GL_INVALID_VALUE is typically generated for
> out-of-range int/uint values.
>
> That's what NVIDIA does. Plus, that's what the other bind-texture-unit
> piglit test checks for at line 91. Let's at least be consistent.
> ---
> tests/spec/arb_direct_state_access/texunits.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/tests/spec/arb_direct_state_access/texunits.c b/tests/spec/arb_direct_state_access/texunits.c
> index ccf7779..0d77efa 100644
> --- a/tests/spec/arb_direct_state_access/texunits.c
> +++ b/tests/spec/arb_direct_state_access/texunits.c
> @@ -117,11 +117,13 @@ test_texture_params(void)
>
> maxUnit = MAX2(MaxTextureCombinedUnits, MaxTextureCoordUnits);
>
> - /* this should generate an error */
> + /* This should generate an error. The GL_ARB_direct_state_access extension
> + * isn't explicit about which error should be generated, but the typical
> + * error for a out-of-range int/uint is GL_INVALID_VALUE. That's what
> + * NVIDIA's driver does.
> + */
> glBindTextureUnit(maxUnit, tex[0]);
> - /* INVALID_OPERATION is expected */
> - /* (see the GL 4.4 spec for glBindTextures) */
> - if (!piglit_check_gl_error(GL_INVALID_OPERATION)) {
> + if (!piglit_check_gl_error(GL_INVALID_VALUE)) {
> return false;
> }
>
More information about the Piglit
mailing list