Mesa (main): microsoft/spirv_to_dxil: Add drive_location assignment

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 24 20:25:11 UTC 2021


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

Author: Enrico Galli <enrico.galli at intel.com>
Date:   Tue May 25 14:41:33 2021 -0700

microsoft/spirv_to_dxil: Add drive_location assignment

Acked-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10989>

---

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

diff --git a/src/microsoft/spirv_to_dxil/spirv_to_dxil.c b/src/microsoft/spirv_to_dxil/spirv_to_dxil.c
index c5462dd1918..e1a5fd5642c 100644
--- a/src/microsoft/spirv_to_dxil/spirv_to_dxil.c
+++ b/src/microsoft/spirv_to_dxil/spirv_to_dxil.c
@@ -131,6 +131,16 @@ spirv_to_dxil(const uint32_t *words, size_t word_count,
 
    nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
 
+   nir->info.inputs_read =
+      dxil_reassign_driver_locations(nir, nir_var_shader_in, 0);
+
+   if (stage != MESA_SHADER_FRAGMENT) {
+      nir->info.outputs_written =
+         dxil_reassign_driver_locations(nir, nir_var_shader_out, 0);
+   } else {
+      dxil_sort_ps_outputs(nir);
+   }
+
    struct nir_to_dxil_options opts = {.vulkan_environment = true};
 
    struct blob dxil_blob;



More information about the mesa-commit mailing list