mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
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> (cherry picked from commit0d7f8aa249)
This commit is contained in:
parent
ae63d10205
commit
552902a4fb
3 changed files with 18 additions and 11 deletions
|
|
@ -4513,7 +4513,7 @@
|
|||
"description": "anv: fix null descriptors",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "4ceaed7839afd724b2a2f10f6879f54199c041ad"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3575,9 +3575,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,
|
||||
|
|
|
|||
|
|
@ -2501,7 +2501,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;
|
||||
}
|
||||
}
|
||||
|
|
@ -2531,7 +2532,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;
|
||||
}
|
||||
|
|
@ -2561,7 +2564,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;
|
||||
}
|
||||
|
|
@ -2572,7 +2576,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;
|
||||
|
||||
|
|
@ -2582,7 +2587,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;
|
||||
|
||||
|
|
@ -2619,7 +2625,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;
|
||||
}
|
||||
|
|
@ -2632,7 +2640,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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue