compiler: add INTERP_MODE_COLOR for radeonsi
authorMarek Olšák <marek.olsak@amd.com>
Sat, 15 Aug 2020 06:45:05 +0000 (02:45 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 3 Sep 2020 03:03:00 +0000 (23:03 -0400)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340>

src/compiler/glsl/ir_print_visitor.cpp
src/compiler/shader_enums.c
src/compiler/shader_enums.h

index 7e5e6440a2bbf2ad43c639ecfbf5b807ca88d2d4..c228493e7080a7b7da2eb98cf1c0b7dcd6500936 100644 (file)
@@ -198,7 +198,7 @@ void ir_print_visitor::visit(ir_variable *ir)
                                 "in ", "out ", "inout ",
                                "const_in ", "sys ", "temporary " };
    STATIC_ASSERT(ARRAY_SIZE(mode) == ir_var_mode_count);
-   const char *const interp[] = { "", "smooth", "flat", "noperspective", "explicit" };
+   const char *const interp[] = { "", "smooth", "flat", "noperspective", "explicit", "color" };
    STATIC_ASSERT(ARRAY_SIZE(interp) == INTERP_MODE_COUNT);
    const char *const precision[] = { "", "highp ", "mediump ", "lowp "};
 
index a91c44369e1485d156648955f61aa74e4432aaf8..0e28c5585c48026634a31bbe2b475a4588535539 100644 (file)
@@ -281,6 +281,7 @@ glsl_interp_mode_name(enum glsl_interp_mode qual)
       ENUM(INTERP_MODE_FLAT),
       ENUM(INTERP_MODE_NOPERSPECTIVE),
       ENUM(INTERP_MODE_EXPLICIT),
+      ENUM(INTERP_MODE_COLOR),
    };
    STATIC_ASSERT(ARRAY_SIZE(names) == INTERP_MODE_COUNT);
    return NAME(qual);
index 69240b4cb6cad384edc9a87a1136bbcad8eb0287..9a04487e268bbd30f0b90ce680bd6bdcb05051e8 100644 (file)
@@ -680,6 +680,7 @@ enum glsl_interp_mode
    INTERP_MODE_FLAT,
    INTERP_MODE_NOPERSPECTIVE,
    INTERP_MODE_EXPLICIT,
+   INTERP_MODE_COLOR, /**< glShadeModel determines the interp mode */
    INTERP_MODE_COUNT /**< Number of interpolation qualifiers */
 };