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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user