mirror of
https://github.com/italicsjenga/portability.git
synced 2024-11-26 00:41:33 +11:00
Merge #229
229: Debug markers and iterator fixes r=kvark a=kvark Blocked on https://github.com/gfx-rs/gfx/pull/3387 Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This commit is contained in:
commit
bae930673d
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,6 +5,7 @@ conformance/*.qpa
|
||||||
conformance/*.txt
|
conformance/*.txt
|
||||||
gfx-portability-*.zip
|
gfx-portability-*.zip
|
||||||
commit-sha
|
commit-sha
|
||||||
|
materials
|
||||||
**/*.rs.bk
|
**/*.rs.bk
|
||||||
.vscode/
|
.vscode/
|
||||||
.lldbinit
|
.lldbinit
|
||||||
|
|
24
Cargo.lock
generated
24
Cargo.lock
generated
|
@ -263,7 +263,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gfx-auxil"
|
name = "gfx-auxil"
|
||||||
version = "0.5.0"
|
version = "0.5.0"
|
||||||
source = "git+https://github.com/gfx-rs/gfx#89dc302254ab68adc99a3b661e23c52b4b0d073f"
|
source = "git+https://github.com/gfx-rs/gfx#c3df31f6f4ee089d576b52550dfbba11a70c1a68"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fxhash",
|
"fxhash",
|
||||||
"gfx-hal",
|
"gfx-hal",
|
||||||
|
@ -273,7 +273,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gfx-backend-dx11"
|
name = "gfx-backend-dx11"
|
||||||
version = "0.6.0"
|
version = "0.6.0"
|
||||||
source = "git+https://github.com/gfx-rs/gfx#89dc302254ab68adc99a3b661e23c52b4b0d073f"
|
source = "git+https://github.com/gfx-rs/gfx#c3df31f6f4ee089d576b52550dfbba11a70c1a68"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"gfx-auxil",
|
"gfx-auxil",
|
||||||
|
@ -292,7 +292,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gfx-backend-dx12"
|
name = "gfx-backend-dx12"
|
||||||
version = "0.6.2"
|
version = "0.6.2"
|
||||||
source = "git+https://github.com/gfx-rs/gfx#89dc302254ab68adc99a3b661e23c52b4b0d073f"
|
source = "git+https://github.com/gfx-rs/gfx#c3df31f6f4ee089d576b52550dfbba11a70c1a68"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"d3d12",
|
"d3d12",
|
||||||
|
@ -309,7 +309,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gfx-backend-empty"
|
name = "gfx-backend-empty"
|
||||||
version = "0.6.0"
|
version = "0.6.0"
|
||||||
source = "git+https://github.com/gfx-rs/gfx#89dc302254ab68adc99a3b661e23c52b4b0d073f"
|
source = "git+https://github.com/gfx-rs/gfx#c3df31f6f4ee089d576b52550dfbba11a70c1a68"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gfx-hal",
|
"gfx-hal",
|
||||||
"log",
|
"log",
|
||||||
|
@ -319,7 +319,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gfx-backend-metal"
|
name = "gfx-backend-metal"
|
||||||
version = "0.6.0"
|
version = "0.6.0"
|
||||||
source = "git+https://github.com/gfx-rs/gfx#89dc302254ab68adc99a3b661e23c52b4b0d073f"
|
source = "git+https://github.com/gfx-rs/gfx#c3df31f6f4ee089d576b52550dfbba11a70c1a68"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayvec",
|
"arrayvec",
|
||||||
"bitflags",
|
"bitflags",
|
||||||
|
@ -343,7 +343,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gfx-backend-vulkan"
|
name = "gfx-backend-vulkan"
|
||||||
version = "0.6.1"
|
version = "0.6.1"
|
||||||
source = "git+https://github.com/gfx-rs/gfx#89dc302254ab68adc99a3b661e23c52b4b0d073f"
|
source = "git+https://github.com/gfx-rs/gfx#c3df31f6f4ee089d576b52550dfbba11a70c1a68"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayvec",
|
"arrayvec",
|
||||||
"ash",
|
"ash",
|
||||||
|
@ -364,7 +364,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gfx-hal"
|
name = "gfx-hal"
|
||||||
version = "0.6.0"
|
version = "0.6.0"
|
||||||
source = "git+https://github.com/gfx-rs/gfx#89dc302254ab68adc99a3b661e23c52b4b0d073f"
|
source = "git+https://github.com/gfx-rs/gfx#c3df31f6f4ee089d576b52550dfbba11a70c1a68"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
|
@ -687,9 +687,9 @@ checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.21"
|
version = "1.0.23"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "36e28516df94f3dd551a587da5357459d9b36d945a7c37c3557928c1c2ff2a2c"
|
checksum = "51ef7cd2518ead700af67bf9d1a658d90b6037d77110fd9c0445429d0ba1c6c9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-xid",
|
"unicode-xid",
|
||||||
]
|
]
|
||||||
|
@ -753,7 +753,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "range-alloc"
|
name = "range-alloc"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
source = "git+https://github.com/gfx-rs/gfx#89dc302254ab68adc99a3b661e23c52b4b0d073f"
|
source = "git+https://github.com/gfx-rs/gfx#c3df31f6f4ee089d576b52550dfbba11a70c1a68"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "raw-window-handle"
|
name = "raw-window-handle"
|
||||||
|
@ -855,9 +855,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "1.0.41"
|
version = "1.0.42"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6690e3e9f692504b941dc6c3b188fd28df054f7fb8469ab40680df52fdcc842b"
|
checksum = "9c51d92969d209b54a98397e1b91c8ae82d8c87a7bb87df0b29aa2ad81454228"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1030,3 +1030,9 @@ pub fn map_subresource_range(subresource: VkImageSubresourceRange) -> hal::image
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn map_marker_color(color: [f32; 4]) -> u32 {
|
||||||
|
color
|
||||||
|
.iter()
|
||||||
|
.fold(0u32, |u, c| (u << 8) | c.max(0.0).min(255.0) as u32)
|
||||||
|
}
|
||||||
|
|
|
@ -29,6 +29,14 @@ use std::{
|
||||||
const VERSION: (u32, u32, u32) = (1, 0, 66);
|
const VERSION: (u32, u32, u32) = (1, 0, 66);
|
||||||
const DRIVER_VERSION: u32 = 1;
|
const DRIVER_VERSION: u32 = 1;
|
||||||
|
|
||||||
|
unsafe fn make_slice<'a, T: 'a>(pointer: *const T, count: usize) -> &'a [T] {
|
||||||
|
if count == 0 {
|
||||||
|
&[]
|
||||||
|
} else {
|
||||||
|
slice::from_raw_parts(pointer, count)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn map_oom(oom: hal::device::OutOfMemory) -> VkResult {
|
fn map_oom(oom: hal::device::OutOfMemory) -> VkResult {
|
||||||
match oom {
|
match oom {
|
||||||
hal::device::OutOfMemory::Host => VkResult::VK_ERROR_OUT_OF_HOST_MEMORY,
|
hal::device::OutOfMemory::Host => VkResult::VK_ERROR_OUT_OF_HOST_MEMORY,
|
||||||
|
@ -708,6 +716,9 @@ pub unsafe extern "C" fn gfxGetDeviceProcAddr(
|
||||||
vkDestroyQueryPool, PFN_vkDestroyQueryPool => gfxDestroyQueryPool,
|
vkDestroyQueryPool, PFN_vkDestroyQueryPool => gfxDestroyQueryPool,
|
||||||
vkGetQueryPoolResults, PFN_vkGetQueryPoolResults => gfxGetQueryPoolResults,
|
vkGetQueryPoolResults, PFN_vkGetQueryPoolResults => gfxGetQueryPoolResults,
|
||||||
|
|
||||||
|
vkDebugMarkerSetObjectTagEXT, PFN_vkDebugMarkerSetObjectTagEXT => gfxDebugMarkerSetObjectTagEXT,
|
||||||
|
vkDebugMarkerSetObjectNameEXT, PFN_vkDebugMarkerSetObjectNameEXT => gfxDebugMarkerSetObjectNameEXT,
|
||||||
|
|
||||||
vkCmdBindPipeline, PFN_vkCmdBindPipeline => gfxCmdBindPipeline,
|
vkCmdBindPipeline, PFN_vkCmdBindPipeline => gfxCmdBindPipeline,
|
||||||
vkCmdSetViewport, PFN_vkCmdSetViewport => gfxCmdSetViewport,
|
vkCmdSetViewport, PFN_vkCmdSetViewport => gfxCmdSetViewport,
|
||||||
vkCmdSetScissor, PFN_vkCmdSetScissor => gfxCmdSetScissor,
|
vkCmdSetScissor, PFN_vkCmdSetScissor => gfxCmdSetScissor,
|
||||||
|
@ -752,6 +763,9 @@ pub unsafe extern "C" fn gfxGetDeviceProcAddr(
|
||||||
vkCmdPipelineBarrier, PFN_vkCmdPipelineBarrier => gfxCmdPipelineBarrier,
|
vkCmdPipelineBarrier, PFN_vkCmdPipelineBarrier => gfxCmdPipelineBarrier,
|
||||||
vkCmdBeginRenderPass, PFN_vkCmdBeginRenderPass => gfxCmdBeginRenderPass,
|
vkCmdBeginRenderPass, PFN_vkCmdBeginRenderPass => gfxCmdBeginRenderPass,
|
||||||
vkCmdEndRenderPass, PFN_vkCmdEndRenderPass => gfxCmdEndRenderPass,
|
vkCmdEndRenderPass, PFN_vkCmdEndRenderPass => gfxCmdEndRenderPass,
|
||||||
|
vkCmdDebugMarkerBeginEXT, PFN_vkCmdDebugMarkerBeginEXT => gfxCmdDebugMarkerBeginEXT,
|
||||||
|
vkCmdDebugMarkerEndEXT, PFN_vkCmdDebugMarkerEndEXT => gfxCmdDebugMarkerEndEXT,
|
||||||
|
vkCmdDebugMarkerInsertEXT, PFN_vkCmdDebugMarkerInsertEXT => gfxCmdDebugMarkerInsertEXT,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1025,6 +1039,7 @@ lazy_static! {
|
||||||
vec![
|
vec![
|
||||||
VK_KHR_SWAPCHAIN_EXTENSION_NAME,
|
VK_KHR_SWAPCHAIN_EXTENSION_NAME,
|
||||||
VK_KHR_MAINTENANCE1_EXTENSION_NAME,
|
VK_KHR_MAINTENANCE1_EXTENSION_NAME,
|
||||||
|
VK_EXT_DEBUG_MARKER_EXTENSION_NAME,
|
||||||
VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME,
|
VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME,
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
@ -1039,6 +1054,10 @@ lazy_static! {
|
||||||
extensionName: [0; 256], // VK_KHR_MAINTENANCE1_EXTENSION_NAME
|
extensionName: [0; 256], // VK_KHR_MAINTENANCE1_EXTENSION_NAME
|
||||||
specVersion: VK_KHR_MAINTENANCE1_SPEC_VERSION,
|
specVersion: VK_KHR_MAINTENANCE1_SPEC_VERSION,
|
||||||
},
|
},
|
||||||
|
VkExtensionProperties {
|
||||||
|
extensionName: [0; 256], // VK_EXT_DEBUG_MARKER_EXTENSION_NAME
|
||||||
|
specVersion: VK_EXT_DEBUG_MARKER_SPEC_VERSION,
|
||||||
|
},
|
||||||
VkExtensionProperties {
|
VkExtensionProperties {
|
||||||
extensionName: [0; 256], // VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME
|
extensionName: [0; 256], // VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME
|
||||||
specVersion: VK_KHR_PORTABILITY_SUBSET_SPEC_VERSION,
|
specVersion: VK_KHR_PORTABILITY_SUBSET_SPEC_VERSION,
|
||||||
|
@ -1163,31 +1182,47 @@ pub unsafe extern "C" fn gfxQueueSubmit(
|
||||||
pSubmits: *const VkSubmitInfo,
|
pSubmits: *const VkSubmitInfo,
|
||||||
fence: VkFence,
|
fence: VkFence,
|
||||||
) -> VkResult {
|
) -> VkResult {
|
||||||
|
if submitCount == 0 {
|
||||||
|
use std::iter::empty;
|
||||||
|
// sometimes, all you need is a fence...
|
||||||
|
let submission = hal::queue::Submission {
|
||||||
|
command_buffers: empty(),
|
||||||
|
wait_semaphores: empty(),
|
||||||
|
signal_semaphores: empty(),
|
||||||
|
};
|
||||||
|
type RawSemaphore = <B as hal::Backend>::Semaphore;
|
||||||
|
queue.submit::<VkCommandBuffer, _, RawSemaphore, _, _>(
|
||||||
|
submission,
|
||||||
|
fence.as_ref().map(|f| &f.raw),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
let submits = slice::from_raw_parts(pSubmits, submitCount as usize);
|
let submits = slice::from_raw_parts(pSubmits, submitCount as usize);
|
||||||
for (i, submission) in submits.iter().enumerate() {
|
for (i, submission) in submits.iter().enumerate() {
|
||||||
let cmd_slice = slice::from_raw_parts(
|
let cmd_slice = make_slice(
|
||||||
submission.pCommandBuffers,
|
submission.pCommandBuffers,
|
||||||
submission.commandBufferCount as _,
|
submission.commandBufferCount as usize,
|
||||||
);
|
);
|
||||||
let wait_semaphores = {
|
let wait_semaphores = {
|
||||||
let semaphores = slice::from_raw_parts(
|
let semaphores = make_slice(
|
||||||
submission.pWaitSemaphores,
|
submission.pWaitSemaphores,
|
||||||
submission.waitSemaphoreCount as _,
|
submission.waitSemaphoreCount as usize,
|
||||||
);
|
);
|
||||||
let stages = slice::from_raw_parts(
|
let stages = make_slice(
|
||||||
submission.pWaitDstStageMask,
|
submission.pWaitDstStageMask,
|
||||||
submission.waitSemaphoreCount as _,
|
submission.waitSemaphoreCount as usize,
|
||||||
);
|
);
|
||||||
|
|
||||||
stages
|
stages
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.zip(semaphores)
|
.zip(semaphores)
|
||||||
.filter(|(_, semaphore)| !semaphore.is_fake)
|
.filter(|(_, semaphore)| !semaphore.is_fake)
|
||||||
.map(|(stage, semaphore)| (&semaphore.raw, conv::map_pipeline_stage_flags(*stage)))
|
.map(|(stage, semaphore)| {
|
||||||
|
(&semaphore.raw, conv::map_pipeline_stage_flags(*stage))
|
||||||
|
})
|
||||||
};
|
};
|
||||||
let signal_semaphores = slice::from_raw_parts(
|
let signal_semaphores = make_slice(
|
||||||
submission.pSignalSemaphores,
|
submission.pSignalSemaphores,
|
||||||
submission.signalSemaphoreCount as _,
|
submission.signalSemaphoreCount as usize,
|
||||||
)
|
)
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|semaphore| {
|
.map(|semaphore| {
|
||||||
|
@ -1210,20 +1245,6 @@ pub unsafe extern "C" fn gfxQueueSubmit(
|
||||||
};
|
};
|
||||||
queue.submit(submission, fence);
|
queue.submit(submission, fence);
|
||||||
}
|
}
|
||||||
|
|
||||||
// sometimes, all you need is a fence...
|
|
||||||
if submits.is_empty() {
|
|
||||||
use std::iter::empty;
|
|
||||||
let submission = hal::queue::Submission {
|
|
||||||
command_buffers: empty(),
|
|
||||||
wait_semaphores: empty(),
|
|
||||||
signal_semaphores: empty(),
|
|
||||||
};
|
|
||||||
type RawSemaphore = <B as hal::Backend>::Semaphore;
|
|
||||||
queue.submit::<VkCommandBuffer, _, RawSemaphore, _, _>(
|
|
||||||
submission,
|
|
||||||
fence.as_ref().map(|f| &f.raw),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult::VK_SUCCESS
|
VkResult::VK_SUCCESS
|
||||||
|
@ -2710,7 +2731,7 @@ pub unsafe extern "C" fn gfxCreateDescriptorSetLayout(
|
||||||
pSetLayout: *mut VkDescriptorSetLayout,
|
pSetLayout: *mut VkDescriptorSetLayout,
|
||||||
) -> VkResult {
|
) -> VkResult {
|
||||||
let info = &*pCreateInfo;
|
let info = &*pCreateInfo;
|
||||||
let layout_bindings = slice::from_raw_parts(info.pBindings, info.bindingCount as _);
|
let layout_bindings = make_slice(info.pBindings, info.bindingCount as usize);
|
||||||
|
|
||||||
let sampler_iter = layout_bindings
|
let sampler_iter = layout_bindings
|
||||||
.iter()
|
.iter()
|
||||||
|
@ -3161,7 +3182,7 @@ pub unsafe extern "C" fn gfxCreateRenderPass(
|
||||||
});
|
});
|
||||||
|
|
||||||
// Subpass dependencies
|
// Subpass dependencies
|
||||||
let dependencies = slice::from_raw_parts(info.pDependencies, info.dependencyCount as _);
|
let dependencies = make_slice(info.pDependencies, info.dependencyCount as usize);
|
||||||
|
|
||||||
fn map_subpass_ref(subpass: u32) -> Option<pass::SubpassId> {
|
fn map_subpass_ref(subpass: u32) -> Option<pass::SubpassId> {
|
||||||
if subpass == VK_SUBPASS_EXTERNAL as u32 {
|
if subpass == VK_SUBPASS_EXTERNAL as u32 {
|
||||||
|
@ -3498,7 +3519,7 @@ pub unsafe extern "C" fn gfxCmdBindDescriptorSets(
|
||||||
let descriptor_sets = slice::from_raw_parts(pDescriptorSets, descriptorSetCount as _)
|
let descriptor_sets = slice::from_raw_parts(pDescriptorSets, descriptorSetCount as _)
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|set| &**set);
|
.map(|set| &**set);
|
||||||
let offsets = slice::from_raw_parts(pDynamicOffsets, dynamicOffsetCount as _);
|
let offsets = make_slice(pDynamicOffsets, dynamicOffsetCount as usize);
|
||||||
|
|
||||||
match pipelineBindPoint {
|
match pipelineBindPoint {
|
||||||
VkPipelineBindPoint::VK_PIPELINE_BIND_POINT_GRAPHICS => commandBuffer
|
VkPipelineBindPoint::VK_PIPELINE_BIND_POINT_GRAPHICS => commandBuffer
|
||||||
|
@ -4012,9 +4033,9 @@ pub unsafe extern "C" fn gfxCmdWaitEvents(
|
||||||
imageMemoryBarrierCount: u32,
|
imageMemoryBarrierCount: u32,
|
||||||
pImageMemoryBarriers: *const VkImageMemoryBarrier,
|
pImageMemoryBarriers: *const VkImageMemoryBarrier,
|
||||||
) {
|
) {
|
||||||
let raw_globals = slice::from_raw_parts(pMemoryBarriers, memoryBarrierCount as _);
|
let raw_globals = make_slice(pMemoryBarriers, memoryBarrierCount as _);
|
||||||
let raw_buffers = slice::from_raw_parts(pBufferMemoryBarriers, bufferMemoryBarrierCount as _);
|
let raw_buffers = make_slice(pBufferMemoryBarriers, bufferMemoryBarrierCount as _);
|
||||||
let raw_images = slice::from_raw_parts(pImageMemoryBarriers, imageMemoryBarrierCount as _);
|
let raw_images = make_slice(pImageMemoryBarriers, imageMemoryBarrierCount as _);
|
||||||
|
|
||||||
let barriers = make_barriers(raw_globals, raw_buffers, raw_images);
|
let barriers = make_barriers(raw_globals, raw_buffers, raw_images);
|
||||||
|
|
||||||
|
@ -4039,9 +4060,9 @@ pub unsafe extern "C" fn gfxCmdPipelineBarrier(
|
||||||
imageMemoryBarrierCount: u32,
|
imageMemoryBarrierCount: u32,
|
||||||
pImageMemoryBarriers: *const VkImageMemoryBarrier,
|
pImageMemoryBarriers: *const VkImageMemoryBarrier,
|
||||||
) {
|
) {
|
||||||
let raw_globals = slice::from_raw_parts(pMemoryBarriers, memoryBarrierCount as _);
|
let raw_globals = make_slice(pMemoryBarriers, memoryBarrierCount as _);
|
||||||
let raw_buffers = slice::from_raw_parts(pBufferMemoryBarriers, bufferMemoryBarrierCount as _);
|
let raw_buffers = make_slice(pBufferMemoryBarriers, bufferMemoryBarrierCount as _);
|
||||||
let raw_images = slice::from_raw_parts(pImageMemoryBarriers, imageMemoryBarrierCount as _);
|
let raw_images = make_slice(pImageMemoryBarriers, imageMemoryBarrierCount as _);
|
||||||
|
|
||||||
let barriers = make_barriers(raw_globals, raw_buffers, raw_images);
|
let barriers = make_barriers(raw_globals, raw_buffers, raw_images);
|
||||||
|
|
||||||
|
@ -4158,7 +4179,7 @@ pub unsafe extern "C" fn gfxCmdBeginRenderPass(
|
||||||
};
|
};
|
||||||
// gfx-hal expects exactly one clear value for an attachment that needs
|
// gfx-hal expects exactly one clear value for an attachment that needs
|
||||||
// to be cleared, while Vulkan has gaps.
|
// to be cleared, while Vulkan has gaps.
|
||||||
let clear_values = slice::from_raw_parts(info.pClearValues, info.clearValueCount as _)
|
let clear_values = make_slice(info.pClearValues, info.clearValueCount as _)
|
||||||
.iter()
|
.iter()
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.filter_map(|(i, cv)| {
|
.filter_map(|(i, cv)| {
|
||||||
|
@ -4750,7 +4771,7 @@ pub unsafe extern "C" fn gfxQueuePresentKHR(
|
||||||
|
|
||||||
let swapchain_slice = slice::from_raw_parts(info.pSwapchains, info.swapchainCount as _);
|
let swapchain_slice = slice::from_raw_parts(info.pSwapchains, info.swapchainCount as _);
|
||||||
let index_slice = slice::from_raw_parts(info.pImageIndices, info.swapchainCount as _);
|
let index_slice = slice::from_raw_parts(info.pImageIndices, info.swapchainCount as _);
|
||||||
let wait_semaphores = slice::from_raw_parts(info.pWaitSemaphores, info.waitSemaphoreCount as _);
|
let wait_semaphores = make_slice(info.pWaitSemaphores, info.waitSemaphoreCount as _);
|
||||||
if wait_semaphores.len() > 1 {
|
if wait_semaphores.len() > 1 {
|
||||||
warn!(
|
warn!(
|
||||||
"Only one semaphore is supported for present, {} are given",
|
"Only one semaphore is supported for present, {} are given",
|
||||||
|
@ -4825,3 +4846,77 @@ pub unsafe extern "C" fn gfxCreateMacOSSurfaceMVK(
|
||||||
unreachable!()
|
unreachable!()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
pub unsafe extern "C" fn gfxDebugMarkerSetObjectTagEXT(
|
||||||
|
_gpu: VkDevice,
|
||||||
|
_pTagInfo: *mut VkDebugMarkerObjectTagInfoEXT,
|
||||||
|
) -> VkResult {
|
||||||
|
VkResult::VK_SUCCESS //TODO
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub unsafe extern "C" fn gfxDebugMarkerSetObjectNameEXT(
|
||||||
|
gpu: VkDevice,
|
||||||
|
pNameInfo: *mut VkDebugMarkerObjectNameInfoEXT,
|
||||||
|
) -> VkResult {
|
||||||
|
use VkDebugReportObjectTypeEXT::*;
|
||||||
|
|
||||||
|
let info = &*pNameInfo;
|
||||||
|
let name = CStr::from_ptr(info.pObjectName).to_string_lossy();
|
||||||
|
match info.objectType {
|
||||||
|
VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT => {
|
||||||
|
let mut h = mem::transmute::<_, VkBuffer>(info.object);
|
||||||
|
gpu.device.set_buffer_name(&mut *h, &*name);
|
||||||
|
}
|
||||||
|
VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT => match *mem::transmute::<_, VkImage>(info.object) {
|
||||||
|
Image::Native { ref mut raw } => gpu.device.set_image_name(raw, &*name),
|
||||||
|
Image::SwapchainFrame { .. } => (),
|
||||||
|
},
|
||||||
|
VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT => {
|
||||||
|
let mut h = mem::transmute::<_, VkCommandBuffer>(info.object);
|
||||||
|
gpu.device.set_command_buffer_name(&mut *h, &*name);
|
||||||
|
}
|
||||||
|
VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT => {
|
||||||
|
match *mem::transmute::<_, VkFramebuffer>(info.object) {
|
||||||
|
Framebuffer::Native(ref mut raw) => gpu.device.set_framebuffer_name(raw, &*name),
|
||||||
|
Framebuffer::Lazy { .. } => (),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT => {
|
||||||
|
let mut h = mem::transmute::<_, VkRenderPass>(info.object);
|
||||||
|
gpu.device.set_render_pass_name(&mut h.raw, &*name);
|
||||||
|
}
|
||||||
|
VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT => {
|
||||||
|
match *mem::transmute::<_, VkPipeline>(info.object) {
|
||||||
|
Pipeline::Compute(ref mut raw) => gpu.device.set_compute_pipeline_name(raw, &*name),
|
||||||
|
Pipeline::Graphics(ref mut raw) => {
|
||||||
|
gpu.device.set_graphics_pipeline_name(raw, &*name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
VkResult::VK_SUCCESS
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub unsafe extern "C" fn gfxCmdDebugMarkerBeginEXT(
|
||||||
|
mut commandBuffer: VkCommandBuffer,
|
||||||
|
pMarkerInfo: *mut VkDebugMarkerMarkerInfoEXT,
|
||||||
|
) {
|
||||||
|
let info = &*pMarkerInfo;
|
||||||
|
let name = CStr::from_ptr(info.pMarkerName).to_string_lossy();
|
||||||
|
commandBuffer.begin_debug_marker(&*name, conv::map_marker_color(info.color));
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub unsafe extern "C" fn gfxCmdDebugMarkerEndEXT(mut commandBuffer: VkCommandBuffer) {
|
||||||
|
commandBuffer.end_debug_marker();
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub unsafe extern "C" fn gfxCmdDebugMarkerInsertEXT(
|
||||||
|
mut commandBuffer: VkCommandBuffer,
|
||||||
|
pMarkerInfo: *mut VkDebugMarkerMarkerInfoEXT,
|
||||||
|
) {
|
||||||
|
let info = &*pMarkerInfo;
|
||||||
|
let name = CStr::from_ptr(info.pMarkerName).to_string_lossy();
|
||||||
|
commandBuffer.insert_debug_marker(&*name, conv::map_marker_color(info.color));
|
||||||
|
}
|
||||||
|
|
|
@ -4957,19 +4957,6 @@ pub type PFN_vkAcquireNextImageKHR = ::std::option::Option<
|
||||||
pub type PFN_vkQueuePresentKHR = ::std::option::Option<
|
pub type PFN_vkQueuePresentKHR = ::std::option::Option<
|
||||||
unsafe extern "C" fn(queue: VkQueue, pPresentInfo: *const VkPresentInfoKHR) -> VkResult,
|
unsafe extern "C" fn(queue: VkQueue, pPresentInfo: *const VkPresentInfoKHR) -> VkResult,
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkAcquireNextImageKHR(
|
|
||||||
device: VkDevice,
|
|
||||||
swapchain: VkSwapchainKHR,
|
|
||||||
timeout: u64,
|
|
||||||
semaphore: VkSemaphore,
|
|
||||||
fence: VkFence,
|
|
||||||
pImageIndex: *mut u32,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkQueuePresentKHR(queue: VkQueue, pPresentInfo: *const VkPresentInfoKHR) -> VkResult;
|
|
||||||
}
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
pub struct VkDisplayKHR_T {
|
pub struct VkDisplayKHR_T {
|
||||||
|
@ -5148,61 +5135,6 @@ pub type PFN_vkCreateDisplayPlaneSurfaceKHR = ::std::option::Option<
|
||||||
pSurface: *mut VkSurfaceKHR,
|
pSurface: *mut VkSurfaceKHR,
|
||||||
) -> VkResult,
|
) -> VkResult,
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetPhysicalDeviceDisplayPropertiesKHR(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
pPropertyCount: *mut u32,
|
|
||||||
pProperties: *mut VkDisplayPropertiesKHR,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
pPropertyCount: *mut u32,
|
|
||||||
pProperties: *mut VkDisplayPlanePropertiesKHR,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetDisplayPlaneSupportedDisplaysKHR(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
planeIndex: u32,
|
|
||||||
pDisplayCount: *mut u32,
|
|
||||||
pDisplays: *mut VkDisplayKHR,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetDisplayModePropertiesKHR(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
display: VkDisplayKHR,
|
|
||||||
pPropertyCount: *mut u32,
|
|
||||||
pProperties: *mut VkDisplayModePropertiesKHR,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkCreateDisplayModeKHR(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
display: VkDisplayKHR,
|
|
||||||
pCreateInfo: *const VkDisplayModeCreateInfoKHR,
|
|
||||||
pAllocator: *const VkAllocationCallbacks,
|
|
||||||
pMode: *mut VkDisplayModeKHR,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetDisplayPlaneCapabilitiesKHR(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
mode: VkDisplayModeKHR,
|
|
||||||
planeIndex: u32,
|
|
||||||
pCapabilities: *mut VkDisplayPlaneCapabilitiesKHR,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkCreateDisplayPlaneSurfaceKHR(
|
|
||||||
instance: VkInstance,
|
|
||||||
pCreateInfo: *const VkDisplaySurfaceCreateInfoKHR,
|
|
||||||
pAllocator: *const VkAllocationCallbacks,
|
|
||||||
pSurface: *mut VkSurfaceKHR,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy)]
|
#[derive(Debug, Copy)]
|
||||||
pub struct VkDisplayPresentInfoKHR {
|
pub struct VkDisplayPresentInfoKHR {
|
||||||
|
@ -5226,15 +5158,6 @@ pub type PFN_vkCreateSharedSwapchainsKHR = ::std::option::Option<
|
||||||
pSwapchains: *mut VkSwapchainKHR,
|
pSwapchains: *mut VkSwapchainKHR,
|
||||||
) -> VkResult,
|
) -> VkResult,
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkCreateSharedSwapchainsKHR(
|
|
||||||
device: VkDevice,
|
|
||||||
swapchainCount: u32,
|
|
||||||
pCreateInfos: *const VkSwapchainCreateInfoKHR,
|
|
||||||
pAllocator: *const VkAllocationCallbacks,
|
|
||||||
pSwapchains: *mut VkSwapchainKHR,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
pub type VkWin32SurfaceCreateFlagsKHR = VkFlags;
|
pub type VkWin32SurfaceCreateFlagsKHR = VkFlags;
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy)]
|
#[derive(Debug, Copy)]
|
||||||
|
@ -5442,53 +5365,6 @@ pub type PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR = ::std::option:
|
||||||
pProperties: *mut VkSparseImageFormatProperties2KHR,
|
pProperties: *mut VkSparseImageFormatProperties2KHR,
|
||||||
),
|
),
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetPhysicalDeviceFeatures2KHR(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
pFeatures: *mut VkPhysicalDeviceFeatures2KHR,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetPhysicalDeviceProperties2KHR(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
pProperties: *mut VkPhysicalDeviceProperties2KHR,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetPhysicalDeviceFormatProperties2KHR(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
format: VkFormat,
|
|
||||||
pFormatProperties: *mut VkFormatProperties2KHR,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetPhysicalDeviceImageFormatProperties2KHR(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
pImageFormatInfo: *const VkPhysicalDeviceImageFormatInfo2KHR,
|
|
||||||
pImageFormatProperties: *mut VkImageFormatProperties2KHR,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetPhysicalDeviceQueueFamilyProperties2KHR(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
pQueueFamilyPropertyCount: *mut u32,
|
|
||||||
pQueueFamilyProperties: *mut VkQueueFamilyProperties2KHR,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetPhysicalDeviceMemoryProperties2KHR(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
pMemoryProperties: *mut VkPhysicalDeviceMemoryProperties2KHR,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetPhysicalDeviceSparseImageFormatProperties2KHR(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
pFormatInfo: *const VkPhysicalDeviceSparseImageFormatInfo2KHR,
|
|
||||||
pPropertyCount: *mut u32,
|
|
||||||
pProperties: *mut VkSparseImageFormatProperties2KHR,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
pub type VkCommandPoolTrimFlagsKHR = VkFlags;
|
pub type VkCommandPoolTrimFlagsKHR = VkFlags;
|
||||||
pub type PFN_vkTrimCommandPoolKHR = ::std::option::Option<
|
pub type PFN_vkTrimCommandPoolKHR = ::std::option::Option<
|
||||||
unsafe extern "C" fn(
|
unsafe extern "C" fn(
|
||||||
|
@ -5497,13 +5373,6 @@ pub type PFN_vkTrimCommandPoolKHR = ::std::option::Option<
|
||||||
flags: VkCommandPoolTrimFlagsKHR,
|
flags: VkCommandPoolTrimFlagsKHR,
|
||||||
),
|
),
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkTrimCommandPoolKHR(
|
|
||||||
device: VkDevice,
|
|
||||||
commandPool: VkCommandPool,
|
|
||||||
flags: VkCommandPoolTrimFlagsKHR,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy)]
|
#[derive(Debug, Copy)]
|
||||||
pub struct VkPhysicalDevicePushDescriptorPropertiesKHR {
|
pub struct VkPhysicalDevicePushDescriptorPropertiesKHR {
|
||||||
|
@ -5526,16 +5395,6 @@ pub type PFN_vkCmdPushDescriptorSetKHR = ::std::option::Option<
|
||||||
pDescriptorWrites: *const VkWriteDescriptorSet,
|
pDescriptorWrites: *const VkWriteDescriptorSet,
|
||||||
),
|
),
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkCmdPushDescriptorSetKHR(
|
|
||||||
commandBuffer: VkCommandBuffer,
|
|
||||||
pipelineBindPoint: VkPipelineBindPoint,
|
|
||||||
layout: VkPipelineLayout,
|
|
||||||
set: u32,
|
|
||||||
descriptorWriteCount: u32,
|
|
||||||
pDescriptorWrites: *const VkWriteDescriptorSet,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
pub struct VkDescriptorUpdateTemplateKHR_T {
|
pub struct VkDescriptorUpdateTemplateKHR_T {
|
||||||
|
@ -5623,38 +5482,6 @@ pub type PFN_vkCmdPushDescriptorSetWithTemplateKHR = ::std::option::Option<
|
||||||
pData: *const ::std::os::raw::c_void,
|
pData: *const ::std::os::raw::c_void,
|
||||||
),
|
),
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkCreateDescriptorUpdateTemplateKHR(
|
|
||||||
device: VkDevice,
|
|
||||||
pCreateInfo: *const VkDescriptorUpdateTemplateCreateInfoKHR,
|
|
||||||
pAllocator: *const VkAllocationCallbacks,
|
|
||||||
pDescriptorUpdateTemplate: *mut VkDescriptorUpdateTemplateKHR,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkDestroyDescriptorUpdateTemplateKHR(
|
|
||||||
device: VkDevice,
|
|
||||||
descriptorUpdateTemplate: VkDescriptorUpdateTemplateKHR,
|
|
||||||
pAllocator: *const VkAllocationCallbacks,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkUpdateDescriptorSetWithTemplateKHR(
|
|
||||||
device: VkDevice,
|
|
||||||
descriptorSet: VkDescriptorSet,
|
|
||||||
descriptorUpdateTemplate: VkDescriptorUpdateTemplateKHR,
|
|
||||||
pData: *const ::std::os::raw::c_void,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkCmdPushDescriptorSetWithTemplateKHR(
|
|
||||||
commandBuffer: VkCommandBuffer,
|
|
||||||
descriptorUpdateTemplate: VkDescriptorUpdateTemplateKHR,
|
|
||||||
layout: VkPipelineLayout,
|
|
||||||
set: u32,
|
|
||||||
pData: *const ::std::os::raw::c_void,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
pub struct VkDebugReportCallbackEXT_T {
|
pub struct VkDebugReportCallbackEXT_T {
|
||||||
|
@ -5782,33 +5609,6 @@ pub type PFN_vkDebugReportMessageEXT = ::std::option::Option<
|
||||||
pMessage: *const ::std::os::raw::c_char,
|
pMessage: *const ::std::os::raw::c_char,
|
||||||
),
|
),
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkCreateDebugReportCallbackEXT(
|
|
||||||
instance: VkInstance,
|
|
||||||
pCreateInfo: *const VkDebugReportCallbackCreateInfoEXT,
|
|
||||||
pAllocator: *const VkAllocationCallbacks,
|
|
||||||
pCallback: *mut VkDebugReportCallbackEXT,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkDestroyDebugReportCallbackEXT(
|
|
||||||
instance: VkInstance,
|
|
||||||
callback: VkDebugReportCallbackEXT,
|
|
||||||
pAllocator: *const VkAllocationCallbacks,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkDebugReportMessageEXT(
|
|
||||||
instance: VkInstance,
|
|
||||||
flags: VkDebugReportFlagsEXT,
|
|
||||||
objectType: VkDebugReportObjectTypeEXT,
|
|
||||||
object: u64,
|
|
||||||
location: usize,
|
|
||||||
messageCode: i32,
|
|
||||||
pLayerPrefix: *const ::std::os::raw::c_char,
|
|
||||||
pMessage: *const ::std::os::raw::c_char,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
pub const VkRasterizationOrderAMD_VK_RASTERIZATION_ORDER_BEGIN_RANGE_AMD: VkRasterizationOrderAMD =
|
pub const VkRasterizationOrderAMD_VK_RASTERIZATION_ORDER_BEGIN_RANGE_AMD: VkRasterizationOrderAMD =
|
||||||
VkRasterizationOrderAMD::VK_RASTERIZATION_ORDER_STRICT_AMD;
|
VkRasterizationOrderAMD::VK_RASTERIZATION_ORDER_STRICT_AMD;
|
||||||
pub const VkRasterizationOrderAMD_VK_RASTERIZATION_ORDER_END_RANGE_AMD: VkRasterizationOrderAMD =
|
pub const VkRasterizationOrderAMD_VK_RASTERIZATION_ORDER_END_RANGE_AMD: VkRasterizationOrderAMD =
|
||||||
|
@ -5902,33 +5702,7 @@ pub type PFN_vkCmdDebugMarkerInsertEXT = ::std::option::Option<
|
||||||
pMarkerInfo: *mut VkDebugMarkerMarkerInfoEXT,
|
pMarkerInfo: *mut VkDebugMarkerMarkerInfoEXT,
|
||||||
),
|
),
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkDebugMarkerSetObjectTagEXT(
|
|
||||||
device: VkDevice,
|
|
||||||
pTagInfo: *mut VkDebugMarkerObjectTagInfoEXT,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkDebugMarkerSetObjectNameEXT(
|
|
||||||
device: VkDevice,
|
|
||||||
pNameInfo: *mut VkDebugMarkerObjectNameInfoEXT,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkCmdDebugMarkerBeginEXT(
|
|
||||||
commandBuffer: VkCommandBuffer,
|
|
||||||
pMarkerInfo: *mut VkDebugMarkerMarkerInfoEXT,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkCmdDebugMarkerEndEXT(commandBuffer: VkCommandBuffer);
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkCmdDebugMarkerInsertEXT(
|
|
||||||
commandBuffer: VkCommandBuffer,
|
|
||||||
pMarkerInfo: *mut VkDebugMarkerMarkerInfoEXT,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy)]
|
#[derive(Debug, Copy)]
|
||||||
pub struct VkDedicatedAllocationImageCreateInfoNV {
|
pub struct VkDedicatedAllocationImageCreateInfoNV {
|
||||||
|
@ -5988,28 +5762,7 @@ pub type PFN_vkCmdDrawIndexedIndirectCountAMD = ::std::option::Option<
|
||||||
stride: u32,
|
stride: u32,
|
||||||
),
|
),
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkCmdDrawIndirectCountAMD(
|
|
||||||
commandBuffer: VkCommandBuffer,
|
|
||||||
buffer: VkBuffer,
|
|
||||||
offset: VkDeviceSize,
|
|
||||||
countBuffer: VkBuffer,
|
|
||||||
countBufferOffset: VkDeviceSize,
|
|
||||||
maxDrawCount: u32,
|
|
||||||
stride: u32,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkCmdDrawIndexedIndirectCountAMD(
|
|
||||||
commandBuffer: VkCommandBuffer,
|
|
||||||
buffer: VkBuffer,
|
|
||||||
offset: VkDeviceSize,
|
|
||||||
countBuffer: VkBuffer,
|
|
||||||
countBufferOffset: VkDeviceSize,
|
|
||||||
maxDrawCount: u32,
|
|
||||||
stride: u32,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy)]
|
#[derive(Debug, Copy)]
|
||||||
pub struct VkRenderPassMultiviewCreateInfoKHX {
|
pub struct VkRenderPassMultiviewCreateInfoKHX {
|
||||||
|
@ -6098,18 +5851,6 @@ pub type PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV = ::std::option:
|
||||||
pExternalImageFormatProperties: *mut VkExternalImageFormatPropertiesNV,
|
pExternalImageFormatProperties: *mut VkExternalImageFormatPropertiesNV,
|
||||||
) -> VkResult,
|
) -> VkResult,
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
format: VkFormat,
|
|
||||||
type_: VkImageType,
|
|
||||||
tiling: VkImageTiling,
|
|
||||||
usage: VkImageUsageFlags,
|
|
||||||
flags: VkImageCreateFlags,
|
|
||||||
externalHandleType: VkExternalMemoryHandleTypeFlagsNV,
|
|
||||||
pExternalImageFormatProperties: *mut VkExternalImageFormatPropertiesNV,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy)]
|
#[derive(Debug, Copy)]
|
||||||
pub struct VkExternalMemoryImageCreateInfoNV {
|
pub struct VkExternalMemoryImageCreateInfoNV {
|
||||||
|
@ -6408,71 +6149,7 @@ pub type PFN_vkGetPhysicalDevicePresentRectanglesKHX = ::std::option::Option<
|
||||||
pRects: *mut VkRect2D,
|
pRects: *mut VkRect2D,
|
||||||
) -> VkResult,
|
) -> VkResult,
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetDeviceGroupPeerMemoryFeaturesKHX(
|
|
||||||
device: VkDevice,
|
|
||||||
heapIndex: u32,
|
|
||||||
localDeviceIndex: u32,
|
|
||||||
remoteDeviceIndex: u32,
|
|
||||||
pPeerMemoryFeatures: *mut VkPeerMemoryFeatureFlagsKHX,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkBindBufferMemory2KHX(
|
|
||||||
device: VkDevice,
|
|
||||||
bindInfoCount: u32,
|
|
||||||
pBindInfos: *const VkBindBufferMemoryInfoKHX,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkBindImageMemory2KHX(
|
|
||||||
device: VkDevice,
|
|
||||||
bindInfoCount: u32,
|
|
||||||
pBindInfos: *const VkBindImageMemoryInfoKHX,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkCmdSetDeviceMaskKHX(commandBuffer: VkCommandBuffer, deviceMask: u32);
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetDeviceGroupPresentCapabilitiesKHX(
|
|
||||||
device: VkDevice,
|
|
||||||
pDeviceGroupPresentCapabilities: *mut VkDeviceGroupPresentCapabilitiesKHX,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetDeviceGroupSurfacePresentModesKHX(
|
|
||||||
device: VkDevice,
|
|
||||||
surface: VkSurfaceKHR,
|
|
||||||
pModes: *mut VkDeviceGroupPresentModeFlagsKHX,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkAcquireNextImage2KHX(
|
|
||||||
device: VkDevice,
|
|
||||||
pAcquireInfo: *const VkAcquireNextImageInfoKHX,
|
|
||||||
pImageIndex: *mut u32,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkCmdDispatchBaseKHX(
|
|
||||||
commandBuffer: VkCommandBuffer,
|
|
||||||
baseGroupX: u32,
|
|
||||||
baseGroupY: u32,
|
|
||||||
baseGroupZ: u32,
|
|
||||||
groupCountX: u32,
|
|
||||||
groupCountY: u32,
|
|
||||||
groupCountZ: u32,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetPhysicalDevicePresentRectanglesKHX(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
surface: VkSurfaceKHR,
|
|
||||||
pRectCount: *mut u32,
|
|
||||||
pRects: *mut VkRect2D,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
pub const VkValidationCheckEXT_VK_VALIDATION_CHECK_BEGIN_RANGE_EXT: VkValidationCheckEXT =
|
pub const VkValidationCheckEXT_VK_VALIDATION_CHECK_BEGIN_RANGE_EXT: VkValidationCheckEXT =
|
||||||
VkValidationCheckEXT::VK_VALIDATION_CHECK_ALL_EXT;
|
VkValidationCheckEXT::VK_VALIDATION_CHECK_ALL_EXT;
|
||||||
pub const VkValidationCheckEXT_VK_VALIDATION_CHECK_END_RANGE_EXT: VkValidationCheckEXT =
|
pub const VkValidationCheckEXT_VK_VALIDATION_CHECK_END_RANGE_EXT: VkValidationCheckEXT =
|
||||||
|
@ -6531,13 +6208,6 @@ pub type PFN_vkEnumeratePhysicalDeviceGroupsKHX = ::std::option::Option<
|
||||||
pPhysicalDeviceGroupProperties: *mut VkPhysicalDeviceGroupPropertiesKHX,
|
pPhysicalDeviceGroupProperties: *mut VkPhysicalDeviceGroupPropertiesKHX,
|
||||||
) -> VkResult,
|
) -> VkResult,
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkEnumeratePhysicalDeviceGroupsKHX(
|
|
||||||
instance: VkInstance,
|
|
||||||
pPhysicalDeviceGroupCount: *mut u32,
|
|
||||||
pPhysicalDeviceGroupProperties: *mut VkPhysicalDeviceGroupPropertiesKHX,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
#[repr(u32)]
|
#[repr(u32)]
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||||
pub enum VkExternalMemoryHandleTypeFlagBitsKHX {
|
pub enum VkExternalMemoryHandleTypeFlagBitsKHX {
|
||||||
|
@ -6697,26 +6367,7 @@ pub type PFN_vkGetPhysicalDeviceImageFormatProperties2KHX = ::std::option::Optio
|
||||||
pImageFormatProperties: *mut VkImageFormatProperties2KHX,
|
pImageFormatProperties: *mut VkImageFormatProperties2KHX,
|
||||||
) -> VkResult,
|
) -> VkResult,
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetPhysicalDeviceExternalBufferPropertiesKHX(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
pExternalBufferInfo: *const VkPhysicalDeviceExternalBufferInfoKHX,
|
|
||||||
pExternalBufferProperties: *mut VkExternalBufferPropertiesKHX,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetPhysicalDeviceProperties2KHX(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
pProperties: *mut VkPhysicalDeviceProperties2KHX,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetPhysicalDeviceImageFormatProperties2KHX(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
pImageFormatInfo: *const VkPhysicalDeviceImageFormatInfo2KHX,
|
|
||||||
pImageFormatProperties: *mut VkImageFormatProperties2KHX,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy)]
|
#[derive(Debug, Copy)]
|
||||||
pub struct VkExternalMemoryImageCreateInfoKHX {
|
pub struct VkExternalMemoryImageCreateInfoKHX {
|
||||||
|
@ -6794,22 +6445,7 @@ pub type PFN_vkGetMemoryFdPropertiesKHX = ::std::option::Option<
|
||||||
pMemoryFdProperties: *mut VkMemoryFdPropertiesKHX,
|
pMemoryFdProperties: *mut VkMemoryFdPropertiesKHX,
|
||||||
) -> VkResult,
|
) -> VkResult,
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetMemoryFdKHX(
|
|
||||||
device: VkDevice,
|
|
||||||
memory: VkDeviceMemory,
|
|
||||||
handleType: VkExternalMemoryHandleTypeFlagBitsKHX,
|
|
||||||
pFd: *mut ::std::os::raw::c_int,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetMemoryFdPropertiesKHX(
|
|
||||||
device: VkDevice,
|
|
||||||
handleType: VkExternalMemoryHandleTypeFlagBitsKHX,
|
|
||||||
fd: ::std::os::raw::c_int,
|
|
||||||
pMemoryFdProperties: *mut VkMemoryFdPropertiesKHX,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
#[repr(u32)]
|
#[repr(u32)]
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||||
pub enum VkExternalSemaphoreHandleTypeFlagBitsKHX {
|
pub enum VkExternalSemaphoreHandleTypeFlagBitsKHX {
|
||||||
|
@ -6862,13 +6498,6 @@ pub type PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHX = ::std::option::
|
||||||
pExternalSemaphoreProperties: *mut VkExternalSemaphorePropertiesKHX,
|
pExternalSemaphoreProperties: *mut VkExternalSemaphorePropertiesKHX,
|
||||||
),
|
),
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetPhysicalDeviceExternalSemaphorePropertiesKHX(
|
|
||||||
physicalDevice: VkPhysicalDevice,
|
|
||||||
pExternalSemaphoreInfo: *const VkPhysicalDeviceExternalSemaphoreInfoKHX,
|
|
||||||
pExternalSemaphoreProperties: *mut VkExternalSemaphorePropertiesKHX,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy)]
|
#[derive(Debug, Copy)]
|
||||||
pub struct VkExportSemaphoreCreateInfoKHX {
|
pub struct VkExportSemaphoreCreateInfoKHX {
|
||||||
|
@ -6909,20 +6538,7 @@ pub type PFN_vkGetSemaphoreFdKHX = ::std::option::Option<
|
||||||
pFd: *mut ::std::os::raw::c_int,
|
pFd: *mut ::std::os::raw::c_int,
|
||||||
) -> VkResult,
|
) -> VkResult,
|
||||||
>;
|
>;
|
||||||
extern "C" {
|
|
||||||
pub fn vkImportSemaphoreFdKHX(
|
|
||||||
device: VkDevice,
|
|
||||||
pImportSemaphoreFdInfo: *const VkImportSemaphoreFdInfoKHX,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
extern "C" {
|
|
||||||
pub fn vkGetSemaphoreFdKHX(
|
|
||||||
device: VkDevice,
|
|
||||||
semaphore: VkSemaphore,
|
|
||||||
handleType: VkExternalSemaphoreHandleTypeFlagBitsKHX,
|
|
||||||
pFd: *mut ::std::os::raw::c_int,
|
|
||||||
) -> VkResult;
|
|
||||||
}
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
pub struct VkObjectTableNVX_T {
|
pub struct VkObjectTableNVX_T {
|
||||||
|
|
|
@ -1600,3 +1600,36 @@ pub unsafe extern "C" fn vkGetPhysicalDeviceMetalFeaturesMVK(
|
||||||
_metal_features: *mut ::std::os::raw::c_void,
|
_metal_features: *mut ::std::os::raw::c_void,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[no_mangle]
|
||||||
|
pub unsafe extern "C" fn vkDebugMarkerSetObjectTagEXT(
|
||||||
|
gpu: VkDevice,
|
||||||
|
pTagInfo: *mut VkDebugMarkerObjectTagInfoEXT,
|
||||||
|
) -> VkResult {
|
||||||
|
gfxDebugMarkerSetObjectTagEXT(gpu, pTagInfo)
|
||||||
|
}
|
||||||
|
#[no_mangle]
|
||||||
|
pub unsafe extern "C" fn vkDebugMarkerSetObjectNameEXT(
|
||||||
|
gpu: VkDevice,
|
||||||
|
pNameInfo: *mut VkDebugMarkerObjectNameInfoEXT,
|
||||||
|
) -> VkResult {
|
||||||
|
gfxDebugMarkerSetObjectNameEXT(gpu, pNameInfo)
|
||||||
|
}
|
||||||
|
#[no_mangle]
|
||||||
|
pub unsafe extern "C" fn vkCmdDebugMarkerBeginEXT(
|
||||||
|
commandBuffer: VkCommandBuffer,
|
||||||
|
pMarkerInfo: *mut VkDebugMarkerMarkerInfoEXT,
|
||||||
|
) {
|
||||||
|
gfxCmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo)
|
||||||
|
}
|
||||||
|
#[no_mangle]
|
||||||
|
pub unsafe extern "C" fn vkCmdDebugMarkerEndEXT(commandBuffer: VkCommandBuffer) {
|
||||||
|
gfxCmdDebugMarkerEndEXT(commandBuffer)
|
||||||
|
}
|
||||||
|
#[no_mangle]
|
||||||
|
pub unsafe extern "C" fn vkCmdDebugMarkerInsertEXT(
|
||||||
|
commandBuffer: VkCommandBuffer,
|
||||||
|
pMarkerInfo: *mut VkDebugMarkerMarkerInfoEXT,
|
||||||
|
) {
|
||||||
|
gfxCmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue