Mesa (main): intel/fs: add a note on possible optimization of root node address

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 13 11:48:35 UTC 2022


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

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Wed Apr 13 09:39:31 2022 +0300

intel/fs: add a note on possible optimization of root node address

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15910>

---

 src/intel/compiler/brw_nir_rt_builder.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/intel/compiler/brw_nir_rt_builder.h b/src/intel/compiler/brw_nir_rt_builder.h
index 9d5d2eb2353..c7eb23f3244 100644
--- a/src/intel/compiler/brw_nir_rt_builder.h
+++ b/src/intel/compiler/brw_nir_rt_builder.h
@@ -919,6 +919,9 @@ brw_nir_rt_acceleration_structure_to_root_node(nir_builder *b,
     *
     * But if the acceleration structure pointer is NULL, then we should return
     * NULL as root node pointer.
+    *
+    * TODO: we could optimize this by assuming that for a given version of the
+    * BVH, we can find the root node at a given offset.
     */
    nir_ssa_def *root_node_ptr, *null_node_ptr;
    nir_push_if(b, nir_ieq(b, as_addr, nir_imm_int64(b, 0)));



More information about the mesa-commit mailing list