Mesa (staging/19.2): tgsi_to_nir: Translate TGSI_INTERPOLATE_COLOR as INTERP_MODE_NONE

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Sep 12 16:14:34 UTC 2019


Module: Mesa
Branch: staging/19.2
Commit: d6d01761ce849d8dbea92ae17bbd5bdf8ce0812d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d6d01761ce849d8dbea92ae17bbd5bdf8ce0812d

Author: Danylo Piliaiev <danylo.piliaiev at globallogic.com>
Date:   Wed Sep  4 16:43:17 2019 +0300

tgsi_to_nir: Translate TGSI_INTERPOLATE_COLOR as INTERP_MODE_NONE

Translating TGSI_INTERPOLATE_COLOR as INTERP_MODE_SMOOTH made
it for drivers impossible to have flatshaded color inputs.

Translate it to INTERP_MODE_NONE which drivers interpret as
smooth or flat depending on flatshading state.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111467

Fixes: 770faf54 ("tgsi_to_nir: Improve interpolation modes.")

Signed-off-by: Danylo Piliaiev <danylo.piliaiev at globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
(cherry picked from commit 175c32e9bdc8b7b9c43f605cb59cd82415075f67)

---

 src/gallium/auxiliary/nir/tgsi_to_nir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c
index 9a415b36801..0e9c396d3a4 100644
--- a/src/gallium/auxiliary/nir/tgsi_to_nir.c
+++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c
@@ -220,7 +220,7 @@ ttn_translate_interp_mode(unsigned tgsi_interp)
    case TGSI_INTERPOLATE_PERSPECTIVE:
       return INTERP_MODE_SMOOTH;
    case TGSI_INTERPOLATE_COLOR:
-      return INTERP_MODE_SMOOTH;
+      return INTERP_MODE_NONE;
    default:
       unreachable("bad TGSI interpolation mode");
    }




More information about the mesa-commit mailing list