mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
anv/bvh: Fix encoder handling sparse buffer
Fixes: 2fe57947e3 ("anv: Implement encode shader to fit in ANV BVH")
This commit resolves the failures in the future tests
"sparse_binding_structures" for rayquery. Sparse buffers' heaps are
located high, and since it's in canonical form, the higher 16bits are
all set to 1. However, the existing encoder did not expect any non-zero
values at the higher 16bits. As a result, the instance flags got
corrupted, causing most triangle tests to fail.
Thanks for Paulo providing insights about sparse buffer properties.
Co-developed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33745>
This commit is contained in:
parent
2c8148a76e
commit
b9a980ea73
1 changed files with 1 additions and 1 deletions
|
|
@ -153,7 +153,7 @@ encode_leaf_node(uint32_t type, uint64_t src_node, uint64_t dst_node, REF(anv_ac
|
|||
}
|
||||
|
||||
DEREF(dst_instance).part0.start_node_ptr_and_inst_flags =
|
||||
start_node_ptr |
|
||||
(start_node_ptr & ((1ul << 48) - 1)) |
|
||||
(get_instance_flag(instance_flags | (src.sbt_offset_and_flags >> 24)) << 48);
|
||||
|
||||
mat4 transform = mat4(src.otw_matrix);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue