!wAvQtPZgqUpkbHgXaM:matrix.org

Vulkano

65 Members
https://github.com/vulkano-rs/1 Servers

Load older messages


SenderMessageTime
29 Oct 2020
@gitter_cosmicchipsocket:matrix.orgCosmic Chip Socket (Gitter) I'm trying to figure out some performance issues with my new Vulkano renderer - the drawing overhead currently is even worse than glium. Seems like if I call CpuBufferPool::chunk() about 3000 times a frame performance just dies, not only in try_next_impl() but also cleanup_finished() dropping lots and lots of Arcs. What is the correct way to use CpuBufferPool? It doesn't seem like it's doing any reusing of resources at all! 21:39:59
@gitter_cosmicchipsocket:matrix.orgCosmic Chip Socket (Gitter)CpuBufferPool::chunk() is being called every time I submit a draw21:40:26
@gitter_cosmicchipsocket:matrix.orgCosmic Chip Socket (Gitter) Here: https://gitlab.com/cosmicchipsocket/keeshond/-/blob/c91fbb2a011be18cb462a8173725730ce2052ceb/keeshond/src/renderer/vulkan.rs#L272 21:45:49
@gitter_cosmicchipsocket:matrix.orgCosmic Chip Socket (Gitter)What is the best way to resolve this?21:45:59
30 Oct 2020
@sicarus37:matrix.orgsicarus changed their profile picture.04:55:58
31 Oct 2020
@gitter_cosmicchipsocket:matrix.orgCosmic Chip Socket (Gitter) Would posting a question via the bug tracker be an appropriate way to ask about this? Because I'd really like to fix this performance bottleneck and am looking for help from someone who is more familiar with buffers in Vulkano 16:04:36
@gitter_cosmicchipsocket:matrix.orgCosmic Chip Socket (Gitter)The performance is really bad and the existing tutorial resource about buffer usage is insufficient16:05:19
@gitter_cosmicchipsocket:matrix.orgCosmic Chip Socket (Gitter) Vulkano seems to provide no resources about how to 1. reuse buffer resources by putting them in a struct (the examples all exist in a vacuum, nothing about the types of the buffers to store them for later), 2. write data to certain structs (the tutorial seems outdated and I can't access a CpuAccessibleBuffer by index after a call to write(), and no way to rewrite the contents of a CpuBufferPool chunk), 3. use two different types of buffers for the vertex and instance buffers in a draw() call (putting them in a tuple does not compile, and putting them in a vec means both need to be an Arc type, so I have to create a new Arc for each submit, which seems to be adding a lot of overhead) - I don't understand what type the vertex parameter is looking for, and how to make something that satisfies the type with my vertex and instance buffers while still being performant 16:13:25
@gitter_cosmicchipsocket:matrix.orgCosmic Chip Socket (Gitter)I have so many questions. Does anyone still read the gitter?16:13:41
@gitter_cosmicchipsocket:matrix.orgCosmic Chip Socket (Gitter)Will I have to contact individual maintainers for the project to ask for help?16:13:54
@gitter_cosmicchipsocket:matrix.orgCosmic Chip Socket (Gitter) (edited) ... individual maintainers for the project to ... => ... individual project maintainers to ... 16:14:04
2 Nov 2020
@gitter_cosmicchipsocket:matrix.orgCosmic Chip Socket (Gitter) Could anyone help answer this for me? vulkano-rs/vulkano#1429 02:40:25
4 Nov 2020
@gitter_faulesocke:matrix.orgFaule Socke (Gitter) is it possible to adjust the mipmap count for the StorageImage? 19:36:33
7 Nov 2020
@gitter_cosmicchipsocket:matrix.orgCosmic Chip Socket (Gitter) Alternatively if someone could answer this for me that would also be good vulkano-rs/vulkano#1433 18:51:17
@gitter_cosmicchipsocket:matrix.orgCosmic Chip Socket (Gitter) Or maybe this vulkano-rs/vulkano#1434 19:08:33
@gitter_cosmicchipsocket:matrix.orgCosmic Chip Socket (Gitter)Where are the maintainers?19:08:40
8 Nov 2020
@gitter_korteland:matrix.orgWill Korteland (Gitter) joined the room.22:44:02
@gitter_korteland:matrix.orgWill Korteland (Gitter)

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

22:44:02
@gitter_korteland:matrix.orgWill Korteland (Gitter) but there's a change in v0.19 that seems to break stuff: "AutoCommandBufferBuilder methods now take a mutable reference to self instead of taking ownership" 22:44:24
@gitter_korteland:matrix.orgWill Korteland (Gitter) and sure enough, i get an error when building: error[E0507]: cannot move out of a mutable reference 22:44:56
@gitter_korteland:matrix.orgWill Korteland (Gitter) the compiler says the move is at .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? 22:46:02
11 Nov 2020
@gitter_eliah_lakhin_twitter:matrix.orgEliah Lakhin (Gitter)

@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.

16:58:45
@gitter_eliah_lakhin_twitter:matrix.orgEliah Lakhin (Gitter) @korteland Well, 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 17:15:59
@gitter_ella-0:matrix.orgElla-0 (Gitter)Are there any plans to support extensions such as VK_EXT_external_memory_dma_buf and friends for writing wayland compositors?21:20:18
@gitter_korteland:matrix.orgWill Korteland (Gitter) @eliah_lakhin_twitter thanks. I ended up having to rewrite similar to what you said, I ended up with this:
  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();
    }
21:35:09
15 Nov 2020
@gitter_pac85_gitlab:matrix.organtonino (Gitter)
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?
00:00:11
@gitter_pac85_gitlab:matrix.organtonino (Gitter)

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?

doesn anyone rember this? As it been fixed?

00:00:37
@gitter_pac85_gitlab:matrix.organtonino (Gitter)I rewrote my hole app using the unsafe APIs, but perhaps it is something that can be worked on00:01:09
@gitter_pac85_gitlab:matrix.organtonino (Gitter) (edited) ... unsafe APIs, but ... => ... unsafe APIs (so I don't really need a fix), but ... 00:01:43
@gitter_pac85_gitlab:matrix.organtonino (Gitter) (edited) I rewrote my hole app using the unsafe APIs (so I don't really need a fix), but perhaps it is something that can be worked on => > 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? 00:02:15

There are no newer messages yet.


Back to Room List