[Mesa-stable] [Mesa-dev] [PATCH] mesa/texture: Also check for LA texture when querying intensity component size
Gert Wollny
gert.wollny at collabora.com
Wed Sep 12 12:30:00 UTC 2018
Am Mittwoch, den 12.09.2018, 01:24 +0300 schrieb Andres Gomez:
> Gert, should we also include this in the stable queues ?
Yes, Andres, that seems to make sense, thanks for checking back,
best,
Gert
>
> On Mon, 2018-09-10 at 12:39 +0200, Gert Wollny wrote:
> > From: Gert Wollny <gert.wollny at collabora.com>
> >
> > Gallium may pick L16A16_FLOAT to represent GL_INTENSITY16F if no
> > intensity
> > format is provided by the driver. However, when calling
> >
> > glGetTexLevelParameteriv(..., GL_TEXTURE_INTENSITY_SIZE, ...)
> >
> > mesa will return a zero size because the actually used format has
> > no
> > intensity channel and as a fallback only the sizes of the red/green
> > channels are checked.
> >
> > Also checking for LA sizes in the allocated texture resolves this
> > problem.
> >
> > Fixes (on virgl):
> > ext_framebuffer_multisample-fast-clear GL_ARB_texture_float *
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107832
> >
> > Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
> > ---
> > src/mesa/main/texparam.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
> > index b5d86d64d5..643a349328 100644
> > --- a/src/mesa/main/texparam.c
> > +++ b/src/mesa/main/texparam.c
> > @@ -1426,6 +1426,13 @@ get_tex_level_parameter_image(struct
> > gl_context *ctx,
> > _mesa_get_format_bits(texFormat,
> > GL_TEXTURE_GRE
> > EN_SIZE));
> > }
> > + if (*params == 0 && pname ==
> > GL_TEXTURE_INTENSITY_SIZE) {
> > + /* Gallium may store intensity as LA */
> > + *params = MIN2(_mesa_get_format_bits(texFormat,
> > + GL_TEXTURE_LUM
> > INANCE_SIZE),
> > + _mesa_get_format_bits(texFormat,
> > + GL_TEXTURE_ALP
> > HA_SIZE));
> > + }
> > }
> > else {
> > *params = 0;
More information about the mesa-stable
mailing list