gallium: Only call dri_init_options when the screen is actually created
authorCorentin Noël <corentin.noel@collabora.com>
Wed, 24 May 2023 14:32:26 +0000 (16:32 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 13 Jun 2023 10:10:41 +0000 (10:10 +0000)
commit4d25ae350f75c36aa09f815966ec4360d175bf03
treeda0916d11ba7d77e3be9745cbb1f9beba1d22354
parent09f65f266e99a9d1764bd1c8df849042f200dbba
gallium: Only call dri_init_options when the screen is actually created

Avoid calling this function on screen creation failure as we will discard its
result right after.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23054>
src/gallium/frontends/dri/dri2.c
src/gallium/frontends/dri/drisw.c
src/gallium/frontends/dri/kopper.c