mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-25 08:14:20 +00:00
replaced docs of "raw" functions
This commit is contained in:
parent
cebabe1f63
commit
b8269ead29
@ -61,7 +61,7 @@ pub struct PrimaryCommandBufferBuilder {
|
||||
}
|
||||
|
||||
impl PrimaryCommandBufferBuilder {
|
||||
/// Builds a new primary command buffer and start recording commands in it.
|
||||
/// See the docs of new().
|
||||
#[inline]
|
||||
pub fn raw(pool: &Arc<CommandBufferPool>)
|
||||
-> Result<PrimaryCommandBufferBuilder, OomError>
|
||||
@ -279,7 +279,7 @@ impl PrimaryCommandBufferBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
/// Finish recording commands and build the command buffer.
|
||||
/// See the docs of build().
|
||||
#[inline]
|
||||
pub fn build_raw(self) -> Result<PrimaryCommandBuffer, OomError> {
|
||||
let inner = try!(self.inner.build());
|
||||
@ -535,9 +535,7 @@ pub struct SecondaryGraphicsCommandBufferBuilder<R> {
|
||||
impl<R> SecondaryGraphicsCommandBufferBuilder<R>
|
||||
where R: RenderPass + RenderPassDesc + 'static
|
||||
{
|
||||
/// Builds a new secondary command buffer and start recording commands in it.
|
||||
///
|
||||
/// The `framebuffer` parameter is optional and can be used as an optimisation.
|
||||
/// See the docs of new().
|
||||
#[inline]
|
||||
pub fn raw(pool: &Arc<CommandBufferPool>, subpass: Subpass<R>,
|
||||
framebuffer: Option<&Arc<Framebuffer<R>>>)
|
||||
@ -635,7 +633,7 @@ impl<R> SecondaryGraphicsCommandBufferBuilder<R>
|
||||
}
|
||||
}
|
||||
|
||||
/// Finish recording commands and build the command buffer.
|
||||
/// See the docs of build().
|
||||
#[inline]
|
||||
pub fn build_raw(self) -> Result<SecondaryGraphicsCommandBuffer<R>, OomError> {
|
||||
let inner = try!(self.inner.build());
|
||||
@ -678,7 +676,7 @@ pub struct SecondaryComputeCommandBufferBuilder {
|
||||
}
|
||||
|
||||
impl SecondaryComputeCommandBufferBuilder {
|
||||
/// Builds a new secondary command buffer and start recording commands in it.
|
||||
/// See the docs of new().
|
||||
#[inline]
|
||||
pub fn raw(pool: &Arc<CommandBufferPool>)
|
||||
-> Result<SecondaryComputeCommandBufferBuilder, OomError>
|
||||
@ -749,7 +747,7 @@ impl SecondaryComputeCommandBufferBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
/// Finish recording commands and build the command buffer.
|
||||
/// See the docs of build().
|
||||
#[inline]
|
||||
pub fn build_raw(self) -> Result<SecondaryComputeCommandBuffer, OomError> {
|
||||
let inner = try!(self.inner.build());
|
||||
|
@ -31,15 +31,7 @@ pub struct CommandBufferPool {
|
||||
}
|
||||
|
||||
impl CommandBufferPool {
|
||||
/// Creates a new pool.
|
||||
///
|
||||
/// The command buffers created with this pool can only be executed on queues of the given
|
||||
/// family.
|
||||
///
|
||||
/// # Panic
|
||||
///
|
||||
/// Panicks if the queue family doesn't belong to the same physical device as `device`.
|
||||
///
|
||||
/// See the docs of new().
|
||||
#[inline]
|
||||
pub fn raw(device: &Arc<Device>, queue_family: &QueueFamily)
|
||||
-> Result<CommandBufferPool, OomError>
|
||||
|
@ -32,7 +32,7 @@ pub struct DescriptorPool {
|
||||
}
|
||||
|
||||
impl DescriptorPool {
|
||||
/// Initializes a new pool.
|
||||
/// See the docs of new().
|
||||
// FIXME: capacity of the pool
|
||||
pub fn raw(device: &Arc<Device>) -> Result<DescriptorPool, OomError> {
|
||||
let vk = device.pointers();
|
||||
|
@ -46,12 +46,7 @@ pub struct UnsafeDescriptorSet {
|
||||
}
|
||||
|
||||
impl UnsafeDescriptorSet {
|
||||
/// Builds a new descriptor set.
|
||||
///
|
||||
/// # Panic
|
||||
///
|
||||
/// - Panicks if the pool and the layout were not created from the same `Device`.
|
||||
///
|
||||
/// See the docs of uninitialized().
|
||||
// FIXME: this has to check whether there's still enough room in the pool
|
||||
pub unsafe fn uninitialized_raw(pool: &Arc<DescriptorPool>,
|
||||
layout: &Arc<UnsafeDescriptorSetLayout>)
|
||||
|
@ -31,7 +31,7 @@ pub struct UnsafeDescriptorSetLayout {
|
||||
}
|
||||
|
||||
impl UnsafeDescriptorSetLayout {
|
||||
/// Builds a new `UnsafeDescriptorSetLayout` with the given descriptors.
|
||||
/// See the docs of new().
|
||||
pub fn raw<I>(device: &Arc<Device>, descriptors: I)
|
||||
-> Result<UnsafeDescriptorSetLayout, OomError>
|
||||
where I: IntoIterator<Item = DescriptorDesc>
|
||||
|
@ -213,10 +213,7 @@ impl Device {
|
||||
Ok((device, output_queues))
|
||||
}
|
||||
|
||||
/// Waits until all work on this device has finished. You should never need to call
|
||||
/// this function, but it can be useful for debugging or benchmarking purposes.
|
||||
///
|
||||
/// This is the Vulkan equivalent of `glFinish`.
|
||||
/// See the docs of wait().
|
||||
// FIXME: must synchronize all queuees
|
||||
#[inline]
|
||||
pub fn wait_raw(&self) -> Result<(), OomError> {
|
||||
@ -384,9 +381,7 @@ impl Queue {
|
||||
self.id
|
||||
}
|
||||
|
||||
/// Waits until all work on this queue has finished.
|
||||
///
|
||||
/// Just like `Device::wait()`, you shouldn't have to call this function.
|
||||
/// See the docs of wait().
|
||||
#[inline]
|
||||
pub fn wait_raw(&self) -> Result<(), OomError> {
|
||||
unsafe {
|
||||
|
@ -38,7 +38,7 @@ pub struct EmptySinglePassRenderPass {
|
||||
}
|
||||
|
||||
impl EmptySinglePassRenderPass {
|
||||
/// Builds the render pass.
|
||||
/// See the docs of new().
|
||||
pub fn raw(device: &Arc<Device>) -> Result<EmptySinglePassRenderPass, OomError> {
|
||||
let rp = try!(unsafe {
|
||||
let pass = LayoutPassDescription {
|
||||
|
@ -34,24 +34,7 @@ pub struct UnsafeRenderPass {
|
||||
}
|
||||
|
||||
impl UnsafeRenderPass {
|
||||
/// Builds a new renderpass.
|
||||
///
|
||||
/// This function calls the methods of the `Layout` implementation and builds the
|
||||
/// corresponding Vulkan object.
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// This function doesn't check whether all the restrictions in the attachments, passes and
|
||||
/// passes dependencies were enforced.
|
||||
///
|
||||
/// See the documentation of the structs of this module for more info about these restrictions.
|
||||
///
|
||||
/// # Panic
|
||||
///
|
||||
/// Can panick if it detects some violations in the restrictions. Only unexpensive checks are
|
||||
/// performed. `debug_assert!` is used, so some restrictions are only checked in debug
|
||||
/// mode.
|
||||
///
|
||||
/// See the docs of new().
|
||||
pub unsafe fn raw<Ia, Ip, Id>(device: &Arc<Device>, attachments: Ia, passes: Ip,
|
||||
pass_dependencies: Id)
|
||||
-> Result<UnsafeRenderPass, OomError>
|
||||
|
@ -619,10 +619,7 @@ pub struct UnsafeImageView {
|
||||
}
|
||||
|
||||
impl UnsafeImageView {
|
||||
/// Creates a new view from an image.
|
||||
///
|
||||
/// Note that you must create the view with identity swizzling if you want to use this view
|
||||
/// as a framebuffer attachment.
|
||||
/// See the docs of new().
|
||||
pub unsafe fn raw(image: &UnsafeImage, mipmap_levels: Range<u32>, array_layers: Range<u32>)
|
||||
-> Result<UnsafeImageView, OomError>
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ pub struct OcclusionQueriesPool {
|
||||
}
|
||||
|
||||
impl OcclusionQueriesPool {
|
||||
/// Builds a new query pool.
|
||||
/// See the docs of new().
|
||||
pub fn raw(device: &Arc<Device>, num_slots: u32)
|
||||
-> Result<OcclusionQueriesPool, OomError>
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ pub struct DisplayPlane {
|
||||
}
|
||||
|
||||
impl DisplayPlane {
|
||||
/// Enumerates all the display planes that are available on a given physical device.
|
||||
/// See the docs of enumerate().
|
||||
pub fn enumerate_raw(device: &PhysicalDevice) -> Result<IntoIter<DisplayPlane>, OomError> {
|
||||
let vk = device.instance().pointers();
|
||||
|
||||
@ -129,7 +129,7 @@ pub struct Display {
|
||||
}
|
||||
|
||||
impl Display {
|
||||
/// Enumerates all the displays that are available on a given physical device.
|
||||
/// See the docs of enumerate().
|
||||
pub fn enumerate_raw(device: &PhysicalDevice) -> Result<IntoIter<Display>, OomError> {
|
||||
let vk = device.instance().pointers();
|
||||
assert!(device.instance().loaded_extensions().khr_display); // TODO: return error instead
|
||||
@ -194,7 +194,7 @@ impl Display {
|
||||
[r.width, r.height]
|
||||
}
|
||||
|
||||
/// Returns a list of all modes available on this display.
|
||||
/// See the docs of display_modes().
|
||||
pub fn display_modes_raw(&self) -> Result<IntoIter<DisplayMode>, OomError> {
|
||||
let vk = self.instance.pointers();
|
||||
|
||||
|
@ -35,7 +35,7 @@ pub struct Event {
|
||||
}
|
||||
|
||||
impl Event {
|
||||
/// Builds a new event.
|
||||
/// See the docs of new().
|
||||
#[inline]
|
||||
pub fn raw(device: &Arc<Device>) -> Result<Event, OomError> {
|
||||
let vk = device.pointers();
|
||||
@ -87,9 +87,7 @@ impl Event {
|
||||
}
|
||||
}
|
||||
|
||||
/// Changes the `Event` to the signaled state.
|
||||
///
|
||||
/// If a command buffer is waiting on this event, it is then unblocked.
|
||||
/// See the docs of set().
|
||||
#[inline]
|
||||
pub fn set_raw(&self) -> Result<(), OomError> {
|
||||
unsafe {
|
||||
@ -113,7 +111,7 @@ impl Event {
|
||||
self.set_raw().unwrap();
|
||||
}
|
||||
|
||||
/// Changes the `Event` to the unsignaled state.
|
||||
/// See the docs of reset().
|
||||
#[inline]
|
||||
pub fn reset_raw(&self) -> Result<(), OomError> {
|
||||
unsafe {
|
||||
|
@ -46,7 +46,7 @@ pub struct Fence<D = Arc<Device>> where D: Deref<Target = Device> {
|
||||
}
|
||||
|
||||
impl<D> Fence<D> where D: Deref<Target = Device> {
|
||||
/// Builds a new fence.
|
||||
/// See the docs of new().
|
||||
#[inline]
|
||||
pub fn raw(device: &D) -> Result<Fence<D>, OomError>
|
||||
where D: Clone
|
||||
@ -67,7 +67,7 @@ impl<D> Fence<D> where D: Deref<Target = Device> {
|
||||
Arc::new(Fence::raw(device).unwrap())
|
||||
}
|
||||
|
||||
/// Builds a new fence already in the "signaled" state.
|
||||
/// See the docs of signaled().
|
||||
#[inline]
|
||||
pub fn signaled_raw(device: &D) -> Result<Fence<D>, OomError>
|
||||
where D: Clone
|
||||
|
@ -29,7 +29,7 @@ pub struct Semaphore {
|
||||
}
|
||||
|
||||
impl Semaphore {
|
||||
/// Builds a new semaphore.
|
||||
/// See the docs of new().
|
||||
#[inline]
|
||||
pub fn raw(device: &Arc<Device>) -> Result<Semaphore, OomError> {
|
||||
let vk = device.pointers();
|
||||
|
Loading…
Reference in New Issue
Block a user