by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Nate Kent
    @neachdainn
    Alternatively, is there a way to make a pass that is just depth and then a pass that uses the depth information from the previous pass?
    Nate Kent
    @neachdainn
    Got my answer on Discord.
    Antonino Siena
    @nifker
    @AustinJ235 How fatal would it be if SwapchainImage wouldnt have the swapchain method? This currently prevents any window not Send + Sync from being used in vulkano.
    matrixbot
    @matrixbot
    austinj235 it wouldn't be terribly breaking to the public interface but I am not if the changes would be able to be made to the internal ones. I haven't looked into it a whole lot, but I don't see any specific Send + Sync requirements on the swapchain itself.
    Antonino Siena
    @nifker
    e.g. copy_image() required the source/dest to be Send + Sync and using a SwapchainImage there wouldnt be possible when the window is not Send + Sync
    antonino
    @pac85_gitlab
    hi, I was looking into ImmutableImage, wondering how I could upload mipmap data and found the comment "TODO: Support mipmaps"
    Sure i can still do it manually but I was wondering if a contribution would be appreciated but how can it be implemented without making a breaking change?
    Eliah Lakhin
    @eliah_lakhin_twitter
    @pac85_gitlab One way to do this is using ImmutableImage::uninitialized constructor that will return you two things: the final read-only immutable image(not initialized yet), and the Initializer image ready for writing in. Then you can submit as many mipmap transfer submissions commands for Initializer. Once all submission commands executed you get ready to use ImmutableImage(the first parameter of the uninitialized call)
    antonino
    @pac85_gitlab

    @pac85_gitlab One way to do this is using ImmutableImage::uninitialized constructor that will return you two things: the final read-only immutable image(not initialized yet), and the Initializer image ready for writing in. Then you can submit as many mipmap transfer submissions commands for Initializer. Once all submission commands executed you get ready to use ImmutableImage(the first parameter of the uninitialized call)

    yep that is what from_buffer and from_iterator do

    if the mipmap data is there it should just work am I right?
    Eliah Lakhin
    @eliah_lakhin_twitter
    @pac85_gitlab Well, I'm not sure if with_mipmaps constructor was ever work since there is no way to submit actual mipmap images. If you improve the constructor even with signature breaking changes IMO it would be fine. But I'm not a maintainer, better to ask @AustinJ235 . Anyway even if he doesn't accept breaking changes you can rename it to the new constructor
    But in my personal opinion it's fine to change existing method. I believe no one really used it :)

    if the mipmap data is there it should just work am I right?

    If it was submitted properly with uninitialized constructor, then yes. At least I can confirm it works this way in my project

    antonino
    @pac85_gitlab

    @pac85_gitlab Well, I'm not sure if with_mipmaps constructor was ever work since there is no way to submit actual mipmap images. If you improve the constructor even with signature breaking changes IMO it would be fine. But I'm not a maintainer, better to ask @AustinJ235 . Anyway even if he doesn't accept breaking changes you can rename it to the new constructor

    also vulkano usually exposes two ways of uploading images, either using an iterator or using a buffer. Which one of those two should with_mipmaps take if we modify it's signature?

    Eliah Lakhin
    @eliah_lakhin_twitter
    @pac85_gitlab Since this is a shortcut method, maybe it would be better just provide a source image that Vulkano will use to generate mipmaps through blitting for all(or specified number of layers in range). For more generic approach we have a general method
    antonino
    @pac85_gitlab
    Alright that makes sense
    Ivan Kalinin
    @Rexagon
    Hi. Has anyone encountered memory leaks with deferred example on windows?
    Eleanor McMurtry
    @eleanor-em
    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?
    Eliah Lakhin
    @eliah_lakhin_twitter
    @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 :)
    Eleanor McMurtry
    @eleanor-em
    haha, thanks eliah :)
    ogkloo
    @ogkloo
    Has anyone else had problems with IncompatibleDriver? I've tried a few things and wondered what other people did to get around it.
    Dylan Blanchard
    @Tskken
    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.
     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
    }
    error with vertex_buffer value in the draw call
    expected trait object `dyn vulkano::buffer::traits::BufferAccess`, found struct `vulkano::buffer::cpu_access::CpuAccessibleBuffer`
    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 in the other half of the code after I create the buffer it breaks as well for the opposite error
    o ya this draw function is implemented on the WindowSerface struct from the examples
    Dylan Blanchard
    @Tskken
    so thats what the mut self gives access to
    matrixbot
    @matrixbot
    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
    antonino
    @pac85_gitlab
    @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).
    Eliah Lakhin
    @eliah_lakhin_twitter
    @pac85_gitlab Good to know. Thank you!
    antonino
    @pac85_gitlab
    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).
    Something strange is happening, it works for the first frame that I render and then it throws out an error.
    @eliah_lakhin_twitter NP
    Eliah Lakhin
    @eliah_lakhin_twitter
    @pac85_gitlab Can you show a code?
    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
    Eliah Lakhin
    @eliah_lakhin_twitter
    @pac85_gitlab Is it possible that you are changing texture set on the second frame?
    Eliah Lakhin
    @eliah_lakhin_twitter
    @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
    Eliah Lakhin
    @eliah_lakhin_twitter

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

    left_adjoint
    @leftadjoint
    @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");
    Though, I'm actually rebuilding the SPIRV as a part of my build script and loading it at runtime. I'm not sure offhand if this will rebuild the module that loads the shader source by path.
    Sergey
    @DuckerMan
    Hey guys! Can I use Vulkano on android?
    antonino
    @pac85_gitlab

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

    sorry i just saw this, the purpose of that condition was to allow materials that either have or haven't a texture, in my case it always evaluated true because I only had a material with a texture

    antonino
    @pac85_gitlab
    in any case while hunting for perfomance I rewrote almost the hole thing with UnsafeCommandBuffers, I'm still not happy with the amount of time it takes to build the command buffers, could it be because of some checks slowing it down? I have ~400 objects (the scene is sponza) and I'm issuing a draw call for each of them. I've saved some time by reusing pipelines(which is really important and I planned on doing anyway) and also by reusing descriptor sets but it still takes around 6ms to build the hole command buffer
    Christopher Sabater Cordero
    @cs-cordero
    Hi I am a new vulkan user on MacOS. I followed the instructions on the tutorial here: http://vulkano.rs/guide/example-operation and the assert_eq! statement is failing. It doesn't seem like the buffer is properly being copied over, as the dest buffer still contains zeroes after executing the command buffer.
    Does anyone know why this part would fail? I followed the instructions to install the Vulkan SDK, which I believe should come with MoltenVK already, then installed vulkano using Cargo.toml.
    Eliah Lakhin
    @eliah_lakhin_twitter
    @cs-cordero Hi Chris! Well, the guide might be outdated a little, but anyway it would be easier to determine actual issue if you show us your code.
    Jonathan Woollett-Light
    @JonathanWoollett-Light
    A few questions:
    1. Posting questions here Vs as issues on the repo, which is preffered?
    2. I've got a bit stuck trying to pass RawDeviceExtensions instead of DeviceExtensions to intialise a device, anyone got examples of this?
    3. Has anyone used many GLSL extensions with Vulkano? Does Vulkano handle these or are they simply handled by the underlying shaderc? (pretty much if I've got an issue with one, where do I need to start working to fix it)
    Eliah Lakhin
    @eliah_lakhin_twitter
    @JonathanWoollett-Light
    1. Imo, Issues are preferred. It's more likely they will be noticed eventually.
    2. Can you show the code, please?
    3. As far as I understand it's all on the shaderc side. Vulkano currently have limited support of GLSL extensions, but maybe I'm wrong