Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    James Lucas
    @AtheMathmo

    I'm trying to complete the guide on the vulkano website --- the windowed part that's incomplete.

    I managed to figure out how to get vulkan to render to a winit window, but the performance is pretty poor on resizing. Is someone willing to take a look at my code and tell me what I'm doing wrong? :D

    https://gist.github.com/AtheMathmo/3fed0665400fd6850cf0d144bb9b9070

    James Lucas
    @AtheMathmo
    Just found this example: https://github.com/vulkano-rs/vulkano/blob/master/examples/src/bin/triangle.rs . I should be able to figure it out from here!
    Eric Trombly
    @etrombly
    this issue fixed my alignment problem vulkano-rs/vulkano#1111 . setting PointVk to#[repr(C, align(16))]
    left_adjoint
    @leftadjoint
    @etrombly there's an vulkano example for loading shaders at runtime here
    If you want to compile to spirv at runtime, check out shaderc-rs
    James Lucas
    @AtheMathmo

    I'm trying to put together a basic render pipeline but there's one thing (at least) that is still really tripping me up. I can't figure out how to handle my graphics pipelines. Sorry for message length.

    I've looked through all the examples now and took a lot of inspiration from them (especially the deferred rendering one). But I want to be able to draw multiple meshes and I can't figure out how to organize the pipelines.

    If I understand correctly, generally, each rendered mesh needs its own graphics pipeline as they may use different shaders. The pipeline may also need to be recreated if the window size changes. The teapot example says as much, but then uses .viewports_dynamic_scissors_irrelevant(1) which I think implies a dynamic viewport?

    Eric Trombly
    @etrombly
    Thank you, I ended up not needing the extension, but that should help in the future
    left_adjoint
    @leftadjoint
    @AtheMathmo I think what you're looking for is a "material system". If you want different materials, you can paramaterize your shaders by providing push constants and uniform buffers, for example.
    3 replies
    antonino
    @pac85_gitlab
    I'm trying to load mip maps into an unitialized image, the ImmutableImageInitialization object can only be used once and copy_image_to_buffer only copies one mip_map level. How am I supposed to load all of them?
    Eliah Lakhin
    @eliah_lakhin_twitter
    antonino
    @pac85_gitlab

    @pac85_gitlab I think this function might be helpful: https://docs.rs/vulkano/0.19.0/vulkano/command_buffer/struct.AutoCommandBufferBuilder.html#method.copy_image_to_buffer_dimensions

    that only allows me to copy one mip level as I said, that won't do beacuse after that I can't write to the image any more

    antonino
    @pac85_gitlab
    I've noticed that commits suddently stoppeted on the 12th of June, is everything alright with the project?
    Alexandre Kawan
    @AlexandreKawan
    I am a complete beginner in graphics programming, I want to learn vulkan and vulkano, do you have any suggestion of how to learn it in an efficient way, guys?
    Eliah Lakhin
    @eliah_lakhin_twitter

    I've noticed that commits suddently stoppeted on the 12th of June, is everything alright with the project?

    @pac85_gitlab Well, I'm not a maintainer of the project, just an active user and a minor contributor. @AustinJ235 has disappeared, unfortunately. I didn't see any activity in his own projects too for the past time. Hopefully, he will get back, but in worst case I think we can ask Tomaka to assign another one maintainer, or maybe even do our own fork. But in this moment there are no urgent PR pendings or bugs to be fixed urgently. The codebase is quite stable.

    @AlexandreKawan It depends on the tasks that you want to work. I would suggest to start from the practical things, something you want to implement. The repo examples and the Guide were very helpful for me when I start learning this stuff.
    Zacxalot
    @Zacxalot
    Hey @AlexandreKawan I've just started learning too, I've been going through the guide for the last few days and it's been really good so far!
    Roy Wellington Ⅳ
    @thanatos
    Hi; is there a reason there is no bind_descriptor_sets on an AutoCommandBufferBuilder?
    Roy Wellington Ⅳ
    @thanatos
    Oh, I'm supposed to pass them straight to .draw*
    Cosmic Chip Socket
    @cosmicchipsocket
    Hi all, I'm trying to get a vulkano renderer working in my engine (currently there's a glium renderer, but texture switches are very slow so I'm hoping vulkano will give a nice boost). I'm in the process of getting a swapchain working. I used the triangle example code as a reference for this. Unfortunately, when I call into vulkano::swapchain::acquire_next_image(), my entire desktop freezes for a few seconds and then it errors with "no image is available for acquiring yet". Then I have to kill the process manually, which freezes my desktop for several seconds again, despite it being a panic. How should I go about troubleshooting this?
    Cosmic Chip Socket
    @cosmicchipsocket
    Got the validation layer running. When I create the swapchain, I get: vkCreateSwapchainKHR(): pCreateInfo->surface is not known at this time to be supported for presentation by this device. The vkGetPhysicalDeviceSurfaceSupportKHR() must be called beforehand, and it must return VK_TRUE support with this surface for at least one queue family of this device.
    Even though I am filtering on family.supports_graphics() and using khr_swapchain: true
    Looks like I was calling present before drawing anything oops
    It's no longer locking up and erroring, but I am still getting the Vulkan validation error above
    Cosmic Chip Socket
    @cosmicchipsocket
    Slowly figuring this out thanks to the validation layer
    Cosmic Chip Socket
    @cosmicchipsocket
    Any love for vulkano-rs/vulkano#994 ? Need it so I can use vulkano with my engine which uses SDL2
    Cosmic Chip Socket
    @cosmicchipsocket
    Using a workaround for now
    VimHax
    @VimHax
    How can I make it so that the triangle, in the triangle example, won't stretch when the size of the window is changed?
    VimHax
    @VimHax
    Nevermind, it has to do with aspect ratios and I think what I need to do is to transform the points correctly based on the ratio of width to height and then draw them.
    Cosmic Chip Socket
    @cosmicchipsocket
    You'll want to compute a new transform matrix when you handle window resizing, and use that as the basis for further transforms, and then pass that into your vertex shader
    antonino
    @pac85_gitlab
    Why is attachmentImage sharing mode hardcoded to exclusive?
    carado
    @carado
    hi;
    https://github.com/vulkano-rs/vulkano/blob/master/vulkano/src/pipeline/vertex/vertex.rs
    based on this, it seems like not only is vertex correspondence only checked by size, but this logic can't actually account for vertex conversion ? (like [i8; 3] → ivec3)
    Eliah Lakhin
    @eliah_lakhin_twitter
    @pac85_gitlab Are there any advantages in using Concurrent sharing?
    LastExceed
    @LastExceed
    hello, im following the guide. the moment i add vulkano-shaders to my cargo.toml i get this compile error: https://hastebin.com/quniwuyicu . any ideas?
    Ella-0
    @Ella-0
    Yea, to build shaderc you need to have cmake installed and that log doesn't look like you have.
    LastExceed
    @LastExceed
    i realized it was not in my PATH. i added it, then it asked to python, so i installed that, and now its asking for yet another thing. isn't the whole point of cargo to not have to do all this manually ?
    LastExceed
    @LastExceed

    anyway, the new error is

    no valid generator found for GNU toolchain; MSYS or MinGW must be installed

    so i googled those things (i dont even know what they are) and honestly im completely lost

    Ella-0
    @Ella-0
    It's looking for a c compiler
    LastExceed
    @LastExceed

    after several hours of troubleshooting various compile errors i switched to linux where everything just worked immediately.

    new problem: i'm getting this runtime error:

    Device extension "khr_storage_buffer_storage_class" required

    when running the compute example from the guide. what do ?

    Eric Trombly
    @etrombly
    // Now initializing the device.
    let (device, mut queues) = Device::new(
    physical,
    physical.supported_features(),
    &DeviceExtensions {
    khr_storage_buffer_storage_class: true,
    ..DeviceExtensions::none()
    },
    [(queue_family, 0.5)].iter().cloned(),
    )
    .unwrap();
    I'm assuming you're doing a compute shader, since you're using a storage buffer
    LastExceed
    @LastExceed
    that worked, thanks. so i guess the guide is outdated ?
    Eric Trombly
    @etrombly
    probably, I just used that example when I was starting out
    Faule Socke
    @faulesocke
    is loading shaders at runtime already implemented?
    Faule Socke
    @faulesocke
    I started implementing it a year ago and before I continue I wanted to make sure nobody else has already done it ;)
    Eliah Lakhin
    @eliah_lakhin_twitter
    @faulesocke If I not mistaken the only existing way of loading shaders in runtime is through unsafe code atm: https://github.com/vulkano-rs/vulkano/blob/master/examples/src/bin/runtime-shader/main.rs
    Kyle Rosenberg
    @OrangeDrangon

    Hey I was wondering how to construct a type for a pipeline object I was storing on a struct? Is there an example of this somewhere I can study? I am currently using
    pipeline: Arc<dyn GraphicsPipelineAbstract + Send + Sync>,

    This looses the type of the vertex it was constructed with when stored to the struct causing errors when I go to pass in my vertex buffer to a draw call. If someone could point me in the right direction that would be awesome.

    Thanks

    Kyle Rosenberg
    @OrangeDrangon
    I currently solved it with
    vec![Arc::new(vertex_buffer)],
    when passing the buffer into the draw call
    Cosmic Chip Socket
    @cosmicchipsocket
    Has there been any progress on any easily embeddable runtime-compiled shaders that can be used in both glium and vulkano? I'd like to be able to convert GLSL to SPIR-V as it's loaded (the GLSL files are data files included in a .zip file, loaded at runtime because this is a game engine and it's more flexible this way). But shaderc is absolutely massive (500 MiB apparently for a build), and I don't currently see any up-to-date projects to get glslang embedded, or any pure Rust implementations? There's the "glsl" crate but I don't think this goes all the way to SPIR-V yet. Surely there's a better way?