summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>2023-02-02 19:44:26 -0500
committerMarge Bot <emma+marge@anholt.net>2023-02-04 17:26:30 +0000
commit93db6094a122a668e77ea27ee2129a1161958fc6 (patch)
treec6323c23754b889bc05f2f2bba31bcaf7fe2c2f2
parentb235be1fd4a66c1b9779abe9a9c338ce81312d2e (diff)
nir/print: Pretty-print color0/1_interp
These are an enum. Furthermore, their 0 state is INTERP_MODE_NONE which we shouldn't bother printing at all. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Emma Anholt <emma@anholt.net> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21091>
-rw-r--r--src/compiler/nir/nir_print.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index c8981102f61..294fca79031 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -2027,11 +2027,17 @@ print_shader_info(const struct shader_info *info, FILE *fp)
print_nz_unsigned(fp, "depth_layout", info->fs.depth_layout);
- fprintf(fp, "color0_interp: %u\n", info->fs.color0_interp);
+ if (info->fs.color0_interp != INTERP_MODE_NONE) {
+ fprintf(fp, "color0_interp: %s\n",
+ glsl_interp_mode_name(info->fs.color0_interp));
+ }
print_nz_bool(fp, "color0_sample", info->fs.color0_sample);
print_nz_bool(fp, "color0_centroid", info->fs.color0_centroid);
- fprintf(fp, "color1_interp: %u\n", info->fs.color1_interp);
+ if (info->fs.color1_interp != INTERP_MODE_NONE) {
+ fprintf(fp, "color1_interp: %s\n",
+ glsl_interp_mode_name(info->fs.color1_interp));
+ }
print_nz_bool(fp, "color1_sample", info->fs.color1_sample);
print_nz_bool(fp, "color1_centroid", info->fs.color1_centroid);