mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-25 00:04:15 +00:00
Rename PipelineLayoutDesc to Layout
This commit is contained in:
parent
e262b75919
commit
a5b21125ed
@ -198,7 +198,7 @@ unsafe impl ::vulkano::descriptor_set::SetLayoutInit<{write_ty}> for Set{set} {{
|
||||
#[derive(Default)]
|
||||
pub struct Layout;
|
||||
|
||||
unsafe impl ::vulkano::descriptor_set::PipelineLayoutDesc for Layout {{
|
||||
unsafe impl ::vulkano::descriptor_set::Layout for Layout {{
|
||||
type DescriptorSets = ({sets_defs});
|
||||
type DescriptorSetLayouts = ({layouts_defs});
|
||||
type PushConstants = ();
|
||||
|
@ -7,7 +7,7 @@ use buffer::BufferSlice;
|
||||
use buffer::AbstractBuffer;
|
||||
use command_buffer::CommandBufferPool;
|
||||
use command_buffer::DynamicState;
|
||||
use descriptor_set::PipelineLayoutDesc;
|
||||
use descriptor_set::Layout as PipelineLayoutDesc;
|
||||
use descriptor_set::DescriptorSetsCollection;
|
||||
use device::Queue;
|
||||
use format::ClearValue;
|
||||
|
@ -5,7 +5,7 @@ use buffer::BufferSlice;
|
||||
use command_buffer::CommandBufferPool;
|
||||
use command_buffer::inner::InnerCommandBufferBuilder;
|
||||
use command_buffer::inner::InnerCommandBuffer;
|
||||
use descriptor_set::PipelineLayoutDesc;
|
||||
use descriptor_set::Layout as PipelineLayoutDesc;
|
||||
use descriptor_set::DescriptorSetsCollection;
|
||||
use device::Queue;
|
||||
use format::PossibleFloatOrCompressedFormatDesc;
|
||||
|
@ -10,7 +10,7 @@ use sampler::Sampler;
|
||||
use vk;
|
||||
|
||||
/// Types that describe the layout of a pipeline (descriptor sets and push constants).
|
||||
pub unsafe trait PipelineLayoutDesc {
|
||||
pub unsafe trait Layout {
|
||||
/// Represents a collection of `DescriptorSet` structs. A parameter of this type must be
|
||||
/// passed when you add a draw command to a command buffer that uses this layout.
|
||||
type DescriptorSets;
|
||||
@ -30,7 +30,7 @@ pub unsafe trait PipelineLayoutDesc {
|
||||
-> Vec<Arc<AbstractDescriptorSetLayout>>; // TODO: vec is slow
|
||||
|
||||
// FIXME: implement this correctly
|
||||
fn is_compatible_with<P>(&self, _: &P) -> bool where P: PipelineLayoutDesc { true }
|
||||
fn is_compatible_with<P>(&self, _: &P) -> bool where P: Layout { true }
|
||||
}
|
||||
|
||||
/// Types that describe a single descriptor set.
|
||||
|
@ -9,7 +9,7 @@
|
||||
//! In order to build a pipeline object (a `GraphicsPipeline` or a `ComputePipeline`), you have to
|
||||
//! pass a pointer to a `PipelineLayout<T>` struct. This struct is a wrapper around a Vulkan struct
|
||||
//! that contains all the data about the descriptor sets and descriptors that will be available
|
||||
//! in the pipeline. The `T` parameter must implement the `PipelineLayoutDesc` trait and describes
|
||||
//! in the pipeline. The `T` parameter must implement the `Layout` trait and describes
|
||||
//! the descriptor sets and descriptors on vulkano's side.
|
||||
//!
|
||||
//! To build a `PipelineLayout`, you need to pass a collection of `DescriptorSetLayout` structs.
|
||||
@ -27,7 +27,7 @@
|
||||
//!
|
||||
//! # Shader analyser
|
||||
//!
|
||||
//! While you can manually implement the `PipelineLayoutDesc` and `SetLayout` traits on
|
||||
//! While you can manually implement the `Layout` and `SetLayout` traits on
|
||||
//! your own types, it is encouraged to use the `vulkano-shaders` crate instead. This crate will
|
||||
//! automatically parse your SPIR-V code and generate structs that implement these traits and
|
||||
//! describe the pipeline layout to vulkano.
|
||||
@ -35,7 +35,7 @@
|
||||
use std::option::IntoIter as OptionIntoIter;
|
||||
use std::sync::Arc;
|
||||
|
||||
pub use self::layout_def::PipelineLayoutDesc;
|
||||
pub use self::layout_def::Layout;
|
||||
pub use self::layout_def::SetLayout;
|
||||
pub use self::layout_def::SetLayoutWrite;
|
||||
pub use self::layout_def::SetLayoutInit;
|
||||
@ -114,7 +114,7 @@ macro_rules! pipeline_layout {
|
||||
use $crate::descriptor_set::DescriptorWrite;
|
||||
use $crate::descriptor_set::DescriptorBind;
|
||||
use $crate::descriptor_set::PipelineLayout;
|
||||
use $crate::descriptor_set::PipelineLayoutDesc;
|
||||
use $crate::descriptor_set::Layout;
|
||||
use $crate::descriptor_set::ShaderStages;
|
||||
use $crate::buffer::AbstractBuffer;
|
||||
|
||||
@ -175,7 +175,7 @@ macro_rules! pipeline_layout {
|
||||
)*
|
||||
|
||||
pub struct Layout;
|
||||
unsafe impl PipelineLayoutDesc for Layout {
|
||||
unsafe impl Layout for Layout {
|
||||
type DescriptorSets = ($(Arc<DescriptorSet<$set_name>>),*);
|
||||
type DescriptorSetLayouts = ($(Arc<DescriptorSetLayout<$set_name>>),*);
|
||||
type PushConstants = ();
|
||||
|
@ -8,7 +8,7 @@ use descriptor_set::SetLayout;
|
||||
use descriptor_set::SetLayoutInit;
|
||||
use descriptor_set::SetLayoutWrite;
|
||||
use descriptor_set::DescriptorWrite;
|
||||
use descriptor_set::PipelineLayoutDesc;
|
||||
use descriptor_set::Layout as PipelineLayoutDesc;
|
||||
|
||||
/// FIXME: it should be unsafe to create this struct
|
||||
pub struct RuntimeDesc;
|
||||
|
@ -3,7 +3,7 @@ use std::ptr;
|
||||
use std::sync::Arc;
|
||||
|
||||
use buffer::AbstractBuffer;
|
||||
use descriptor_set::layout_def::PipelineLayoutDesc;
|
||||
use descriptor_set::layout_def::Layout;
|
||||
use descriptor_set::layout_def::SetLayout;
|
||||
use descriptor_set::layout_def::SetLayoutWrite;
|
||||
use descriptor_set::layout_def::SetLayoutInit;
|
||||
@ -355,7 +355,7 @@ pub struct PipelineLayout<P> {
|
||||
layouts: Vec<Arc<AbstractDescriptorSetLayout>>, // TODO: is it necessary to keep the layouts alive? check the specs
|
||||
}
|
||||
|
||||
impl<P> PipelineLayout<P> where P: PipelineLayoutDesc {
|
||||
impl<P> PipelineLayout<P> where P: Layout {
|
||||
/// Creates a new `PipelineLayout`.
|
||||
pub fn new(device: &Arc<Device>, description: P, layouts: P::DescriptorSetLayouts)
|
||||
-> Result<Arc<PipelineLayout<P>>, OomError>
|
||||
|
@ -5,7 +5,7 @@ use std::sync::Arc;
|
||||
|
||||
use device::Device;
|
||||
use descriptor_set::PipelineLayout;
|
||||
use descriptor_set::PipelineLayoutDesc;
|
||||
use descriptor_set::Layout as PipelineLayoutDesc;
|
||||
use framebuffer::Subpass;
|
||||
use shader::FragmentShaderEntryPoint;
|
||||
use shader::VertexShaderEntryPoint;
|
||||
|
Loading…
Reference in New Issue
Block a user