Mesa (main): spirv_to_dxil: Run nir_lower_tex during compilation

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Aug 24 22:30:09 UTC 2021


Module: Mesa
Branch: main
Commit: 4237aa3a7eb0c846facb30c9bfd1129641d7a933
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4237aa3a7eb0c846facb30c9bfd1129641d7a933

Author: Michael Tang <tangm at microsoft.com>
Date:   Fri Aug 20 14:53:02 2021 -0700

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 at microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12462>

---

 src/microsoft/spirv_to_dxil/spirv_to_dxil.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/microsoft/spirv_to_dxil/spirv_to_dxil.c b/src/microsoft/spirv_to_dxil/spirv_to_dxil.c
index cb836aab0d9..4e0973f464e 100644
--- a/src/microsoft/spirv_to_dxil/spirv_to_dxil.c
+++ b/src/microsoft/spirv_to_dxil/spirv_to_dxil.c
@@ -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);



More information about the mesa-commit mailing list