Mesa (main): d3d12: Keep access masks up-to-date when removing vars in d3d12_disable_multisampling()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 15 22:47:32 UTC 2022


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

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Wed Jun 15 08:17:08 2022 -0700

d3d12: Keep access masks up-to-date when removing vars in d3d12_disable_multisampling()

Fixes: e5cf19fced6 ("d3d12: Modify shaders when MSAA is disabled")
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17039>

---

 src/gallium/drivers/d3d12/d3d12_nir_passes.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/d3d12/d3d12_nir_passes.c b/src/gallium/drivers/d3d12/d3d12_nir_passes.c
index b2a28834a4f..2ecef979d55 100644
--- a/src/gallium/drivers/d3d12/d3d12_nir_passes.c
+++ b/src/gallium/drivers/d3d12/d3d12_nir_passes.c
@@ -1004,6 +1004,7 @@ d3d12_disable_multisampling(nir_shader *s)
    nir_foreach_variable_with_modes_safe(var, s, nir_var_shader_out) {
       if (var->data.location == FRAG_RESULT_SAMPLE_MASK) {
          exec_node_remove(&var->node);
+         s->info.outputs_written &= ~(1ull << FRAG_RESULT_SAMPLE_MASK);
          progress = true;
       }
    }



More information about the mesa-commit mailing list