radv: gather which input PS variables use an explicit interpolation mode
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 27 Jan 2020 10:07:42 +0000 (11:07 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Jan 2020 09:49:50 +0000 (09:49 +0000)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3578>

src/amd/vulkan/radv_shader.h
src/amd/vulkan/radv_shader_info.c

index 3001f494cef435afc71490e1646fe52614ca90a4..131774bd8861944e7fa2747a43edac5d28c6e981 100644 (file)
@@ -294,6 +294,7 @@ struct radv_shader_info {
                uint8_t num_input_clips_culls;
                uint32_t input_mask;
                uint32_t flat_shaded_mask;
+               uint32_t explicit_shaded_mask;
                uint32_t float16_shaded_mask;
                uint32_t num_interp;
                bool can_discard;
index 613746c7ddef006c7bc1389c07beb64211c7f483..80f93b1c0a7af2b9a32bbf0563586bc29379cf64 100644 (file)
@@ -479,6 +479,8 @@ gather_info_input_decl_ps(const nir_shader *nir, const nir_variable *var,
 
        if (var->data.interpolation == INTERP_MODE_FLAT)
                info->ps.flat_shaded_mask |= mask << var->data.driver_location;
+       if (var->data.interpolation == INTERP_MODE_EXPLICIT)
+               info->ps.explicit_shaded_mask |= mask << var->data.driver_location;
 
        if (var->data.location >= VARYING_SLOT_VAR0)
                info->ps.input_mask |= mask << (var->data.location - VARYING_SLOT_VAR0);