Please provide a minimal reproduction of your issue in a repo when asking for help on a specific problem.
pipeline
inside of a struct. What is the type of pipeline
? It seems like it has to be an Arc of a GraphicsPipeline, where the GraphicsPipeline takes three template parameters. I can't figure out the third parameter. Best I can come up with is Arc<RenderPass<<Self as DrawControl>::new::scope::CustomRenderPassDesc>>
but the compiler says that <Self as DrawControl>::new::scope::CustomRenderPassDesc
is not an associated type. I am creating the pipeline within the associated new()
function of my struct. Somehow it's creating a new type within that function? How do I use it to fill in the pipeline definition in my struct?
[u8; 4]
instead of a [f32; 4]
in the vertex struct, since i can't figure out where to specify the attribute's format
@pac85_gitlab Are there any advantages in using Concurrent sharing?
you can use the resource from multiple queues without transitioning the ownership which could perform better if you would have to do them frequently .On the other end if you upload some data from a queue after loading it and the always access it from one queue you are better of transitioning the ownership since resources with exclusive sharing will have better performance when you access them. .
BufferSlice::from()
and use an &Arc<CpuAccessibleBuffer<T>> as suggested in the documentation, I'm told instead that it's expecting another BufferSlice
hi, i'm trying to port some code from an online tutorial to vulkano v0.19. the code looks like:
fn create_command_buffers(&mut self) {
let queue_family = self.graphics_queue.family();
self.command_buffers = self.swapchain_framebuffers.iter()
.map(|framebuffer| {
let vertices = BufferlessVertices { vertices: 3, instances: 1 };
Arc::new(AutoCommandBufferBuilder::primary_simultaneous_use(self.device.clone(), queue_family)
.expect("failed to initialise command buffer builder")
.begin_render_pass(framebuffer.clone(), false, vec![[0.0, 0.0, 1.0].into()])
.expect("failed to begin render pass")
.draw(self.graphics_pipeline.clone(), &DynamicState::none(), vertices, (), ())
.expect("failed to draw")
.end_render_pass()
.expect("failed to end render pass")
.build()
.expect("failed to build render pass"))
})
.collect();
}
the full source is here: https://github.com/bwasty/vulkan-tutorial-rs/blob/master/src/bin/14_command_buffers.rs
error[E0507]: cannot move out of a mutable reference
.expect("failed to end render pass")
, and the reason is "because value has type vulkano::command_buffer::AutoCommandBufferBuilder, which does not implement the Copy trait". any ideas?
@cosmicchipsocket Hi!
Regarding maintenance issue, I put a comment here: vulkano-rs/vulkano#1435 Basically, we are currently on our own. But if someone wants to merge something into the repo, if he needs and wants to fix something he can do so and I can help with merging the PR as I was granted PRs merging access recently.
AutoCommandBufferBuilder
is not Copy
, yes. I think maybe you forgot to put let mut
in front of buffer builder variable declaration? Also since AutoCommandBufferBuilder
accepting commands by &mut self
you have to call each command on separate line. And in the end call .build()
by value, not by reference: https://docs.rs/vulkano/0.19.0/vulkano/command_buffer/struct.AutoCommandBufferBuilder.html#method.build
fn create_command_buffers(&mut self) {
let queue_family = self.graphics_queue.family();
self.command_buffers = self.swapchain_framebuffers.iter()
.map(|framebuffer| {
let vertices = BufferlessVertices { vertices: 3, instances: 1 };
let mut builder = AutoCommandBufferBuilder::primary_simultaneous_use(self.device.clone(), queue_family)
.expect("failed to initialise command buffer builder");
builder.begin_render_pass(framebuffer.clone(), false, vec![[0.0, 0.0, 1.0].into()])
.expect("failed to begin render pass")
.draw(self.graphics_pipeline.clone(), &DynamicState::none(), vertices, (), ())
.expect("failed to draw")
.end_render_pass()
.expect("failed to end render pass");
let command_buffer = builder.build().expect("failed to build render pass"));
Arc::new(command_buffer)
})
.collect();
}
Hi, I'm rendering a scene twice and the second time i render it I use Equal for depth testing. It works until I put a compute dispatch in between the two, the depth gets all corrupted so I guess the layout isn't being transitioned. For the second pass on the scene I'm binding it to the frame buffer but not writing to it. Any ideas?
does anyone rember this? As it been fixed?
let framebuffer = Framebuffer::start(render_pass.clone())
.add(**Here**).unwrap()
.build().unwrap();