spirv_to_dxil: Run nir_lower_tex during compilation

We need this to get e.g. a default lod for some instructions when it is
not provided.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12462>
This commit is contained in:
Michael Tang 2021-08-20 14:53:02 -07:00 committed by Marge Bot
parent 4c260f017c
commit 4237aa3a7e

View file

@ -158,6 +158,9 @@ spirv_to_dxil(const uint32_t *words, size_t word_count,
}
NIR_PASS_V(nir, nir_lower_readonly_images_to_tex, true);
nir_lower_tex_options lower_tex_options = {0};
NIR_PASS_V(nir, nir_lower_tex, &lower_tex_options);
NIR_PASS_V(nir, dxil_nir_split_clip_cull_distance);
NIR_PASS_V(nir, dxil_nir_lower_loads_stores_to_dxil);
NIR_PASS_V(nir, dxil_nir_create_bare_samplers);