From: Jason Ekstrand Date: Tue, 1 Sep 2015 22:15:04 +0000 (-0700) Subject: vk/compiler: Handle interpolation qualifiers for SPIR-V shaders X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=362ab2d78880288a92682ffcd56942461df00245;p=mesa.git vk/compiler: Handle interpolation qualifiers for SPIR-V shaders --- 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) {