mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
radv: Move radv_acceleration_structure
Moves radv_acceleration_structure from radv_private to radv_acceleration_structure. If we already have a acceleration structure header, we can also use it instead of radv_private. Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17028>
This commit is contained in:
parent
0e48165411
commit
d0e2013633
3 changed files with 20 additions and 17 deletions
|
|
@ -26,4 +26,23 @@
|
|||
|
||||
#include "bvh/bvh.h"
|
||||
|
||||
#include "radv_private.h"
|
||||
|
||||
struct radv_acceleration_structure {
|
||||
struct vk_object_base base;
|
||||
|
||||
struct radeon_winsys_bo *bo;
|
||||
uint64_t mem_offset;
|
||||
uint64_t size;
|
||||
};
|
||||
|
||||
VK_DEFINE_NONDISP_HANDLE_CASTS(radv_acceleration_structure, base, VkAccelerationStructureKHR,
|
||||
VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR)
|
||||
|
||||
static inline uint64_t
|
||||
radv_accel_struct_get_va(const struct radv_acceleration_structure *accel)
|
||||
{
|
||||
return radv_buffer_get_va(accel->bo) + accel->mem_offset;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "util/mesa-sha1.h"
|
||||
#include "radv_acceleration_structure.h"
|
||||
#include "radv_private.h"
|
||||
#include "sid.h"
|
||||
#include "vk_descriptors.h"
|
||||
|
|
|
|||
|
|
@ -3266,20 +3266,6 @@ radv_has_shader_buffer_float_minmax(const struct radv_physical_device *pdevice)
|
|||
pdevice->rad_info.gfx_level >= GFX10;
|
||||
}
|
||||
|
||||
struct radv_acceleration_structure {
|
||||
struct vk_object_base base;
|
||||
|
||||
struct radeon_winsys_bo *bo;
|
||||
uint64_t mem_offset;
|
||||
uint64_t size;
|
||||
};
|
||||
|
||||
static inline uint64_t
|
||||
radv_accel_struct_get_va(const struct radv_acceleration_structure *accel)
|
||||
{
|
||||
return radv_buffer_get_va(accel->bo) + accel->mem_offset;
|
||||
}
|
||||
|
||||
/* radv_perfcounter.c */
|
||||
void radv_perfcounter_emit_shaders(struct radeon_cmdbuf *cs, unsigned shaders);
|
||||
void radv_perfcounter_emit_spm_reset(struct radeon_cmdbuf *cs);
|
||||
|
|
@ -3303,9 +3289,6 @@ VK_DEFINE_HANDLE_CASTS(radv_instance, vk.base, VkInstance, VK_OBJECT_TYPE_INSTAN
|
|||
VK_DEFINE_HANDLE_CASTS(radv_physical_device, vk.base, VkPhysicalDevice,
|
||||
VK_OBJECT_TYPE_PHYSICAL_DEVICE)
|
||||
VK_DEFINE_HANDLE_CASTS(radv_queue, vk.base, VkQueue, VK_OBJECT_TYPE_QUEUE)
|
||||
VK_DEFINE_NONDISP_HANDLE_CASTS(radv_acceleration_structure, base,
|
||||
VkAccelerationStructureKHR,
|
||||
VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR)
|
||||
VK_DEFINE_NONDISP_HANDLE_CASTS(radv_cmd_pool, vk.base, VkCommandPool,
|
||||
VK_OBJECT_TYPE_COMMAND_POOL)
|
||||
VK_DEFINE_NONDISP_HANDLE_CASTS(radv_buffer, vk.base, VkBuffer, VK_OBJECT_TYPE_BUFFER)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue