!wAvQtPZgqUpkbHgXaM:matrix.org

Vulkano

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

Load older messages


SenderMessageTime
10 Jul 2020
@gitter_noneuclideangirl:matrix.orgEleanor McMurtry (Gitter) When I use path with shader!, the compiled shader doesn't actually change unless I also change something in the Rust code to force it to re-build. Is there a nicer way around this? 09:01:10
@gitter_eliah_lakhin_twitter:matrix.orgEliah Lakhin (Gitter) @eleanor-em This is a well-known issue no one know how to resolve. I put a numeric constant to the module's Rust code that I increase every time I change something in the code. Not that it is too meaningful, but at least it shows me a build version number of my glsl code :) 11:41:25
@gitter_noneuclideangirl:matrix.orgEleanor McMurtry (Gitter)haha, thanks eliah :)23:19:19
@gitter_ogkloo:matrix.orgogkloo (Gitter) joined the room.23:23:41
@gitter_ogkloo:matrix.orgogkloo (Gitter) Has anyone else had problems with IncompatibleDriver? I've tried a few things and wondered what other people did to get around it. 23:23:41
11 Jul 2020
@gitter_tskken:matrix.orgDylan Blanchard (Gitter)hi am trying to make it so I can pull out the draw functionality out of the main function from the vulkano multi-window example but I keep getting an error and cant figure out the right type to pass in.02:42:17
@gitter_tskken:matrix.orgDylan Blanchard (Gitter)
 fn draw(
        &mut self, 
        render_pass: Arc<dyn RenderPassAbstract + Send + Sync>, 
        dynamic_state: &mut DynamicState,
        device: Arc<Device>,
        queue: Arc<Queue>,
        pipeline: Arc<dyn GraphicsPipelineAbstract + Send + Sync + 'static>,
        vertex_buffer: Vec<Arc<CpuAccessibleBuffer<[Vertex]>>>,
    ) { 
draw code... its same as whats in the draw function in event.run
}
02:42:56
@gitter_tskken:matrix.orgDylan Blanchard (Gitter) (edited) ... { draw code... ... => ... { // draw code... ... 02:43:10
@gitter_tskken:matrix.orgDylan Blanchard (Gitter)error with vertex_buffer value in the draw call02:43:46
@gitter_tskken:matrix.orgDylan Blanchard (Gitter)
expected trait object `dyn vulkano::buffer::traits::BufferAccess`, found struct `vulkano::buffer::cpu_access::CpuAccessibleBuffer`
02:43:56
@gitter_tskken:matrix.orgDylan Blanchard (Gitter)if i change the vertex_buffer value to be a dyn BufferAccess then when I try and pass in the vertex_buffer in to the draw function is the other half of the code after I create the buffer it breaks as well for the opposite error02:45:02
@gitter_tskken:matrix.orgDylan Blanchard (Gitter) (edited) ... function is the ... => ... function in the ... 02:45:18
@gitter_tskken:matrix.orgDylan Blanchard (Gitter)o ya this draw function is implemented on the WindowSerface struct from the examples02:47:04
@gitter_tskken:matrix.orgDylan Blanchard (Gitter)so thats what the mut self gives access to02:47:18
@gitterbot:matrix.orgGitter Integration pentadyne Is there a way to bind layouts for uniform buffers at runtime? I've not really found anything helpful from my googling, sorry if I've missed something obvious 04:23:26
@gitter_neachdainn:matrix.org@gitter_neachdainn:matrix.org left the room.04:26:43
12 Jul 2020
@gitter_pac85_gitlab:matrix.organtonino (Gitter) @eliah_lakhin_twitter you don't really need to change the content of the file, you really only need to update it's timestamp (with something like touvh or by saving it if your editor can save files without making modifications). 16:17:58
@gitter_eliah_lakhin_twitter:matrix.orgEliah Lakhin (Gitter) @pac85_gitlab Good to know. Thank you! 16:19:28
@gitter_pac85_gitlab:matrix.organtonino (Gitter) How exactly is one supposed to use AutoCommandBuffer when an image is used multiple times in the same command buffer? (Read only so there shouldn't really be any conflict). 16:21:01
@gitter_pac85_gitlab:matrix.organtonino (Gitter)Something strange is happening, it works for the first frame that I render and then it throws out an error.16:21:42
@gitter_pac85_gitlab:matrix.organtonino (Gitter) @eliah_lakhin_twitter NP 16:22:03
@gitter_eliah_lakhin_twitter:matrix.orgEliah Lakhin (Gitter) @pac85_gitlab Can you show a code? 16:22:09
@gitter_pac85_gitlab:matrix.organtonino (Gitter) @eliah_lakhin_twitter https://gitlab.com/pac85/GameKernel/-/blob/master/src/game_kernel/subsystems/video/renderer/mod.rs#L1470 16:23:10
@gitter_pac85_gitlab:matrix.organtonino (Gitter) the errror is thread 'main' panicked at 'called Result::unwrap() on an Err value: SyncCommandBufferBuilderError(Conflict { command1_name: "vkCmdBindDescriptorSets", command1_param: "Image bound to descriptor 1 of set 0", command1_offset: 3, command2_name: "vkCmdBindDescriptorSets", command2_param: "Image bound to descriptor 1 of set 0", command2_offset: 8 })', /mnt/void/home/archdata/cose/GameKernel/src/game_kernel/subsystems/video/renderer/mod.rs:1470:22 16:24:31
@gitter_eliah_lakhin_twitter:matrix.orgEliah Lakhin (Gitter) @pac85_gitlab Is it possible that you are changing texture set on the second frame? 16:32:55
@gitter_eliah_lakhin_twitter:matrix.orgEliah Lakhin (Gitter) @pac85_gitlab To be more specific this line confuses me: https://gitlab.com/pac85/GameKernel/-/blob/master/src/game_kernel/subsystems/video/renderer/mod.rs#L1431 if you are adding additional entry to the descriptor set conditionally I suppose it shouldn't work either in true or false branches of the condition. As far as I understand the descriptor set should always be described completely, you can't miss an entry based on some condition. In one of two cases it will fail 16:39:21
@gitter_eliah_lakhin_twitter:matrix.orgEliah Lakhin (Gitter)

@pac85_gitlab The error message is also showing something strange. It's saying there is something with descriptor 1 of set 0. I suppose it should complain about descriptor No 3, but anyway there is something with descriptors and layouts. The set's layout itself described here: https://gitlab.com/pac85/GameKernel/-/blob/master/data/engine/shaders/third_pbr/frag.glsl#L10 First thing that seem to be mistaken here is numeration of bindings. The bindings should start with Zero, not with One. The might be a cause of a strange numeration in the error.

Most likely what really happened is that first time you run the frame you read an image from iterator here: https://gitlab.com/pac85/GameKernel/-/blob/master/src/game_kernel/subsystems/video/renderer/mod.rs#L1429 So, the entire number of entries was 3(as required by the shader's layout) and Vulkan/Vulkano somehow resolved it. The second time you run this code the iterator(or a source of the iterator) was already exceeded/emptied so the descriptor set was described with 2 entries only, which contradicts shader's layout.

The resolution is you need to somehow pass a sampler attachment in both cases of that condition. Even if you don't have an image you need to put a dummy image(like 1x1 pixel) to fill the gap in the layout, or use different shader with the different layout. Also, if you want to change "albedo" texture sampler often and don't want to touch "diffuse" and "specular" as often as "albedo", you can split descriptor set into two independent sets, and describe them independently too caching the first set(with diffuse and specular). It would be more efficient than recreating descriptor sets every frame which is expensive operation per se.

16:59:31
13 Jul 2020
@gitter_leftadjoint:matrix.orgleft_adjoint (Gitter) @eleanor-em @eliah_lakhin_twitter, regarding rebuilding on a shader change, I use a build script to handle this situation, i.e. with
println!("cargo:rerun-if-changed=src/shaders/shader.fs");
09:32:19
15 Jul 2020
@gitter_duckerman:matrix.orgSergey (Gitter) joined the room.06:20:59
@gitter_duckerman:matrix.orgSergey (Gitter) Hey guys! Can I use Vulkano on android? 06:20:59

There are no newer messages yet.


Back to Room List