Mesa (main): nir/lower_shader_calls: adding missing stack offset alignment

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 28 23:37:45 UTC 2021


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

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Mon Jul 26 20:16:01 2021 +0300

nir/lower_shader_calls: adding missing stack offset alignment

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Fixes: 8dfb240b1f0633 ("nir: Add raytracing shader call lowering pass.")
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12112>

---

 src/compiler/nir/nir_lower_shader_calls.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/compiler/nir/nir_lower_shader_calls.c b/src/compiler/nir/nir_lower_shader_calls.c
index b887db02bd6..e1398bf25ae 100644
--- a/src/compiler/nir/nir_lower_shader_calls.c
+++ b/src/compiler/nir/nir_lower_shader_calls.c
@@ -459,6 +459,7 @@ spill_ssa_defs_and_lower_shader_calls(nir_shader *shader, uint32_t num_calls,
 
          nir_builder *b = &before;
 
+         offset = ALIGN(offset, stack_alignment);
          max_scratch_size = MAX2(max_scratch_size, offset);
 
          /* First thing on the called shader's stack is the resume address



More information about the mesa-commit mailing list