pub type VkFlags = u32;
pub type VkDeviceSize = u64;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct VkInstance_T {
_unused: [u8; 0],
}
pub type VkInstance = *mut VkInstance_T;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct VkPhysicalDevice_T {
_unused: [u8; 0],
}
pub type VkPhysicalDevice = *mut VkPhysicalDevice_T;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct VkDevice_T {
_unused: [u8; 0],
}
pub type VkDevice = *mut VkDevice_T;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct VkQueue_T {
_unused: [u8; 0],
}
pub type VkQueue = *mut VkQueue_T;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct VkCommandBuffer_T {
_unused: [u8; 0],
}
pub type VkCommandBuffer = *mut VkCommandBuffer_T;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct VkPipelineCache_T {
_unused: [u8; 0],
}
pub type VkPipelineCache = *mut VkPipelineCache_T;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct VkDeviceMemory_T {
_unused: [u8; 0],
}
pub type VkDeviceMemory = *mut VkDeviceMemory_T;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct VkImage_T {
_unused: [u8; 0],
}
pub type VkImage = *mut VkImage_T;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct VkBuffer_T {
_unused: [u8; 0],
}
pub type VkBuffer = *mut VkBuffer_T;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct VkRenderPass_T {
_unused: [u8; 0],
}
pub type VkRenderPass = *mut VkRenderPass_T;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct VkFramebuffer_T {
_unused: [u8; 0],
}
pub type VkFramebuffer = *mut VkFramebuffer_T;
pub type VkMemoryPropertyFlags = VkFlags;
pub type VkImageAspectFlags = VkFlags;
pub type VkImageUsageFlags = VkFlags;
pub type VkBufferUsageFlags = VkFlags;
pub type VkPipelineStageFlags = VkFlags;
pub type VkAccessFlags = VkFlags;
pub type VkImageLayout = ::std::os::raw::c_uint;
pub type VkFormat = ::std::os::raw::c_uint;
pub type VkImageTiling = ::std::os::raw::c_uint;
pub type VkImageType = ::std::os::raw::c_uint;
pub type VkSampleCountFlagBits = ::std::os::raw::c_uint;
pub type VkCommandBufferLevel = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Default, Copy, Clone)]
pub struct VkExtent3D {
pub width: u32,
pub height: u32,
pub depth: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of VkExtent3D"][::std::mem::size_of::<VkExtent3D>() - 12usize];
["Alignment of VkExtent3D"][::std::mem::align_of::<VkExtent3D>() - 4usize];
["Offset of field: VkExtent3D::width"][::std::mem::offset_of!(VkExtent3D, width) - 0usize];
["Offset of field: VkExtent3D::height"][::std::mem::offset_of!(VkExtent3D, height) - 4usize];
["Offset of field: VkExtent3D::depth"][::std::mem::offset_of!(VkExtent3D, depth) - 8usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub struct VkImageSubresource {
_unused: [u8; 0],
}
pub type PFN_vkVoidFunction = ::std::option::Option<unsafe extern "system" fn()>;
pub type PFN_vkGetInstanceProcAddr = ::std::option::Option<
unsafe extern "system" fn(
instance: VkInstance,
pName: *const ::std::os::raw::c_char,
) -> PFN_vkVoidFunction,
>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct UnityVulkanInstance {
pub pipelineCache: VkPipelineCache,
pub instance: VkInstance,
pub physicalDevice: VkPhysicalDevice,
pub device: VkDevice,
pub graphicsQueue: VkQueue,
pub getInstanceProcAddr: PFN_vkGetInstanceProcAddr,
pub queueFamilyIndex: ::std::os::raw::c_uint,
pub reserved: [*mut ::std::os::raw::c_void; 8usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of UnityVulkanInstance"][::std::mem::size_of::<UnityVulkanInstance>() - 120usize];
["Alignment of UnityVulkanInstance"][::std::mem::align_of::<UnityVulkanInstance>() - 8usize];
["Offset of field: UnityVulkanInstance::pipelineCache"]
[::std::mem::offset_of!(UnityVulkanInstance, pipelineCache) - 0usize];
["Offset of field: UnityVulkanInstance::instance"]
[::std::mem::offset_of!(UnityVulkanInstance, instance) - 8usize];
["Offset of field: UnityVulkanInstance::physicalDevice"]
[::std::mem::offset_of!(UnityVulkanInstance, physicalDevice) - 16usize];
["Offset of field: UnityVulkanInstance::device"]
[::std::mem::offset_of!(UnityVulkanInstance, device) - 24usize];
["Offset of field: UnityVulkanInstance::graphicsQueue"]
[::std::mem::offset_of!(UnityVulkanInstance, graphicsQueue) - 32usize];
["Offset of field: UnityVulkanInstance::getInstanceProcAddr"]
[::std::mem::offset_of!(UnityVulkanInstance, getInstanceProcAddr) - 40usize];
["Offset of field: UnityVulkanInstance::queueFamilyIndex"]
[::std::mem::offset_of!(UnityVulkanInstance, queueFamilyIndex) - 48usize];
["Offset of field: UnityVulkanInstance::reserved"]
[::std::mem::offset_of!(UnityVulkanInstance, reserved) - 56usize];
};
impl Default for UnityVulkanInstance {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct UnityVulkanMemory {
pub memory: VkDeviceMemory,
pub offset: VkDeviceSize,
pub size: VkDeviceSize,
pub mapped: *mut ::std::os::raw::c_void,
pub flags: VkMemoryPropertyFlags,
pub memoryTypeIndex: ::std::os::raw::c_uint,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of UnityVulkanMemory"][::std::mem::size_of::<UnityVulkanMemory>() - 72usize];
["Alignment of UnityVulkanMemory"][::std::mem::align_of::<UnityVulkanMemory>() - 8usize];
["Offset of field: UnityVulkanMemory::memory"]
[::std::mem::offset_of!(UnityVulkanMemory, memory) - 0usize];
["Offset of field: UnityVulkanMemory::offset"]
[::std::mem::offset_of!(UnityVulkanMemory, offset) - 8usize];
["Offset of field: UnityVulkanMemory::size"]
[::std::mem::offset_of!(UnityVulkanMemory, size) - 16usize];
["Offset of field: UnityVulkanMemory::mapped"]
[::std::mem::offset_of!(UnityVulkanMemory, mapped) - 24usize];
["Offset of field: UnityVulkanMemory::flags"]
[::std::mem::offset_of!(UnityVulkanMemory, flags) - 32usize];
["Offset of field: UnityVulkanMemory::memoryTypeIndex"]
[::std::mem::offset_of!(UnityVulkanMemory, memoryTypeIndex) - 36usize];
["Offset of field: UnityVulkanMemory::reserved"]
[::std::mem::offset_of!(UnityVulkanMemory, reserved) - 40usize];
};
impl Default for UnityVulkanMemory {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub const UnityVulkanResourceAccessMode_kUnityVulkanResourceAccess_ObserveOnly:
UnityVulkanResourceAccessMode = 0;
pub const UnityVulkanResourceAccessMode_kUnityVulkanResourceAccess_PipelineBarrier:
UnityVulkanResourceAccessMode = 1;
pub const UnityVulkanResourceAccessMode_kUnityVulkanResourceAccess_Recreate:
UnityVulkanResourceAccessMode = 2;
pub type UnityVulkanResourceAccessMode = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct UnityVulkanImage {
pub memory: UnityVulkanMemory,
pub image: VkImage,
pub layout: VkImageLayout,
pub aspect: VkImageAspectFlags,
pub usage: VkImageUsageFlags,
pub format: VkFormat,
pub extent: VkExtent3D,
pub tiling: VkImageTiling,
pub type_: VkImageType,
pub samples: VkSampleCountFlagBits,
pub layers: ::std::os::raw::c_int,
pub mipCount: ::std::os::raw::c_int,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of UnityVulkanImage"][::std::mem::size_of::<UnityVulkanImage>() - 160usize];
["Alignment of UnityVulkanImage"][::std::mem::align_of::<UnityVulkanImage>() - 8usize];
["Offset of field: UnityVulkanImage::memory"]
[::std::mem::offset_of!(UnityVulkanImage, memory) - 0usize];
["Offset of field: UnityVulkanImage::image"]
[::std::mem::offset_of!(UnityVulkanImage, image) - 72usize];
["Offset of field: UnityVulkanImage::layout"]
[::std::mem::offset_of!(UnityVulkanImage, layout) - 80usize];
["Offset of field: UnityVulkanImage::aspect"]
[::std::mem::offset_of!(UnityVulkanImage, aspect) - 84usize];
["Offset of field: UnityVulkanImage::usage"]
[::std::mem::offset_of!(UnityVulkanImage, usage) - 88usize];
["Offset of field: UnityVulkanImage::format"]
[::std::mem::offset_of!(UnityVulkanImage, format) - 92usize];
["Offset of field: UnityVulkanImage::extent"]
[::std::mem::offset_of!(UnityVulkanImage, extent) - 96usize];
["Offset of field: UnityVulkanImage::tiling"]
[::std::mem::offset_of!(UnityVulkanImage, tiling) - 108usize];
["Offset of field: UnityVulkanImage::type_"]
[::std::mem::offset_of!(UnityVulkanImage, type_) - 112usize];
["Offset of field: UnityVulkanImage::samples"]
[::std::mem::offset_of!(UnityVulkanImage, samples) - 116usize];
["Offset of field: UnityVulkanImage::layers"]
[::std::mem::offset_of!(UnityVulkanImage, layers) - 120usize];
["Offset of field: UnityVulkanImage::mipCount"]
[::std::mem::offset_of!(UnityVulkanImage, mipCount) - 124usize];
["Offset of field: UnityVulkanImage::reserved"]
[::std::mem::offset_of!(UnityVulkanImage, reserved) - 128usize];
};
impl Default for UnityVulkanImage {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct UnityVulkanBuffer {
pub memory: UnityVulkanMemory,
pub buffer: VkBuffer,
pub sizeInBytes: usize,
pub usage: VkBufferUsageFlags,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of UnityVulkanBuffer"][::std::mem::size_of::<UnityVulkanBuffer>() - 128usize];
["Alignment of UnityVulkanBuffer"][::std::mem::align_of::<UnityVulkanBuffer>() - 8usize];
["Offset of field: UnityVulkanBuffer::memory"]
[::std::mem::offset_of!(UnityVulkanBuffer, memory) - 0usize];
["Offset of field: UnityVulkanBuffer::buffer"]
[::std::mem::offset_of!(UnityVulkanBuffer, buffer) - 72usize];
["Offset of field: UnityVulkanBuffer::sizeInBytes"]
[::std::mem::offset_of!(UnityVulkanBuffer, sizeInBytes) - 80usize];
["Offset of field: UnityVulkanBuffer::usage"]
[::std::mem::offset_of!(UnityVulkanBuffer, usage) - 88usize];
["Offset of field: UnityVulkanBuffer::reserved"]
[::std::mem::offset_of!(UnityVulkanBuffer, reserved) - 96usize];
};
impl Default for UnityVulkanBuffer {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct UnityVulkanRecordingState {
pub commandBuffer: VkCommandBuffer,
pub commandBufferLevel: VkCommandBufferLevel,
pub renderPass: VkRenderPass,
pub framebuffer: VkFramebuffer,
pub subPassIndex: ::std::os::raw::c_int,
pub currentFrameNumber: ::std::os::raw::c_ulonglong,
pub safeFrameNumber: ::std::os::raw::c_ulonglong,
pub reserved: [*mut ::std::os::raw::c_void; 4usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of UnityVulkanRecordingState"]
[::std::mem::size_of::<UnityVulkanRecordingState>() - 88usize];
["Alignment of UnityVulkanRecordingState"]
[::std::mem::align_of::<UnityVulkanRecordingState>() - 8usize];
["Offset of field: UnityVulkanRecordingState::commandBuffer"]
[::std::mem::offset_of!(UnityVulkanRecordingState, commandBuffer) - 0usize];
["Offset of field: UnityVulkanRecordingState::commandBufferLevel"]
[::std::mem::offset_of!(UnityVulkanRecordingState, commandBufferLevel) - 8usize];
["Offset of field: UnityVulkanRecordingState::renderPass"]
[::std::mem::offset_of!(UnityVulkanRecordingState, renderPass) - 16usize];
["Offset of field: UnityVulkanRecordingState::framebuffer"]
[::std::mem::offset_of!(UnityVulkanRecordingState, framebuffer) - 24usize];
["Offset of field: UnityVulkanRecordingState::subPassIndex"]
[::std::mem::offset_of!(UnityVulkanRecordingState, subPassIndex) - 32usize];
["Offset of field: UnityVulkanRecordingState::currentFrameNumber"]
[::std::mem::offset_of!(UnityVulkanRecordingState, currentFrameNumber) - 40usize];
["Offset of field: UnityVulkanRecordingState::safeFrameNumber"]
[::std::mem::offset_of!(UnityVulkanRecordingState, safeFrameNumber) - 48usize];
["Offset of field: UnityVulkanRecordingState::reserved"]
[::std::mem::offset_of!(UnityVulkanRecordingState, reserved) - 56usize];
};
impl Default for UnityVulkanRecordingState {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub const UnityVulkanEventRenderPassPreCondition_kUnityVulkanRenderPass_DontCare:
UnityVulkanEventRenderPassPreCondition = 0;
pub const UnityVulkanEventRenderPassPreCondition_kUnityVulkanRenderPass_EnsureInside:
UnityVulkanEventRenderPassPreCondition = 1;
pub const UnityVulkanEventRenderPassPreCondition_kUnityVulkanRenderPass_EnsureOutside:
UnityVulkanEventRenderPassPreCondition = 2;
pub type UnityVulkanEventRenderPassPreCondition = ::std::os::raw::c_uint;
pub const UnityVulkanGraphicsQueueAccess_kUnityVulkanGraphicsQueueAccess_DontCare:
UnityVulkanGraphicsQueueAccess = 0;
pub const UnityVulkanGraphicsQueueAccess_kUnityVulkanGraphicsQueueAccess_Allow:
UnityVulkanGraphicsQueueAccess = 1;
pub type UnityVulkanGraphicsQueueAccess = ::std::os::raw::c_uint;
pub const UnityVulkanEventConfigFlagBits_kUnityVulkanEventConfigFlag_EnsurePreviousFrameSubmission : UnityVulkanEventConfigFlagBits = 1 ;
pub const UnityVulkanEventConfigFlagBits_kUnityVulkanEventConfigFlag_FlushCommandBuffers:
UnityVulkanEventConfigFlagBits = 2;
pub const UnityVulkanEventConfigFlagBits_kUnityVulkanEventConfigFlag_SyncWorkerThreads:
UnityVulkanEventConfigFlagBits = 4;
pub const UnityVulkanEventConfigFlagBits_kUnityVulkanEventConfigFlag_ModifiesCommandBuffersState:
UnityVulkanEventConfigFlagBits = 8;
pub type UnityVulkanEventConfigFlagBits = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct UnityVulkanPluginEventConfig {
pub renderPassPrecondition: UnityVulkanEventRenderPassPreCondition,
pub graphicsQueueAccess: UnityVulkanGraphicsQueueAccess,
pub flags: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of UnityVulkanPluginEventConfig"]
[::std::mem::size_of::<UnityVulkanPluginEventConfig>() - 12usize];
["Alignment of UnityVulkanPluginEventConfig"]
[::std::mem::align_of::<UnityVulkanPluginEventConfig>() - 4usize];
["Offset of field: UnityVulkanPluginEventConfig::renderPassPrecondition"]
[::std::mem::offset_of!(UnityVulkanPluginEventConfig, renderPassPrecondition) - 0usize];
["Offset of field: UnityVulkanPluginEventConfig::graphicsQueueAccess"]
[::std::mem::offset_of!(UnityVulkanPluginEventConfig, graphicsQueueAccess) - 4usize];
["Offset of field: UnityVulkanPluginEventConfig::flags"]
[::std::mem::offset_of!(UnityVulkanPluginEventConfig, flags) - 8usize];
};
impl Default for UnityVulkanPluginEventConfig {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
unsafe extern "system" {
#[link_name = "\u{1}__ZL21UnityVulkanWholeImage"]
pub static UnityVulkanWholeImage: *const VkImageSubresource;
}
pub type UnityVulkanInitCallback = ::std::option::Option<
unsafe extern "system" fn(
getInstanceProcAddr: PFN_vkGetInstanceProcAddr,
userdata: *mut ::std::os::raw::c_void,
) -> PFN_vkGetInstanceProcAddr,
>;
pub const UnityVulkanSwapchainMode_kUnityVulkanSwapchainMode_Default: UnityVulkanSwapchainMode = 0;
pub const UnityVulkanSwapchainMode_kUnityVulkanSwapchainMode_Offscreen: UnityVulkanSwapchainMode =
1;
pub type UnityVulkanSwapchainMode = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct UnityVulkanSwapchainConfiguration {
pub mode: UnityVulkanSwapchainMode,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of UnityVulkanSwapchainConfiguration"]
[::std::mem::size_of::<UnityVulkanSwapchainConfiguration>() - 4usize];
["Alignment of UnityVulkanSwapchainConfiguration"]
[::std::mem::align_of::<UnityVulkanSwapchainConfiguration>() - 4usize];
["Offset of field: UnityVulkanSwapchainConfiguration::mode"]
[::std::mem::offset_of!(UnityVulkanSwapchainConfiguration, mode) - 0usize];
};
impl Default for UnityVulkanSwapchainConfiguration {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub const kUnityVulkanInitCallbackMaxPriority: _bindgen_ty_1 = 2147483647;
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
#[repr(C)]
pub struct IUnityGraphicsVulkanV2 {
pub InterceptInitialization: ::std::option::Option<
unsafe extern "system" fn(
func: UnityVulkanInitCallback,
userdata: *mut ::std::os::raw::c_void,
) -> bool,
>,
pub InterceptVulkanAPI: ::std::option::Option<
unsafe extern "system" fn(
name: *const ::std::os::raw::c_char,
func: PFN_vkVoidFunction,
) -> PFN_vkVoidFunction,
>,
pub ConfigureEvent: ::std::option::Option<
unsafe extern "system" fn(
eventID: ::std::os::raw::c_int,
pluginEventConfig: *const UnityVulkanPluginEventConfig,
),
>,
pub Instance: ::std::option::Option<unsafe extern "system" fn() -> UnityVulkanInstance>,
pub CommandRecordingState: ::std::option::Option<
unsafe extern "system" fn(
outCommandRecordingState: *mut UnityVulkanRecordingState,
queueAccess: UnityVulkanGraphicsQueueAccess,
) -> bool,
>,
pub AccessTexture: ::std::option::Option<
unsafe extern "system" fn(
nativeTexture: *mut ::std::os::raw::c_void,
subResource: *const VkImageSubresource,
layout: VkImageLayout,
pipelineStageFlags: VkPipelineStageFlags,
accessFlags: VkAccessFlags,
accessMode: UnityVulkanResourceAccessMode,
outImage: *mut UnityVulkanImage,
) -> bool,
>,
pub AccessRenderBufferTexture: ::std::option::Option<
unsafe extern "system" fn(
nativeRenderBuffer: UnityRenderBuffer,
subResource: *const VkImageSubresource,
layout: VkImageLayout,
pipelineStageFlags: VkPipelineStageFlags,
accessFlags: VkAccessFlags,
accessMode: UnityVulkanResourceAccessMode,
outImage: *mut UnityVulkanImage,
) -> bool,
>,
pub AccessRenderBufferResolveTexture: ::std::option::Option<
unsafe extern "system" fn(
nativeRenderBuffer: UnityRenderBuffer,
subResource: *const VkImageSubresource,
layout: VkImageLayout,
pipelineStageFlags: VkPipelineStageFlags,
accessFlags: VkAccessFlags,
accessMode: UnityVulkanResourceAccessMode,
outImage: *mut UnityVulkanImage,
) -> bool,
>,
pub AccessBuffer: ::std::option::Option<
unsafe extern "system" fn(
nativeBuffer: *mut ::std::os::raw::c_void,
pipelineStageFlags: VkPipelineStageFlags,
accessFlags: VkAccessFlags,
accessMode: UnityVulkanResourceAccessMode,
outBuffer: *mut UnityVulkanBuffer,
) -> bool,
>,
pub EnsureOutsideRenderPass: ::std::option::Option<unsafe extern "system" fn()>,
pub EnsureInsideRenderPass: ::std::option::Option<unsafe extern "system" fn()>,
pub AccessQueue: ::std::option::Option<
unsafe extern "system" fn(
arg1: UnityRenderingEventAndData,
eventId: ::std::os::raw::c_int,
userData: *mut ::std::os::raw::c_void,
flush: bool,
),
>,
pub ConfigureSwapchain: ::std::option::Option<
unsafe extern "system" fn(swapChainConfig: *const UnityVulkanSwapchainConfiguration) -> bool,
>,
pub AccessTextureByID: ::std::option::Option<
unsafe extern "system" fn(
textureID: UnityTextureID,
subResource: *const VkImageSubresource,
layout: VkImageLayout,
pipelineStageFlags: VkPipelineStageFlags,
accessFlags: VkAccessFlags,
accessMode: UnityVulkanResourceAccessMode,
outImage: *mut UnityVulkanImage,
) -> bool,
>,
pub AddInterceptInitialization: ::std::option::Option<
unsafe extern "system" fn(
func: UnityVulkanInitCallback,
userdata: *mut ::std::os::raw::c_void,
priority: i32,
) -> bool,
>,
pub RemoveInterceptInitialization:
::std::option::Option<unsafe extern "system" fn(func: UnityVulkanInitCallback) -> bool>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IUnityGraphicsVulkanV2"][::std::mem::size_of::<IUnityGraphicsVulkanV2>() - 128usize];
["Alignment of IUnityGraphicsVulkanV2"]
[::std::mem::align_of::<IUnityGraphicsVulkanV2>() - 8usize];
["Offset of field: IUnityGraphicsVulkanV2::InterceptInitialization"]
[::std::mem::offset_of!(IUnityGraphicsVulkanV2, InterceptInitialization) - 0usize];
["Offset of field: IUnityGraphicsVulkanV2::InterceptVulkanAPI"]
[::std::mem::offset_of!(IUnityGraphicsVulkanV2, InterceptVulkanAPI) - 8usize];
["Offset of field: IUnityGraphicsVulkanV2::ConfigureEvent"]
[::std::mem::offset_of!(IUnityGraphicsVulkanV2, ConfigureEvent) - 16usize];
["Offset of field: IUnityGraphicsVulkanV2::Instance"]
[::std::mem::offset_of!(IUnityGraphicsVulkanV2, Instance) - 24usize];
["Offset of field: IUnityGraphicsVulkanV2::CommandRecordingState"]
[::std::mem::offset_of!(IUnityGraphicsVulkanV2, CommandRecordingState) - 32usize];
["Offset of field: IUnityGraphicsVulkanV2::AccessTexture"]
[::std::mem::offset_of!(IUnityGraphicsVulkanV2, AccessTexture) - 40usize];
["Offset of field: IUnityGraphicsVulkanV2::AccessRenderBufferTexture"]
[::std::mem::offset_of!(IUnityGraphicsVulkanV2, AccessRenderBufferTexture) - 48usize];
["Offset of field: IUnityGraphicsVulkanV2::AccessRenderBufferResolveTexture"][::std::mem::offset_of!(
IUnityGraphicsVulkanV2,
AccessRenderBufferResolveTexture
) - 56usize];
["Offset of field: IUnityGraphicsVulkanV2::AccessBuffer"]
[::std::mem::offset_of!(IUnityGraphicsVulkanV2, AccessBuffer) - 64usize];
["Offset of field: IUnityGraphicsVulkanV2::EnsureOutsideRenderPass"]
[::std::mem::offset_of!(IUnityGraphicsVulkanV2, EnsureOutsideRenderPass) - 72usize];
["Offset of field: IUnityGraphicsVulkanV2::EnsureInsideRenderPass"]
[::std::mem::offset_of!(IUnityGraphicsVulkanV2, EnsureInsideRenderPass) - 80usize];
["Offset of field: IUnityGraphicsVulkanV2::AccessQueue"]
[::std::mem::offset_of!(IUnityGraphicsVulkanV2, AccessQueue) - 88usize];
["Offset of field: IUnityGraphicsVulkanV2::ConfigureSwapchain"]
[::std::mem::offset_of!(IUnityGraphicsVulkanV2, ConfigureSwapchain) - 96usize];
["Offset of field: IUnityGraphicsVulkanV2::AccessTextureByID"]
[::std::mem::offset_of!(IUnityGraphicsVulkanV2, AccessTextureByID) - 104usize];
["Offset of field: IUnityGraphicsVulkanV2::AddInterceptInitialization"]
[::std::mem::offset_of!(IUnityGraphicsVulkanV2, AddInterceptInitialization) - 112usize];
["Offset of field: IUnityGraphicsVulkanV2::RemoveInterceptInitialization"]
[::std::mem::offset_of!(IUnityGraphicsVulkanV2, RemoveInterceptInitialization) - 120usize];
};
impl Default for IUnityGraphicsVulkanV2 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
pub struct IUnityGraphicsVulkan {
pub InterceptInitialization: ::std::option::Option<
unsafe extern "system" fn(
func: UnityVulkanInitCallback,
userdata: *mut ::std::os::raw::c_void,
) -> bool,
>,
pub InterceptVulkanAPI: ::std::option::Option<
unsafe extern "system" fn(
name: *const ::std::os::raw::c_char,
func: PFN_vkVoidFunction,
) -> PFN_vkVoidFunction,
>,
pub ConfigureEvent: ::std::option::Option<
unsafe extern "system" fn(
eventID: ::std::os::raw::c_int,
pluginEventConfig: *const UnityVulkanPluginEventConfig,
),
>,
pub Instance: ::std::option::Option<unsafe extern "system" fn() -> UnityVulkanInstance>,
pub CommandRecordingState: ::std::option::Option<
unsafe extern "system" fn(
outCommandRecordingState: *mut UnityVulkanRecordingState,
queueAccess: UnityVulkanGraphicsQueueAccess,
) -> bool,
>,
pub AccessTexture: ::std::option::Option<
unsafe extern "system" fn(
nativeTexture: *mut ::std::os::raw::c_void,
subResource: *const VkImageSubresource,
layout: VkImageLayout,
pipelineStageFlags: VkPipelineStageFlags,
accessFlags: VkAccessFlags,
accessMode: UnityVulkanResourceAccessMode,
outImage: *mut UnityVulkanImage,
) -> bool,
>,
pub AccessRenderBufferTexture: ::std::option::Option<
unsafe extern "system" fn(
nativeRenderBuffer: UnityRenderBuffer,
subResource: *const VkImageSubresource,
layout: VkImageLayout,
pipelineStageFlags: VkPipelineStageFlags,
accessFlags: VkAccessFlags,
accessMode: UnityVulkanResourceAccessMode,
outImage: *mut UnityVulkanImage,
) -> bool,
>,
pub AccessRenderBufferResolveTexture: ::std::option::Option<
unsafe extern "system" fn(
nativeRenderBuffer: UnityRenderBuffer,
subResource: *const VkImageSubresource,
layout: VkImageLayout,
pipelineStageFlags: VkPipelineStageFlags,
accessFlags: VkAccessFlags,
accessMode: UnityVulkanResourceAccessMode,
outImage: *mut UnityVulkanImage,
) -> bool,
>,
pub AccessBuffer: ::std::option::Option<
unsafe extern "system" fn(
nativeBuffer: *mut ::std::os::raw::c_void,
pipelineStageFlags: VkPipelineStageFlags,
accessFlags: VkAccessFlags,
accessMode: UnityVulkanResourceAccessMode,
outBuffer: *mut UnityVulkanBuffer,
) -> bool,
>,
pub EnsureOutsideRenderPass: ::std::option::Option<unsafe extern "system" fn()>,
pub EnsureInsideRenderPass: ::std::option::Option<unsafe extern "system" fn()>,
pub AccessQueue: ::std::option::Option<
unsafe extern "system" fn(
arg1: UnityRenderingEventAndData,
eventId: ::std::os::raw::c_int,
userData: *mut ::std::os::raw::c_void,
flush: bool,
),
>,
pub ConfigureSwapchain: ::std::option::Option<
unsafe extern "system" fn(swapChainConfig: *const UnityVulkanSwapchainConfiguration) -> bool,
>,
pub AccessTextureByID: ::std::option::Option<
unsafe extern "system" fn(
textureID: UnityTextureID,
subResource: *const VkImageSubresource,
layout: VkImageLayout,
pipelineStageFlags: VkPipelineStageFlags,
accessFlags: VkAccessFlags,
accessMode: UnityVulkanResourceAccessMode,
outImage: *mut UnityVulkanImage,
) -> bool,
>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of IUnityGraphicsVulkan"][::std::mem::size_of::<IUnityGraphicsVulkan>() - 112usize];
["Alignment of IUnityGraphicsVulkan"][::std::mem::align_of::<IUnityGraphicsVulkan>() - 8usize];
["Offset of field: IUnityGraphicsVulkan::InterceptInitialization"]
[::std::mem::offset_of!(IUnityGraphicsVulkan, InterceptInitialization) - 0usize];
["Offset of field: IUnityGraphicsVulkan::InterceptVulkanAPI"]
[::std::mem::offset_of!(IUnityGraphicsVulkan, InterceptVulkanAPI) - 8usize];
["Offset of field: IUnityGraphicsVulkan::ConfigureEvent"]
[::std::mem::offset_of!(IUnityGraphicsVulkan, ConfigureEvent) - 16usize];
["Offset of field: IUnityGraphicsVulkan::Instance"]
[::std::mem::offset_of!(IUnityGraphicsVulkan, Instance) - 24usize];
["Offset of field: IUnityGraphicsVulkan::CommandRecordingState"]
[::std::mem::offset_of!(IUnityGraphicsVulkan, CommandRecordingState) - 32usize];
["Offset of field: IUnityGraphicsVulkan::AccessTexture"]
[::std::mem::offset_of!(IUnityGraphicsVulkan, AccessTexture) - 40usize];
["Offset of field: IUnityGraphicsVulkan::AccessRenderBufferTexture"]
[::std::mem::offset_of!(IUnityGraphicsVulkan, AccessRenderBufferTexture) - 48usize];
["Offset of field: IUnityGraphicsVulkan::AccessRenderBufferResolveTexture"]
[::std::mem::offset_of!(IUnityGraphicsVulkan, AccessRenderBufferResolveTexture) - 56usize];
["Offset of field: IUnityGraphicsVulkan::AccessBuffer"]
[::std::mem::offset_of!(IUnityGraphicsVulkan, AccessBuffer) - 64usize];
["Offset of field: IUnityGraphicsVulkan::EnsureOutsideRenderPass"]
[::std::mem::offset_of!(IUnityGraphicsVulkan, EnsureOutsideRenderPass) - 72usize];
["Offset of field: IUnityGraphicsVulkan::EnsureInsideRenderPass"]
[::std::mem::offset_of!(IUnityGraphicsVulkan, EnsureInsideRenderPass) - 80usize];
["Offset of field: IUnityGraphicsVulkan::AccessQueue"]
[::std::mem::offset_of!(IUnityGraphicsVulkan, AccessQueue) - 88usize];
["Offset of field: IUnityGraphicsVulkan::ConfigureSwapchain"]
[::std::mem::offset_of!(IUnityGraphicsVulkan, ConfigureSwapchain) - 96usize];
["Offset of field: IUnityGraphicsVulkan::AccessTextureByID"]
[::std::mem::offset_of!(IUnityGraphicsVulkan, AccessTextureByID) - 104usize];
};
impl Default for IUnityGraphicsVulkan {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}