anv: move force shading rate writes checks
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 15 Mar 2022 13:50:31 +0000 (15:50 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 17 Apr 2023 22:43:37 +0000 (22:43 +0000)
commite82b05dc644098c371b0adb332b927cfd21dd74c
tree7daecb090fc92a356ee6f3b9f0179a8802bcd591
parentb2d3d818d57b9288fcdd98965c81d981540b1aba
anv: move force shading rate writes checks

With variable fragment shading rate, the last pre-rasterization stage
is responsible to write the shading rate value.

The current checks is as follow :

   If the fragment shader can be dispatched at variable shading rate,
   look for the last pre-raster stage to force the write.

We change this to :

   If we're the last pre-raster stage, force the write.

That way this works for pre-rasterization shaders compiled without a
fragment shader.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15637>
src/intel/vulkan/anv_pipeline.c