radv/rra: Find copy memory index when initializing the trace state
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20700>
This commit is contained in:
committed by
Marge Bot
parent
eb5d7056e0
commit
5093ea6d41
@@ -137,10 +137,7 @@ rra_init_accel_struct_data_buffer(VkDevice vk_device, struct radv_rra_accel_stru
|
||||
.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
|
||||
.pNext = &flags_info,
|
||||
.allocationSize = requirements.size,
|
||||
.memoryTypeIndex =
|
||||
radv_find_memory_index(device->physical_device, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
|
||||
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT |
|
||||
VK_MEMORY_PROPERTY_HOST_CACHED_BIT),
|
||||
.memoryTypeIndex = device->rra_trace.copy_memory_index,
|
||||
};
|
||||
result = radv_alloc_memory(device, &alloc_info, NULL, &data->memory, true);
|
||||
if (result != VK_SUCCESS)
|
||||
|
||||
@@ -867,6 +867,7 @@ struct radv_rra_trace_data {
|
||||
struct hash_table_u64 *accel_struct_vas;
|
||||
simple_mtx_t data_mtx;
|
||||
bool validate_as;
|
||||
uint32_t copy_memory_index;
|
||||
};
|
||||
|
||||
enum radv_dispatch_table {
|
||||
|
||||
@@ -906,6 +906,11 @@ radv_rra_trace_init(struct radv_device *device)
|
||||
device->rra_trace.accel_structs = _mesa_pointer_hash_table_create(NULL);
|
||||
device->rra_trace.accel_struct_vas = _mesa_hash_table_u64_create(NULL);
|
||||
simple_mtx_init(&device->rra_trace.data_mtx, mtx_plain);
|
||||
|
||||
device->rra_trace.copy_memory_index =
|
||||
radv_find_memory_index(device->physical_device, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
|
||||
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT |
|
||||
VK_MEMORY_PROPERTY_HOST_CACHED_BIT);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user