extensions/khr: Remove empty "safe wrapper" for RayQuery (#364)

The `VK_KHR_ray_query` extension has no functions and this safe wrapper
(specifically to re-wrap functions) was added by accident (by me).
To prevent confusion, remove it before a new crate version is released.
Applications can easily access the name (which is the only useful thing
reexported here) from `ash::vk::extensions:KhrRayQueryFn::name()`.
This commit is contained in:
Marijn Suijten 2021-01-27 17:31:04 +01:00 committed by GitHub
parent 0a378b8807
commit abc1f80d65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 37 deletions

View file

@ -7,7 +7,6 @@ pub use self::draw_indirect_count::DrawIndirectCount;
pub use self::external_memory_fd::ExternalMemoryFd; pub use self::external_memory_fd::ExternalMemoryFd;
pub use self::pipeline_executable_properties::PipelineExecutableProperties; pub use self::pipeline_executable_properties::PipelineExecutableProperties;
pub use self::push_descriptor::PushDescriptor; pub use self::push_descriptor::PushDescriptor;
pub use self::ray_query::RayQuery;
pub use self::ray_tracing_pipeline::RayTracingPipeline; pub use self::ray_tracing_pipeline::RayTracingPipeline;
pub use self::surface::Surface; pub use self::surface::Surface;
pub use self::swapchain::Swapchain; pub use self::swapchain::Swapchain;
@ -26,7 +25,6 @@ mod draw_indirect_count;
mod external_memory_fd; mod external_memory_fd;
mod pipeline_executable_properties; mod pipeline_executable_properties;
mod push_descriptor; mod push_descriptor;
mod ray_query;
mod ray_tracing_pipeline; mod ray_tracing_pipeline;
mod surface; mod surface;
mod swapchain; mod swapchain;

View file

@ -1,35 +0,0 @@
#![allow(dead_code)]
use crate::version::{DeviceV1_0, InstanceV1_0};
use crate::vk;
use std::ffi::CStr;
use std::mem;
#[derive(Clone)]
pub struct RayQuery {
handle: vk::Device,
ray_query_fn: vk::KhrRayQueryFn,
}
impl RayQuery {
pub fn new<I: InstanceV1_0, D: DeviceV1_0>(instance: &I, device: &D) -> Self {
let ray_query_fn = vk::KhrRayQueryFn::load(|name| unsafe {
mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr()))
});
Self {
handle: device.handle(),
ray_query_fn,
}
}
pub fn name() -> &'static CStr {
vk::KhrRayQueryFn::name()
}
pub fn fp(&self) -> &vk::KhrRayQueryFn {
&self.ray_query_fn
}
pub fn device(&self) -> vk::Device {
self.handle
}
}