diff --git a/src/virtio/vulkan/meson.build b/src/virtio/vulkan/meson.build index d4e07f1cd02..aafb22a64ae 100644 --- a/src/virtio/vulkan/meson.build +++ b/src/virtio/vulkan/meson.build @@ -51,6 +51,7 @@ devenv.append('VK_DRIVER_FILES', _dev_icd.full_path()) devenv.append('VK_ICD_FILENAMES', _dev_icd.full_path()) libvn_files = files( + 'vn_acceleration_structure.c', 'vn_buffer.c', 'vn_command_buffer.c', 'vn_common.c', diff --git a/src/virtio/vulkan/vn_acceleration_structure.c b/src/virtio/vulkan/vn_acceleration_structure.c new file mode 100644 index 00000000000..7dd1a25f06d --- /dev/null +++ b/src/virtio/vulkan/vn_acceleration_structure.c @@ -0,0 +1,69 @@ +/* + * Copyright 2025 Google LLC + * SPDX-License-Identifier: MIT + */ + +#include "vn_acceleration_structure.h" + +#include "vn_device.h" + +VkResult +vn_BuildAccelerationStructuresKHR( + VkDevice device, + VkDeferredOperationKHR deferredOperation, + uint32_t infoCount, + const VkAccelerationStructureBuildGeometryInfoKHR *pInfos, + const VkAccelerationStructureBuildRangeInfoKHR *const *ppBuildRangeInfos) +{ + struct vn_device *dev = vn_device_from_handle(device); + unreachable("Unimplemented"); + return vn_error(dev->instance, VK_ERROR_FEATURE_NOT_PRESENT); +} + +VkResult +vn_CopyAccelerationStructureKHR( + VkDevice device, + VkDeferredOperationKHR deferredOperation, + const VkCopyAccelerationStructureInfoKHR *pInfo) +{ + struct vn_device *dev = vn_device_from_handle(device); + unreachable("Unimplemented"); + return vn_error(dev->instance, VK_ERROR_FEATURE_NOT_PRESENT); +} + +VkResult +vn_CopyAccelerationStructureToMemoryKHR( + VkDevice device, + VkDeferredOperationKHR deferredOperation, + const VkCopyAccelerationStructureToMemoryInfoKHR *pInfo) +{ + struct vn_device *dev = vn_device_from_handle(device); + unreachable("Unimplemented"); + return vn_error(dev->instance, VK_ERROR_FEATURE_NOT_PRESENT); +} + +VkResult +vn_CopyMemoryToAccelerationStructureKHR( + VkDevice device, + VkDeferredOperationKHR deferredOperation, + const VkCopyMemoryToAccelerationStructureInfoKHR *pInfo) +{ + struct vn_device *dev = vn_device_from_handle(device); + unreachable("Unimplemented"); + return vn_error(dev->instance, VK_ERROR_FEATURE_NOT_PRESENT); +} + +VkResult +vn_WriteAccelerationStructuresPropertiesKHR( + VkDevice device, + uint32_t accelerationStructureCount, + const VkAccelerationStructureKHR *pAccelerationStructures, + VkQueryType queryType, + size_t dataSize, + void *pData, + size_t stride) +{ + struct vn_device *dev = vn_device_from_handle(device); + unreachable("Unimplemented"); + return vn_error(dev->instance, VK_ERROR_FEATURE_NOT_PRESENT); +} diff --git a/src/virtio/vulkan/vn_acceleration_structure.h b/src/virtio/vulkan/vn_acceleration_structure.h new file mode 100644 index 00000000000..d248242afd6 --- /dev/null +++ b/src/virtio/vulkan/vn_acceleration_structure.h @@ -0,0 +1,19 @@ +/* + * Copyright 2025 Google LLC + * SPDX-License-Identifier: MIT + */ + +#ifndef VN_ACCELERATION_STRUCTURE_H +#define VN_ACCELERATION_STRUCTURE_H + +#include "vn_common.h" + +struct vn_acceleration_structure { + struct vn_object_base base; +}; +VK_DEFINE_NONDISP_HANDLE_CASTS(vn_acceleration_structure, + base.base, + VkAccelerationStructureKHR, + VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR) + +#endif /* VN_ACCELERATION_STRUCTURE_H */