[Mesa-dev] [PATCH] mesa/main: TexImage2DMultisample needs to pass OpenGL3.3 conformance test.

Lofstedt, Marta marta.lofstedt at intel.com
Wed Nov 25 03:29:00 PST 2015


> -----Original Message-----
> From: mesa-dev [mailto:mesa-dev-bounces at lists.freedesktop.org] On
> Behalf Of Tapani Pälli
> Sent: Wednesday, November 25, 2015 12:24 PM
> To: Timothy Arceri; Predut, Marius; mesa-dev at lists.freedesktop.org
> Subject: Re: [Mesa-dev] [PATCH] mesa/main: TexImage2DMultisample
> needs to pass OpenGL3.3 conformance test.
> 
> On 11/25/2015 01:11 PM, Timothy Arceri wrote:
> > On Wed, 2015-11-25 at 12:47 +0200, Tapani Pälli wrote:
> >> Hi;
> >>
> >> On 11/25/2015 01:15 PM, Marius Predut wrote:
> >>> Open GL 3.3 reference document says:
> >>> samples must be in the range zero to GL_MAX_TEXTURE_SIZE - 1.
> >>> Open GL.4 clearly states:
> >>> An INVALID_VALUE error is generated if samples is zero.
> > See my comment in bugzilla [1] I believe this is just a bug in the
> > reference pages, we implement things in Mesa going by what the spec
> > says and the spec says nothing about samples being 0 in the 3.2 spec
> > in fact it doen't even say anything in the 4.0 spec which you have
> > changed the check to.
> >
> > Also the 4.5 reference pages also conflict with the spec so this is
> > even more reason I think this change is wrong.
> >
> > [1] https://bugs.freedesktop.org/show_bug.cgi?id=91670
> 
> I believe there is some background to this change, AFAIK the reason to push
> this would be to get desktop GL CTS test suite (which we currently run
> against GL 3.x)  behave better. Marius, is this right?
> 

There is also the option of filing a BUG against the CTS.

> 
> >> OpenGL ES 3.1 spec also says "An INVALID_VALUE error is generated if
> >> samples is zero.". You'll need to change you check below to include
> >> also ES 3.1.
> >>
> >>> Fixing the piglit test case gl-3.2-layered-rendering
> >>> -framebuffertexture.
> >>>
> >>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93100
> >>>
> >>> Signed-off-by: Marius Predut <marius.predut at intel.com>
> >>> ---
> >>>    src/mesa/main/teximage.c | 2 +-
> >>>    1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> >>> index d9453e3..69634ff 100644
> >>> --- a/src/mesa/main/teximage.c
> >>> +++ b/src/mesa/main/teximage.c
> >>> @@ -5211,7 +5211,7 @@ texture_image_multisample(struct gl_context
> >>> *ctx, GLuint dims,
> >>>          return;
> >>>       }
> >>>
> >>> -   if (samples < 1) {
> >>> +   if (samples < 1 && ctx->API == API_OPENGL_CORE && ctx->Version
> >>>> = 40) {
> >>>          _mesa_error(ctx, GL_INVALID_VALUE, "%s(samples < 1)",
> >>> func);
> >>>          return;
> >>>       }
> >> _______________________________________________
> >> mesa-dev mailing list
> >> mesa-dev at lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list