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@intel.com>
Fixes: 63e91148b7 ("anv: Enable VK_VALVE_mutable_descriptor_type")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15969>
This commit is contained in:
Lionel Landwerlin 2022-04-13 11:42:45 +03:00 committed by Marge Bot
parent ce02eeecf4
commit fe413962b4
1 changed files with 1 additions and 0 deletions

View File

@ -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;