Mesa (main): d3d12: Don't force a GS to be added for 'flat' sysvals
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Feb 4 21:01:14 UTC 2022
Module: Mesa
Branch: main
Commit: 1b11113efa817b6fb642a92a4165f3e5a2fe408f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1b11113efa817b6fb642a92a4165f3e5a2fe408f
Author: Jesse Natalie <jenatali at microsoft.com>
Date: Fri Feb 4 08:23:42 2022 -0800
d3d12: Don't force a GS to be added for 'flat' sysvals
Reviewed-by: Sil Vilerino <sivileri at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14881>
---
src/gallium/drivers/d3d12/d3d12_compiler.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/d3d12/d3d12_compiler.cpp b/src/gallium/drivers/d3d12/d3d12_compiler.cpp
index 747c8805c11..754a1783310 100644
--- a/src/gallium/drivers/d3d12/d3d12_compiler.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_compiler.cpp
@@ -475,7 +475,10 @@ has_flat_varyings(struct d3d12_context *ctx)
nir_foreach_variable_with_modes(input, fs->current->nir,
nir_var_shader_in) {
- if (input->data.interpolation == INTERP_MODE_FLAT)
+ if (input->data.interpolation == INTERP_MODE_FLAT &&
+ /* Disregard sysvals */
+ (input->data.location >= VARYING_SLOT_VAR0 ||
+ input->data.location <= VARYING_SLOT_TEX7))
return true;
}
More information about the mesa-commit
mailing list