Module: Mesa Branch: master Commit: e3ebc1ca4bd3d744ae69c9a1bba45eb893fda0ba URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e3ebc1ca4bd3d744ae69c9a1bba45eb893fda0ba
Author: Rhys Perry <pendingchao...@gmail.com> Date: Wed Apr 14 10:18:17 2021 +0100 radv: fix conditions for running nir_opt_vectorize No fossil-db changes, probably because all fp16 shaders have at least one 16-bit mov or vec2 somehwere. Signed-off-by: Rhys Perry <pendingchao...@gmail.com> Reviewed-by: Daniel Schürmann <dan...@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10227> --- src/amd/vulkan/radv_pipeline.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index dab428497c4..7db89b54d6e 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -3375,9 +3375,10 @@ radv_create_shaders(struct radv_pipeline *pipeline, struct radv_device *device, if (device->physical_device->rad_info.chip_class >= GFX8) nir_opt_remove_phis(nir[i]); /* cleanup LCSSA phis */ - if (device->physical_device->rad_info.chip_class >= GFX9) - NIR_PASS_V(nir[i], nir_opt_vectorize, opt_vectorize_callback, NULL); } + if (((nir[i]->info.bit_sizes_int | nir[i]->info.bit_sizes_float) & 16) && + device->physical_device->rad_info.chip_class >= GFX9) + NIR_PASS_V(nir[i], nir_opt_vectorize, opt_vectorize_callback, NULL); /* cleanup passes */ nir_lower_load_const_to_scalar(nir[i]); _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit