st/nine: Fix a crash if the state is not initialized
authorAxel Davy <davyaxel0@gmail.com>
Sun, 26 Jan 2020 19:40:00 +0000 (20:40 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 15 May 2020 15:43:57 +0000 (15:43 +0000)
commit725ebc4657d27349ed586e5c178d5b1a971587cd
tree3bf73c6fafa036c4ef427effc9f51f2fae4aef70
parent0222c550c726f0b80d083681d749e2891b11a318
st/nine: Fix a crash if the state is not initialized

I don't remember exactly the conditions of the crash,
but I had a trace which was crashing in the gallium driver
before doing any rendering (something about viewports being not initialized).

It's not the first time we hit such a problem, so rather than investigating
that crash, I chose to just initialize every states at device creation.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
src/gallium/frontends/nine/device9.c
src/gallium/frontends/nine/nine_state.c
src/gallium/frontends/nine/nine_state.h