diff options
author | Icecream95 <[email protected]> | 2020-07-17 23:26:41 +1200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-07-17 18:03:50 +0000 |
commit | 2aa507f87a6eddb4786d93eb4148093035e8bcff (patch) | |
tree | 978801b56b9c8302f677b5efd1c88df503d7c326 /src/compiler | |
parent | d735f075a6aae821c06de1c82a5ebe4430b94674 (diff) |
nir: Set the alignment for SSBO lowering
The alignment can just be copied from the source intrinsic.
Fixes the assertion
nir_intrinsic_align_offset(instr) < nir_intrinsic_align_mul(instr)
Reviewed-by: Karol Herbst <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5949>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir_lower_ssbo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_ssbo.c b/src/compiler/nir/nir_lower_ssbo.c index 144cd884cf1..904d92fa7e8 100644 --- a/src/compiler/nir/nir_lower_ssbo.c +++ b/src/compiler/nir/nir_lower_ssbo.c @@ -128,6 +128,9 @@ lower_ssbo_instr(nir_builder *b, nir_intrinsic_instr *intr) global->num_components = intr->num_components; global->src[is_store ? 1 : 0] = nir_src_for_ssa(address); + nir_intrinsic_set_align_mul(global, nir_intrinsic_align_mul(intr)); + nir_intrinsic_set_align_offset(global, nir_intrinsic_align_offset(intr)); + if (is_store) { nir_src_copy(&global->src[0], &intr->src[0], global); nir_intrinsic_set_write_mask(global, nir_intrinsic_write_mask(intr)); |