vulkan-tutorial-rs icon indicating copy to clipboard operation
vulkan-tutorial-rs copied to clipboard

28 generating mipmaps

Open matthew-russo opened this issue 6 years ago • 2 comments

As noted in the README there are some Validation Layer issues with this but I dont have any solutions. This issue describes the same thing at the end: https://github.com/vulkano-rs/vulkano/issues/989. Essentially when blitting and the destination and source are the same, the image layout is properly transitioned.

I was experimenting with UnsafeCommandBufferBuilder and manually creating the memory barriers and image transitions but ran into a lot of issues because I also then needed to manually synchronize and submit everything, bypassing all of the nice abstractions that Vulkano has provided and I didn't include any of that. It didn't seem worth it as its not the point of Vulkano and if I'm going to be rewriting/implementing some of these core building blocks I'd rather just spend the time working on Vulkano itself itself and get it to a point where we can idiomatically handle cases like this. I linked to Ash and their version of this tutorial so users can see what a more direct 1-1 translation of this would look like in Rust.

Let me know any feedback on this, whether you think we should figure out our own abstraction on the lower level building blocks, etc. etc. And as with the other PRs, I haven't tested on mac yet. I'm planning on getting the last section, multisampling, in and then giving it a full test sweep on Windows and Mac (and maybe a few linux flavors if I'm motivated). I started running everything through Clippy and only some internal macro stuff is getting tagged.

matthew-russo avatar Feb 11 '19 03:02 matthew-russo

I will think about these issues when I get here (I'll go through the tutorial as I review and merge the previous ones). About clippy: I just merged a Github Action that runs clippy, but allows that macro issue since I didn't find a way to fix it.

bwasty avatar Feb 11 '19 06:02 bwasty

I'm new to rust but it seems that the from_buffer method of the ImmutableImage have an implementation of mipmaps - could this be used? https://github.com/vulkano-rs/vulkano/blob/v0.21.0/vulkano/src/image/immutable.rs#L351

mortzdk avatar Mar 24 '21 06:03 mortzdk