Please provide a minimal reproduction of your issue in a repo when asking for help on a specific problem.
@cosmicchipsocket In theory we can implement a new API for Vulkano that would allow shaders loading(and maybe even compiling) in runtime and even in safe way(with some runtime overhead), but it would contradict Vulkan's design approach fundamentals that assume that the user is loading and configuring everything beforehand. Generally speaking if we change the Shader and recreating the Pipeline and all related objects often it could lead to performance penalties in Vulkan(and actually in OpenGL too). Especially when the shaders' code significantly differ between loadings.
If the shader's initial specialization is a goal, then one can use specialization constants on Pipeline creation stage. Specialization constants work in form of "macros" inside the shader, and as such allow to change the shader program workflow significantly. I use this feature often in my project. There is just one huge shader with thousands of lines in source code, and several specialization constants that allow to specialize this large shader into several small one. This approach works perfectly in Vulkano, has no performance issues(at least so far I didn't notice any), and doesn't require Shader re-compilation in runtime.
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.