mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-15 22:08:17 +02:00
radv: Use the entire morton code as sort key
Fixes: be57b08 <"radv: Build accaleration structures using LBVH">
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16264>
This commit is contained in:
parent
6ba55b4033
commit
53fe6f1084
1 changed files with 2 additions and 1 deletions
|
|
@ -1489,10 +1489,11 @@ build_morton_shader(struct radv_device *dev)
|
|||
|
||||
nir_ssa_def *morton_code = nir_iadd(
|
||||
&b, nir_iadd(&b, nir_ishl_imm(&b, x_morton, 2), nir_ishl_imm(&b, y_morton, 1)), z_morton);
|
||||
nir_ssa_def *key = nir_ishl_imm(&b, morton_code, 8);
|
||||
|
||||
nir_ssa_def *dst_addr = nir_iadd(
|
||||
&b, scratch_addr, nir_u2u64(&b, id_to_morton_offset(&b, global_id, dev->physical_device)));
|
||||
nir_build_store_global(&b, morton_code, dst_addr, .align_mul = 4);
|
||||
nir_build_store_global(&b, key, dst_addr, .align_mul = 4);
|
||||
|
||||
return b.shader;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue