anv: fix null descriptors
When writing descriptor with a null buffer/image we expect that
writing 0 will point to the null surface. For that to work the null
surface has to be in the bindless surface heap.
This fixes some new failures in dEQP-VK.robustness.* tests once
rewritten from the NV_ray_tracing to KHR_ray_tracing extension.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 4ceaed7839
("anv: split internal surface states from descriptors")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7762
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20953>
This commit is contained in:

committed by
Marge Bot

parent
d7ef1331b5
commit
0d7f8aa249
@@ -3485,9 +3485,7 @@ VkResult anv_CreateDevice(
|
||||
* to zero and they have a valid descriptor.
|
||||
*/
|
||||
device->null_surface_state =
|
||||
anv_state_pool_alloc(device->info->verx10 >= 125 ?
|
||||
&device->scratch_surface_state_pool :
|
||||
&device->internal_surface_state_pool,
|
||||
anv_state_pool_alloc(&device->bindless_surface_state_pool,
|
||||
device->isl_dev.ss.size,
|
||||
device->isl_dev.ss.align);
|
||||
isl_null_fill_state(&device->isl_dev, device->null_surface_state.map,
|
||||
|
@@ -2101,7 +2101,8 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
|
||||
assert(desc_idx < MAX_PUSH_DESCRIPTORS);
|
||||
|
||||
if (shader->push_desc_info.fully_promoted_ubo_descriptors & BITFIELD_BIT(desc_idx)) {
|
||||
surface_state = cmd_buffer->device->null_surface_state;
|
||||
surface_state = anv_bindless_state_for_binding_table(
|
||||
cmd_buffer->device->null_surface_state);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2131,7 +2132,9 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
|
||||
anv_bindless_state_for_binding_table(sstate.state);
|
||||
assert(surface_state.alloc_size);
|
||||
} else {
|
||||
surface_state = cmd_buffer->device->null_surface_state;
|
||||
surface_state =
|
||||
anv_bindless_state_for_binding_table(
|
||||
cmd_buffer->device->null_surface_state);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2161,7 +2164,8 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
|
||||
"corresponding SPIR-V format enum.");
|
||||
}
|
||||
} else {
|
||||
surface_state = cmd_buffer->device->null_surface_state;
|
||||
surface_state = anv_bindless_state_for_binding_table(
|
||||
cmd_buffer->device->null_surface_state);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2172,7 +2176,8 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
|
||||
surface_state = desc->set_buffer_view->surface_state;
|
||||
assert(surface_state.alloc_size);
|
||||
} else {
|
||||
surface_state = cmd_buffer->device->null_surface_state;
|
||||
surface_state = anv_bindless_state_for_binding_table(
|
||||
cmd_buffer->device->null_surface_state);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2182,7 +2187,8 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
|
||||
desc->buffer_view->surface_state);
|
||||
assert(surface_state.alloc_size);
|
||||
} else {
|
||||
surface_state = cmd_buffer->device->null_surface_state;
|
||||
surface_state = anv_bindless_state_for_binding_table(
|
||||
cmd_buffer->device->null_surface_state);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2219,7 +2225,9 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
|
||||
format, ISL_SWIZZLE_IDENTITY,
|
||||
usage, address, range, 1);
|
||||
} else {
|
||||
surface_state = cmd_buffer->device->null_surface_state;
|
||||
surface_state =
|
||||
anv_bindless_state_for_binding_table(
|
||||
cmd_buffer->device->null_surface_state);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2232,7 +2240,8 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
|
||||
: desc->buffer_view->storage_surface_state);
|
||||
assert(surface_state.alloc_size);
|
||||
} else {
|
||||
surface_state = cmd_buffer->device->null_surface_state;
|
||||
surface_state = anv_bindless_state_for_binding_table(
|
||||
cmd_buffer->device->null_surface_state);
|
||||
}
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user