freedreno: Fix assertion failures on GS/tess shaders with shader-db enabled.
authorEric Anholt <eric@anholt.net>
Wed, 15 Apr 2020 21:21:07 +0000 (14:21 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 1 May 2020 16:26:32 +0000 (16:26 +0000)
commit05be0659fe33727d2bd26b68994fdff4cad006dd
tree9363ab55aadb46c173f0a4ee4cbfc34ca7bb42db
parentf91e49ee29b6c513f7b6837c8c169f0438dd1b50
freedreno: Fix assertion failures on GS/tess shaders with shader-db enabled.

We weren't filling in the tess mode of the key, or setting has_gs on GS
shaders, resulting in assertion failures when NIR intrinsics didn't get
lowered.

We have to make a guess at prim mode for TCS, but it should be better to
have some shader-db coverage than none, and it will avoid these failures
happening when we start precompiling shaders.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4562>
src/freedreno/ir3/ir3_shader.h
src/gallium/drivers/freedreno/a6xx/fd6_draw.c
src/gallium/drivers/freedreno/ir3/ir3_gallium.c