mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
radv: Force ACO for BVH build shaders
They hang with LLVM. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21268>
This commit is contained in:
parent
2ef5acedc2
commit
40f246e3e9
3 changed files with 21 additions and 8 deletions
|
|
@ -96,8 +96,6 @@ struct scratch_layout {
|
|||
uint32_t ir_offset;
|
||||
};
|
||||
|
||||
static VkResult radv_device_init_accel_struct_build_state(struct radv_device *device);
|
||||
|
||||
static struct build_config
|
||||
build_config(uint32_t leaf_count, const VkAccelerationStructureBuildGeometryInfoKHR *build_info)
|
||||
{
|
||||
|
|
@ -562,7 +560,7 @@ radv_device_init_null_accel_struct(struct radv_device *device)
|
|||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
static VkResult
|
||||
VkResult
|
||||
radv_device_init_accel_struct_build_state(struct radv_device *device)
|
||||
{
|
||||
VkResult result = VK_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -492,11 +492,25 @@ radv_device_init_meta(struct radv_device *device)
|
|||
goto fail_dgc;
|
||||
}
|
||||
|
||||
if (device->vk.enabled_features.nullDescriptor &&
|
||||
device->vk.enabled_extensions.KHR_acceleration_structure) {
|
||||
result = radv_device_init_null_accel_struct(device);
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail_accel_struct;
|
||||
if (device->vk.enabled_extensions.KHR_acceleration_structure) {
|
||||
if (device->vk.enabled_features.nullDescriptor) {
|
||||
result = radv_device_init_null_accel_struct(device);
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail_accel_struct;
|
||||
}
|
||||
|
||||
/* FIXME: Acceleration structure builds hang when the build shaders are compiled with LLVM.
|
||||
* Work around it by forcing ACO for now.
|
||||
*/
|
||||
bool use_llvm = device->physical_device->use_llvm;
|
||||
if (use_llvm) {
|
||||
device->physical_device->use_llvm = false;
|
||||
result = radv_device_init_accel_struct_build_state(device);
|
||||
device->physical_device->use_llvm = use_llvm;
|
||||
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail_accel_struct;
|
||||
}
|
||||
}
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ void radv_device_finish_meta_dcc_retile_state(struct radv_device *device);
|
|||
void radv_device_finish_meta_copy_vrs_htile_state(struct radv_device *device);
|
||||
|
||||
VkResult radv_device_init_null_accel_struct(struct radv_device *device);
|
||||
VkResult radv_device_init_accel_struct_build_state(struct radv_device *device);
|
||||
void radv_device_finish_accel_struct_build_state(struct radv_device *device);
|
||||
|
||||
VkResult radv_device_init_meta_etc_decode_state(struct radv_device *device, bool on_demand);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue