radeonsi: enable nir option pack_varying_options

flat interpolation type is not enabled because we need to set
    SPI_PS_INPUT_CNTL_x.FLAT_SHADE=1
which is per vec4.

16 bit varying also need to set
    SPI_PS_INPUT_CNTL_x.FP16_INTERP_MODE
but varying packing only support 32 bit, so we don't need to
worry about this for now.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12537>
This commit is contained in:
Qiang Yu 2021-08-26 14:32:32 +08:00 committed by Marge Bot
parent 7054c1b7fd
commit d33eeb2634

View file

@ -1039,6 +1039,13 @@ void si_init_screen_get_functions(struct si_screen *sscreen)
.lower_uniforms_to_ubo = true,
.support_16bit_alu = sscreen->options.fp16,
.vectorize_vec2_16bit = sscreen->options.fp16,
.pack_varying_options =
nir_pack_varying_interp_mode_none |
nir_pack_varying_interp_mode_smooth |
nir_pack_varying_interp_mode_noperspective |
nir_pack_varying_interp_loc_center |
nir_pack_varying_interp_loc_sample |
nir_pack_varying_interp_loc_centroid,
};
sscreen->nir_options = nir_options;
}