You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The response in #676 implies that one can use a Arc<GraphicsPipelineAbstract + Send + Sync> instead of a Arc<GraphicsPipelineAbstract> for a pipeline in a struct in order to issue a call to draw_indexed. However, this only works if sending a Vec<Box<dyn BufferAccess + Send + Sync>> as the VertexSource. Attempting to use a tuple as a VertexSource gives the following:
error[E0277]: the size for values of type `dyn vulkano::pipeline::GraphicsPipelineAbstract + std::marker::Send + std::marker::Sync` cannot be known at compilation time
--> keeshond/src/renderer/vulkan.rs:295:29
|
295 | builder.draw_indexed::<(BufferSlice<[Vertex], &Arc<ImmutableBuffer<[Vertex]>>>, BufferSlice<[&VertexInstance], &Arc<CpuAccessibleBuffer<[&VertexInstance]>>>), _, _, _, _, _>
| ^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `dyn vulkano::pipeline::GraphicsPipelineAbstract + std::marker::Send + std::marker::Sync`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
= note: required because of the requirements on the impl of `vulkano::pipeline::vertex::VertexSource<(vulkano::buffer::BufferSlice<[renderer::vulkan::Vertex], &std::sync::Arc<vulkano::buffer::ImmutableBuffer<[renderer::vulkan::Vertex]>>>, vulkano::buffer::BufferSlice<[&renderer::vulkan::VertexInstance], &std::sync::Arc<vulkano::buffer::CpuAccessibleBuffer<[&renderer::vulkan::VertexInstance]>>>)>` for `dyn vulkano::pipeline::GraphicsPipelineAbstract + std::marker::Send + std::marker::Sync`
= note: required because of the requirements on the impl of `vulkano::pipeline::vertex::VertexSource<(vulkano::buffer::BufferSlice<[renderer::vulkan::Vertex], &std::sync::Arc<vulkano::buffer::ImmutableBuffer<[renderer::vulkan::Vertex]>>>, vulkano::buffer::BufferSlice<[&renderer::vulkan::VertexInstance], &std::sync::Arc<vulkano::buffer::CpuAccessibleBuffer<[&renderer::vulkan::VertexInstance]>>>)>` for `std::sync::Arc<dyn vulkano::pipeline::GraphicsPipelineAbstract + std::marker::Send + std::marker::Sync>`
How do I make the call to draw_indexed in this scenario, where I need to pass a Vertex and Instance buffer, and the pipeline needs to be stored in a struct?
The text was updated successfully, but these errors were encountered:
The way that vertex buffers are specified is completely different now, and GraphicsPipelineAbstract doesn't exist anymore either. So this can be closed.
Related to #1429 and #676.
The response in #676 implies that one can use a
Arc<GraphicsPipelineAbstract + Send + Sync>
instead of aArc<GraphicsPipelineAbstract>
for a pipeline in a struct in order to issue a call todraw_indexed
. However, this only works if sending aVec<Box<dyn BufferAccess + Send + Sync>>
as theVertexSource
. Attempting to use a tuple as aVertexSource
gives the following:How do I make the call to
draw_indexed
in this scenario, where I need to pass a Vertex and Instance buffer, and the pipeline needs to be stored in a struct?The text was updated successfully, but these errors were encountered: