Module: Mesa Branch: main Commit: 9ba4569184b796d4d186b630f8829e9e0e333d1a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9ba4569184b796d4d186b630f8829e9e0e333d1a
Author: Jesse Natalie <[email protected]> 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 <[email protected]> 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;
