Mesa (staging/22.1): anv: skip acceleration structure in binding table emission

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 26 16:22:28 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: 1e1b7661e2a4cc0de11e63c548edc1dccbdbe569
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1e1b7661e2a4cc0de11e63c548edc1dccbdbe569

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Wed Apr 13 11:42:45 2022 +0300

anv: skip acceleration structure in binding table emission

With mutable descriptor types, we can end up in a situation where a
binding can be, for instance, both a UBO and an acceleration
structure.

While we can promote the UBO to a binding table entry and the shader
can use it, this isn't true of acceleration structures that have no
surface state. In that case just skip the entry. The shader is already
compiled to use the descriptor entry.

In the non mutable case, the entry will not be created by
anv_nir_apply_pipeline_layout.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Fixes: 63e91148b7fe ("anv: Enable VK_VALVE_mutable_descriptor_type")
Reviewed-by: Rohan Garg <rohan.garg at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15969>
(cherry picked from commit fe413962b4dd89ec5be539b13e7cbf7f871dd04a)

---

 .pick_status.json                  | 2 +-
 src/intel/vulkan/genX_cmd_buffer.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index bdcad6a62f2..c39c710e331 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -562,7 +562,7 @@
         "description": "anv: skip acceleration structure in binding table emission",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "63e91148b7fe777b6ad7bfdb6b02d167c151dd55"
     },
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 0f3caa24f6d..0faa2163eed 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -2689,6 +2689,7 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
          const struct anv_descriptor *desc = &set->descriptors[binding->index];
 
          switch (desc->type) {
+         case VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR:
          case VK_DESCRIPTOR_TYPE_SAMPLER:
             /* Nothing for us to do here */
             continue;



More information about the mesa-commit mailing list