Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Ryan Tse
    @rytse
    What is the intended way of reading CpuBufferPoolChunk into memory? If I understand correctly, all the methods returning BufferSlices give you references to values in VRAM that aren't necessarily safely accessible by CPU.
    Allen Garrett Gelwick III
    @ChousX
    Hey this is driving me nutty I am trying to update an old project to "0.20.0" and it was going great but then I ran headfirst into the removal of "window_size_dependent_setup". I was like ok there must be a new way to do this and this but I barely know what I am doing so how do I use this new format
        let framebuffer = Framebuffer::start(render_pass.clone())
        .add(**Here**).unwrap()
        .build().unwrap();
    antonino
    @pac85_gitlab
    I'm happy to see that there's a new update. In any case vulkano-win has some trouble while compiling for android, it is using the natove_window mathod from winit that doesn't exist anymore. Instead the native_window function from ndk-glue should be used
    wangranca
    @wangranca
    Hello, what is the best way to insert pipeline barriers in vulkano? I am trying to insert a barrier between 2 compute dispatches to make sure the first dispatch finishes all writing before the 2nd dispatch starts, thanks
    chiba
    @chiba
    Hello is there a headless example in Vulkano?
    Faule Socke
    @faulesocke
    @wangranca you don't have to, vulkano does this automatically for you.
    Faule Socke
    @faulesocke
    @ChousX try Framebuffer::start(rp.clone()).add(swapchain_images[i].clone()).unwrap().build().unwrap()
    that creates a framebuffer you can use for drawing into the corresponding swapchain image
    Benjamin Blundell
    @OniDaito
    Hi folks. I have a question about vulkano_shaders if I may please?
    I'd like to build a shader programatically - have the text for the GLSL loaded in. I'm not sure how to go about that as it seems vulkano-shaders want you to hardcode the shader into a mod.
    Benjamin Blundell
    @OniDaito
    I think the big problem I'm having is this line:
    codegen::reflect("Shader", content.as_binary(), input.types_meta, input.dump) .unwrap() .into()
    Essentially, whatever this spits out, I'd like to capture. But it gets caught inside a mod. I wonder, is this being generated at compile time? Having a difficult time deciphering what this macro is doing
    Benjamin Blundell
    @OniDaito
    Ideally, I'd like to pass a string into a function and get a variable back that represents my shader, for use in other parts of the vulkano pipeline. It looks like this might be quite a hack to do with vulkano_shaders
    Benjamin Blundell
    @OniDaito
    Yes, this is perhaps more what I'm looking for. Panic over.
    shiraori
    @shiraori:matrix.org
    [m]
    Hello! I was trying to work with the openxr crate (https://crates.io/crates/openxr), but it wraps some of the resource creation (in particular, it wraps instance, physical device, and swapchain initialization). What is the "correct" way to construct the corresponding vulkano types from the raw handles that openxr (or any other api) returns?
    derivator
    @derivator

    Hey :)

    basically i can't figure out how to use a [u8; 4] instead of a [f32; 4] in the vertex struct, since i can't figure out where to specify the attribute's format

    I have the same problem, did you find a solution @ChevyRay ?

    Eliah Lakhin
    @eliah_lakhin_twitter

    @OniDaito Hi!

    Sorry for delay with the answer.

    Yes, Runtime shader example is one of the options. Current primary use-case of Vulkano is to use precompiled shaders(built in compile time through the shader! macros), but there is a way to load them manually too in which case one will have to configure all descriptors and layouts manually(which is unsafe).

    On general note, Vulkano is following a principle(but is not enforces it too strongly) that all shaders normally should be loaded in the beginning and be prepared beforehand. In this case the end-user can gain maximal benefits of GPU capabilities through Vulkan API. GPUs themselves are not very tolerate to shader programs reloading, as it breaks the entire pipeline and all related stuff set up by the device on pipeline creation. Basically GPUs are designed for static programs. That's why Vulkano in turn trying to follow the same approach.

    This is, however, not always possible, and there could be edge cases when the API user might want to generate shader's code on the fly. One of the possibility as I mentioned is to use the approach from Runtime shader example. But it could be difficult to maintain. Another approach(a limited one, though) is to use Specialization Constants. The API user in fact can prepare large code of the shader that would specialize depending on Specialization Constants values. One can even organize branching depending on the values of constants, the shader loader will optimizes particular specialization statically and eliminate dead code control flows not covered by particular specilization.

    Just as an idea for you. Please take a look at the specialization constants examples in repository for more details.

    Eliah Lakhin
    @eliah_lakhin_twitter

    @OniDaito, @shiraori:matrix.org , @derivator

    Dear fellows,

    I have to apologize I'm not able to maintain the chat regularly. I'm visiting it rarely and noticing new topics came days if not weeks ago. This is my bad, but I just don't have enough resources to response on time. Perhaps, it would be more beneficial for you and for the community if you raise questions and topics in Vulkano repository Issues section. Me and other regular users are watching it more regularly.

    dobrakmato
    @dobrakmato:matrix.org
    [m]
    Hey guys, I am trying to render something to an AttachmentImage in first renderpass and then in second renderpass use that same AttachmentImage as input attachment. However I am getting this error: SyncCommandBufferBuilderError(Conflict { command1_name: "vkCmdBeginRenderPass", command1_param: "attachment 5", command1_offset: 88, command2_name: "vkCmdBindDescriptorSets", command2_param: "Image bound to descriptor 0 of set 0", command2_offset: 92 })'. Do you have any idea what could I have done wrong?
    1 reply
    carado
    @carado:matrix.org
    [m]
    hi, uh, the assert_eq!(num, 0); at vulkano's src/command_buffer/synced/commands.rs:1046 is failing for me, and i'm not sure what that means, anyone got any idea ?
    (i have num = 1)
    carado
    @carado:matrix.org
    [m]
    well, i got that using update_buffer; so i tried using a staging buffer instead and copy_buffer, and now the panic!(); at src/command_buffer/synced/commands.rs:2247 is being called
    i guess those errors aren't thoroughly documented
    Syntaxxor
    @Syntaxxor
    Hello! Just dropping in to ask if the tutorial will be completed for this project. It's a cool project, but since I'm not super familiar with Vulkan in general, I would greatly prefer to have a full tutorial that doesn't stop in the middle of implementing swapchains.
    Syntaxxor
    @Syntaxxor
    Should I just download the triangle example and then pretend to understand it until I actually get it to really work properly? Because I guess I could do that.
    Ilya Lakhin
    @Eliah-Lakhin

    @Syntaxxor Hi Syntaxxor. Sorry, this chat is rarely maintaining. In the future you can raise questions and suggestions in the repo's Issues section. They are watching by me and the community more frequently.

    Regarding your question. Currently examples is probably the main source of truth for new comers. Site's tutorial is a bit outdated, but it also could be a place to start learning. If you want to refresh the Tutorial, this is very welcome and will be very beneficial for the community! Anyway, please raise this topic in the Issues section first.

    Braden McDorman
    @bmcdorman

    Hi, I'm having some trouble with a AccessError(AlreadyInUse) when executing a command buffer. I'm using a compute pipeline and need to copy a new image at the beginning of the queue, generate mip map levels for that image, process it through a shader, then copy the image buffer back to the host. The program worked prior to adding the mipmap generation steps, but adding the blit_image steps for mipmap generation causes the proceeding shader dispatch command to fail. (AccessError { error: AlreadyInUse, command_name: "vkCmdBindDescriptorSets", command_param: "Image bound to descriptor 0 of set 0", command_offset: 9 }')

    The execution is as follows:

    1. write image to buffer (host side)
    2. copy buffer to image
    3. generate mip map levels
    4. dispatch shader <-- this fails
    5. copy image to buffer
    6. read buffer (host side)

    It seems like this could be caused by a pipeline barrier issue, but vulkano appears to abstract those away. Any hints on how I should proceed? I can post code if that would help.

    Braden McDorman
    @bmcdorman
    I decided to use UnsafeCommandBufferBuilder directly so I could insert my own pipeline barriers. That appears to be working
    Ilya Lakhin
    @Eliah-Lakhin
    @bmcdorman Please post your question in the Issues section. Thank you.
    Faule Socke
    @faulesocke
    does anyone have ideas for security related research in vulkano?
    Eragon
    @Eragonfr
    Hello does anyone have a project template for Vulkano ? With multiples files, and comments, wish an example like the buffer-pool example or any other example.
    Hugh Sipière
    @hgsipiere
    Just a curiosity, is it possible to compile shaders before running a Vulkano program? By this I don't mean compiling GLSL to the SPIR-V intermediate format but the real binary representation for the GPU.
    I don't have any need to whatsoever, I'm just curious so no worries if you aren't sure.
    dzil123
    @dzil123:fairydust.space
    [m]
    The Vulkan spec says that the shader code you provide to the api is always SPIR-V https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkShaderModule.html
    Faule Socke
    @faulesocke
    @hgsipiere you could experiment with pipeline caches
    kity
    @kity:kity.wtf
    [m]
    hey, i'm trying to base a new project off of the triangle example, but when i do pipeline.layout().descriptor_set_layout(0).unwrap() it panics
    my understanding is that the pipeline layout should have a set 0, since it's inferred from my fragment shader which contains a layout(set = 0, binding = 0) uniform usampler3D
    i'm not very familiar with vulkan though, and certainly not this library... anyone know what might be wrong?
    kity
    @kity:kity.wtf
    [m]
    WOW
    so after hours of debugging, i figure out that because i'm not using the uniform, i guess through the ~magic~ vulkano does to infer the pipeline layout, it can't tell that the uniform exists because it's effectively optimized out
    referencing the uniform in my shader makes it work
    antonino
    @pac85_gitlab
    I could find no way of waiting for an eventi and opened an issue
    Jay Leimer
    @CodingJinxx
    Is the vulkano guide out of date?
    solater
    @solater:i-c-quiche.com
    [m]
    I am attempting to integrate vkGetSemaphoreFdKHR into vulkano, which necessitates the device extension VK_KHR_external_semaphore_fd. When I try to call that function, I get the FeatureNotPresent error. I believe no features should be needed to call this function. However, I am not too familiar with the Vulkan documentation. Could someone help me confirm that using this vulkan function requires no extra feature to be enabled?
    solater
    @solater:i-c-quiche.com
    [m]
    Fixed it, I forgot that I needed to create the semaphore with the additional structure for export
    echo!
    @dotqurter
    Question: I've been trying to make a project that can use as many queues and such that are available for various tasks, but I haven't got it to work. How would I access the queues in the other families to do things?
    Greg Henry
    @GregoireHENRY
    Hello, I had to change a bit the examples of the guide (like mandlebrot) to make them work (after having read issue #1527).
    Do you want me to raise an issue with the codes updated or create a pull request?
    antonino
    @pac85_gitlab
    @Eliah-Lakhin hi. Regarding that thing about events. The api shares a lot with a barriers except that aside from specifying barriers you also specify ecents. Now instead of Copy and pasting UnsafeCommandBufferBuilderPipelineBarrier(or using macros ti do so)and adding methods to enable to add events I was thinking that I could have a different Struct just for events and when issuing a wait event command one could pass an instance of the new struct and an instance of UnsafeCommandBufferBuilderPipelineBarrier. The implementation would be neater but the api kind of breaks the pattern followed by the rest of vulkano. Which one do you think is best?