st/glsl_to_tgsi: move nir detection earlier
authorTimothy Arceri <tarceri@itsqueeze.com>
Tue, 30 Jan 2018 00:56:57 +0000 (11:56 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 9 Feb 2018 23:59:10 +0000 (10:59 +1100)
commit97efdc0d57b3b9b6af4a40715482a15f2b8c7d6e
tree8a2d6fe08814740f6bbdf099bd0bab477ebdbc08
parentb5e23887fe86478a63b3b602de32909a641f268f
st/glsl_to_tgsi: move nir detection earlier

We move the nir check before the shader cache call so that we can
call a nir based caching function in a following patch.

Also with this change we simply check if vertex shaders support
NIR rather than looping over the stages as mixing of shader types
is not supported anyway.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp