venus: add stubs for accel struct host commands

They won't be implemented, and the host cmds feature will always be
disabled in venus.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33907>
This commit is contained in:
Yiwei Zhang
2025-03-02 14:39:51 -08:00
committed by Marge Bot
parent 3eb554a2b5
commit eb0ad64e80
3 changed files with 89 additions and 0 deletions
+1
View File
@@ -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',
@@ -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);
}
@@ -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 */