Mesa (main): microsoft/compiler: Position should always be no-perspective
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Dec 30 18:51:46 UTC 2021
Module: Mesa
Branch: main
Commit: 9ba4569184b796d4d186b630f8829e9e0e333d1a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9ba4569184b796d4d186b630f8829e9e0e333d1a
Author: Jesse Natalie <jenatali at microsoft.com>
Date: Wed Dec 8 13:51:28 2021 -0800
microsoft/compiler: Position should always be no-perspective
Debug WARP asserts on this, and sure enough, the spec says it
should be no-perspective.
Reviewed-by: Sil Vilerino <sivileri at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14161>
---
src/microsoft/compiler/dxil_signature.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/microsoft/compiler/dxil_signature.c b/src/microsoft/compiler/dxil_signature.c
index 6a1e7113b70..704f014e4fa 100644
--- a/src/microsoft/compiler/dxil_signature.c
+++ b/src/microsoft/compiler/dxil_signature.c
@@ -58,6 +58,8 @@ static uint8_t
get_interpolation(nir_variable *var)
{
if (unlikely(var->data.centroid)) {
+ if (var->data.location == VARYING_SLOT_POS)
+ return DXIL_INTERP_LINEAR_NOPERSPECTIVE_CENTROID;
switch (var->data.interpolation) {
case INTERP_MODE_NONE: return DXIL_INTERP_LINEAR_CENTROID;
case INTERP_MODE_FLAT: return DXIL_INTERP_CONSTANT;
@@ -66,6 +68,8 @@ get_interpolation(nir_variable *var)
}
} else {
+ if (var->data.location == VARYING_SLOT_POS)
+ return DXIL_INTERP_LINEAR_NOPERSPECTIVE;
switch (var->data.interpolation) {
case INTERP_MODE_NONE: return DXIL_INTERP_LINEAR;
case INTERP_MODE_FLAT: return DXIL_INTERP_CONSTANT;
More information about the mesa-commit
mailing list