mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
vulkan: Rename radix_sort to radix_sort_u64
Preparation for optionally building with 96bit radix sort. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41300>
This commit is contained in:
parent
a1c2b96cd1
commit
04463fe91e
7 changed files with 15 additions and 15 deletions
|
|
@ -233,8 +233,8 @@ radv_device_finish_accel_struct_build_state(struct radv_device *device)
|
|||
VkDevice _device = radv_device_to_handle(device);
|
||||
struct radv_meta_state *state = &device->meta_state;
|
||||
|
||||
if (state->accel_struct_build.radix_sort)
|
||||
radix_sort_vk_destroy(state->accel_struct_build.radix_sort, _device, &state->alloc);
|
||||
if (state->accel_struct_build.radix_sort_64)
|
||||
radix_sort_vk_destroy(state->accel_struct_build.radix_sort_64, _device, &state->alloc);
|
||||
}
|
||||
|
||||
static VkDeviceSize
|
||||
|
|
@ -931,7 +931,7 @@ radv_update_as_gfx12(VkCommandBuffer commandBuffer, const struct vk_acceleration
|
|||
radv_compute_dispatch(cmd_buffer, &dispatch);
|
||||
}
|
||||
|
||||
static const struct radix_sort_vk_target_config radix_sort_config = {
|
||||
static const struct radix_sort_vk_target_config radix_sort_64_config = {
|
||||
.keyval_dwords = 2,
|
||||
.fill.workgroup_size_log2 = 7,
|
||||
.fill.block_rows = 8,
|
||||
|
|
@ -984,11 +984,11 @@ radv_device_init_accel_struct_build_state(struct radv_device *device)
|
|||
|
||||
mtx_lock(&device->meta_state.mtx);
|
||||
|
||||
if (device->meta_state.accel_struct_build.radix_sort)
|
||||
if (device->meta_state.accel_struct_build.radix_sort_64)
|
||||
goto exit;
|
||||
|
||||
device->meta_state.accel_struct_build.radix_sort = vk_create_radix_sort_u64(
|
||||
radv_device_to_handle(device), &device->meta_state.alloc, device->meta_state.cache, radix_sort_config);
|
||||
device->meta_state.accel_struct_build.radix_sort_64 = vk_create_radix_sort_u64(
|
||||
radv_device_to_handle(device), &device->meta_state.alloc, device->meta_state.cache, radix_sort_64_config);
|
||||
|
||||
device->meta_state.accel_struct_build.build_ops = (struct vk_acceleration_structure_build_ops){
|
||||
.begin_debug_marker = vk_accel_struct_cmd_begin_debug_marker,
|
||||
|
|
@ -1043,7 +1043,7 @@ radv_device_init_accel_struct_build_state(struct radv_device *device)
|
|||
build_args->root_flags_offset = offsetof(struct radv_accel_struct_header, root_flags);
|
||||
build_args->propagate_cull_flags = pdev->info.gfx_level >= GFX11;
|
||||
build_args->emit_markers = device->sqtt.bo;
|
||||
build_args->radix_sort = device->meta_state.accel_struct_build.radix_sort;
|
||||
build_args->radix_sort_64 = device->meta_state.accel_struct_build.radix_sort_64;
|
||||
|
||||
exit:
|
||||
mtx_unlock(&device->meta_state.mtx);
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ struct radv_meta_state {
|
|||
mtx_t mtx;
|
||||
|
||||
struct {
|
||||
struct radix_sort_vk *radix_sort;
|
||||
struct radix_sort_vk *radix_sort_64;
|
||||
struct vk_acceleration_structure_build_ops build_ops;
|
||||
struct vk_acceleration_structure_build_args build_args;
|
||||
} accel_struct_build;
|
||||
|
|
|
|||
|
|
@ -463,7 +463,7 @@ tu_CmdBuildAccelerationStructuresKHR(VkCommandBuffer commandBuffer, uint32_t inf
|
|||
.subgroup_size = device->physical_device->info->props.supports_double_threadsize ? 128 : 64,
|
||||
.bvh_bounds_offset = offsetof(tu_accel_struct_header, aabb),
|
||||
.emit_markers = false,
|
||||
.radix_sort = device->radix_sort,
|
||||
.radix_sort_64 = device->radix_sort,
|
||||
};
|
||||
|
||||
vk_cmd_build_acceleration_structures(commandBuffer,
|
||||
|
|
@ -615,7 +615,7 @@ tu_GetAccelerationStructureBuildSizesKHR(VkDevice _device, VkAccelerationStructu
|
|||
|
||||
struct vk_acceleration_structure_build_args args = {
|
||||
.subgroup_size = device->physical_device->info->props.supports_double_threadsize ? 128 : 64,
|
||||
.radix_sort = device->radix_sort,
|
||||
.radix_sort_64 = device->radix_sort,
|
||||
};
|
||||
|
||||
vk_get_as_build_sizes(_device, buildType, pBuildInfo, pMaxPrimitiveCounts,
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ lvp_init_radix_sort(struct lvp_device *device)
|
|||
&device->vk.alloc, VK_NULL_HANDLE,
|
||||
lvp_radix_sort_config);
|
||||
|
||||
device->accel_struct_args.radix_sort = device->radix_sort;
|
||||
device->accel_struct_args.radix_sort_64 = device->radix_sort;
|
||||
|
||||
simple_mtx_unlock(&device->radix_sort_lock);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -534,7 +534,7 @@ anv_device_init_accel_struct_build_state(struct anv_device *device)
|
|||
(struct vk_acceleration_structure_build_args) {
|
||||
.emit_markers = u_trace_enabled(&device->ds.trace_context),
|
||||
.subgroup_size = device->info->ver >= 20 ? 16 : 8,
|
||||
.radix_sort = device->accel_struct_build.radix_sort,
|
||||
.radix_sort_64 = device->accel_struct_build.radix_sort,
|
||||
/* See struct anv_accel_struct_header from anv_bvh.h
|
||||
*
|
||||
* Root pointer starts at offset 0 and bound box start at offset 8.
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ vk_acceleration_structure_build_state_init(struct vk_acceleration_structure_buil
|
|||
radix_sort_vk_memory_requirements_t requirements = {
|
||||
0,
|
||||
};
|
||||
radix_sort_vk_get_memory_requirements(args->radix_sort, leaf_count,
|
||||
radix_sort_vk_get_memory_requirements(args->radix_sort_64, leaf_count,
|
||||
&requirements);
|
||||
|
||||
uint32_t ir_leaf_size;
|
||||
|
|
@ -687,7 +687,7 @@ morton_sort(VkCommandBuffer commandBuffer, struct vk_device *device,
|
|||
}
|
||||
|
||||
/* Copyright 2019 The Fuchsia Authors. */
|
||||
const radix_sort_vk_t *rs = args->radix_sort;
|
||||
const radix_sort_vk_t *rs = args->radix_sort_64;
|
||||
|
||||
/*
|
||||
* OVERVIEW
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ struct vk_acceleration_structure_build_args {
|
|||
uint32_t root_flags_offset;
|
||||
bool propagate_cull_flags;
|
||||
bool emit_markers;
|
||||
const radix_sort_vk_t *radix_sort;
|
||||
const radix_sort_vk_t *radix_sort_64;
|
||||
};
|
||||
|
||||
VkResult vk_get_bvh_build_pipeline_layout(struct vk_device *device, struct vk_meta_device *meta,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue