Mesa (main): microsoft/compiler: Fill interpolation for sysval inputs to non-vertex shader
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Feb 11 00:30:39 UTC 2022
Module: Mesa
Branch: main
Commit: 31e2c3f550ebdc6b699d62912de4c05c5213e1f1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=31e2c3f550ebdc6b699d62912de4c05c5213e1f1
Author: Jesse Natalie <jenatali at microsoft.com>
Date: Thu Feb 10 15:03:56 2022 -0800
microsoft/compiler: Fill interpolation for sysval inputs to non-vertex shader
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5483
Reviewed-by: Michael Tang <tangm at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14984>
---
src/microsoft/compiler/dxil_signature.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/microsoft/compiler/dxil_signature.c b/src/microsoft/compiler/dxil_signature.c
index 25814f38fe1..732ad42bf4e 100644
--- a/src/microsoft/compiler/dxil_signature.c
+++ b/src/microsoft/compiler/dxil_signature.c
@@ -202,6 +202,9 @@ get_semantic_vs_in_name(nir_variable *var, struct semantic_info *info, gl_shader
static void
get_semantic_sv_name(nir_variable *var, struct semantic_info *info, gl_shader_stage stage, bool _vulkan)
{
+ if (stage != MESA_SHADER_VERTEX)
+ info->interpolation = get_interpolation(var);
+
switch (var->data.location) {
case SYSTEM_VALUE_VERTEX_ID_ZERO_BASE:
info->kind = DXIL_SEM_VERTEX_ID;
@@ -217,7 +220,6 @@ get_semantic_sv_name(nir_variable *var, struct semantic_info *info, gl_shader_st
break;
case SYSTEM_VALUE_SAMPLE_ID:
info->kind = DXIL_SEM_SAMPLE_INDEX;
- info->interpolation = get_interpolation(var);
break;
default:
unreachable("unsupported system value");
More information about the mesa-commit
mailing list