From 362ab2d78880288a92682ffcd56942461df00245 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 1 Sep 2015 15:15:04 -0700 Subject: [PATCH] vk/compiler: Handle interpolation qualifiers for SPIR-V shaders --- src/vulkan/anv_compiler.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/vulkan/anv_compiler.cpp b/src/vulkan/anv_compiler.cpp index e024bf0a0eb..1f961eb043b 100644 --- a/src/vulkan/anv_compiler.cpp +++ b/src/vulkan/anv_compiler.cpp @@ -946,6 +946,16 @@ setup_nir_io(struct gl_shader *mesa_shader, struct gl_program *prog = mesa_shader->Program; foreach_list_typed(nir_variable, var, node, &shader->inputs) { prog->InputsRead |= BITFIELD64_BIT(var->data.location); + if (shader->stage == MESA_SHADER_FRAGMENT) { + struct gl_fragment_program *fprog = (struct gl_fragment_program *)prog; + + fprog->InterpQualifier[var->data.location] = + (glsl_interp_qualifier)var->data.interpolation; + if (var->data.centroid) + fprog->IsCentroid |= BITFIELD64_BIT(var->data.location); + if (var->data.sample) + fprog->IsSample |= BITFIELD64_BIT(var->data.location); + } } foreach_list_typed(nir_variable, var, node, &shader->outputs) { -- 2.30.2