[Piglit] [PATCH] arb_texture_multisample: add error check for samples == 0

Dylan Baker baker.dylan.c at gmail.com
Mon Aug 17 14:38:47 PDT 2015


Thanks Timothy.

For future reference (Since I think you're testing on i965), if you
notice that a test fails on i965 when committed if you could add that to
the commit message that helps our QA efforts tremendously.

Obviously if you're not testing against i915 or i965, or the failure
doesn't apply to all of mesa don't worry about it.

Thanks

On Mon, Aug 17, 2015 at 10:06:12PM +1000, Timothy Arceri wrote:
> On Mon, 2015-08-17 at 14:14 +0300, Tapani Pälli wrote:
> > Please add comment to commit message that this currently fails with Mesa 
> > (otherwise QA may file a bug about it).
> 
> Thanks. In that case I'll just hold onto it until the mesa patch lands.
> 
> > 
> > Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
> On 08/17/2015 02:05 PM, Timothy Arceri wrote:
> > > Test results:
> > > Nvidia GeForce 840M - NVIDIA 346.47: pass
> > > 
> > > Cc: Tapani Pälli <tapani.palli at intel.com>
> > > ---
> > >   tests/spec/arb_texture_multisample/errors.c | 20 ++++++++++++++++----
> > >   1 file changed, 16 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/tests/spec/arb_texture_multisample/errors.c 
> > > b/tests/spec/arb_texture_multisample/errors.c
> > > index 0c16f4e..ba9f1e6 100644
> > > --- a/tests/spec/arb_texture_multisample/errors.c
> > > +++ b/tests/spec/arb_texture_multisample/errors.c
> > > @@ -41,13 +41,14 @@ piglit_init(int argc, char **argv)
> > >   {
> > >       /* test some new error cases */
> > > 
> > > -    GLuint fbo, tex;
> > > +    GLuint fbo;
> > > +    GLuint tex[2];
> > >       glGenFramebuffers(1, &fbo);
> > > 
> > >       glBindFramebuffer(GL_FRAMEBUFFER, fbo);
> > > 
> > > -    glGenTextures(1, &tex);
> > > -    glBindTexture(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, tex);
> > > +    glGenTextures(2, tex);
> > > +    glBindTexture(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, tex[0]);
> > >       glTexImage3DMultisample(GL_TEXTURE_2D_MULTISAMPLE_ARRAY,
> > >               4, GL_RGBA, 64, 64, 2, GL_TRUE);
> > > 
> > > @@ -57,7 +58,7 @@ piglit_init(int argc, char **argv)
> > >       }
> > > 
> > >       /* binding a negative layer should fail */
> > > -    glFramebufferTextureLayer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, tex, 
> > > 0, -1);
> > > +    glFramebufferTextureLayer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 
> > > tex[0], 0, -1);
> > > 
> > >       if (!piglit_check_gl_error(GL_INVALID_VALUE)) {
> > >           printf("glFramebufferTextureLayer w/ negative layer must "
> > > @@ -65,5 +66,16 @@ piglit_init(int argc, char **argv)
> > >           piglit_report_result(PIGLIT_FAIL);
> > >       }
> > > 
> > > +    /* An INVALID_VALUE error is generated if samples is zero. */
> > > +    glBindTexture(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, tex[1]);
> > > +    glTexImage3DMultisample(GL_TEXTURE_2D_MULTISAMPLE_ARRAY,
> > > +            0, GL_RGBA, 64, 64, 2, GL_TRUE);
> > > +
> > > +    if (!piglit_check_gl_error(GL_INVALID_VALUE)) {
> > > +        printf("glFramebufferTextureLayer w/ sampler == 0 must "
> > > +                "emit GL_INVALID_VALUE but did not\n");
> > > +        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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150817/3446c7c1/attachment.sig>


More information about the Piglit mailing list