nir/tgsi: translate the interp location

translate sample and centroid locations.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
This commit is contained in:
Dave Airlie
2020-03-19 14:25:25 +10:00
committed by Marge Bot
parent 28cc2ed79c
commit 339a3a4dea
@@ -530,6 +530,11 @@ void nir_tgsi_scan_shader(const struct nir_shader *nir,
enum glsl_base_type base_type =
glsl_get_base_type(glsl_without_array(variable->type));
if (variable->data.centroid)
info->input_interpolate_loc[i] = TGSI_INTERPOLATE_LOC_CENTROID;
if (variable->data.sample)
info->input_interpolate_loc[i] = TGSI_INTERPOLATE_LOC_SAMPLE;
switch (variable->data.interpolation) {
case INTERP_MODE_NONE:
if (glsl_base_type_is_integer(base_type)) {