nir: gather if a fragment shader uses sample shading

This introduces a new flag in shader_info to know if a fragment
shader uses sample shading, even if there is no inputs.

During NIR linking, constants varyings are optimized and the
per-sample interpolation info (ie. the sample qualifier) might
be removed if nir_shader_gather_info() is called again.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7876>
This commit is contained in:
Samuel Pitoiset
2020-12-02 16:18:13 +01:00
parent c0aa3c8323
commit 128b2de63b
2 changed files with 16 additions and 0 deletions

View File

@@ -286,6 +286,11 @@ typedef struct shader_info {
*/
bool uses_sample_qualifier:1;
/**
* Whether sample shading is used.
*/
bool uses_sample_shading:1;
/**
* Whether early fragment tests are enabled as defined by
* ARB_shader_image_load_store.