[Mesa-dev] [PATCH] mesa: Prevent classic swrast crash on a surfaceless context.

Emil Velikov emil.l.velikov at gmail.com
Wed May 15 10:59:39 UTC 2019


On Wed, 15 May 2019 at 08:26, <Mathias.Froehlich at gmx.net> wrote:
>
> From: Mathias Fröhlich <mathias.froehlich at web.de>
>
> Hi all,
>
> One small fix below.
>
> Please review!
>
> best
>
> Mathias
>
>
>
>
>
> Running swrast with the new device egl extensions piglit test
> brings up this failure. Fix that by adding some NULL pointer
> checks.
>
>From a very quick look this seems to be off.

The driver does not set the buffers as incomplete, thus in MakeCurrent
(and handle_first_current in particular) things go south.

For context grep for _mesa_get_incomplete_framebuffer and see how
i9[16]5 use the function when both read/draw priv. are NULL.
The gallium drivers st/mesa (really) also do that, yet classic swrast
(alongside r100, r200, nouveau_vieux) don't do that. Which is
understandable since those drivers receive far less testing than the
rest.

Can I suggest fleshing out some helper and fixing the drivers instead?

Note !intel classic drivers may also struggle with (draw xor read)
surfaces. It could be handled in the upper layers (dri/common or DRI
loaders - GLX/EGL/GBM) but haven't checked.

Thanks
Emil


More information about the mesa-dev mailing list