Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Chehui Chou
    @deadshot465_gitlab
    Thank you
    matrixbot
    @matrixbot
    Ralith yep, that's the right pattern to follow
    Chehui Chou
    @deadshot465_gitlab
    But why does it work in debug builds though
    Shouldn't lifetime problems happen regardless of build mode?
    matrixbot
    @matrixbot
    Ralith dereferencing a dangling raw pointer is undefined behavior
    Ralith undefined behavior is, by definition, unpredictable
    Ralith it can do different things depending on compile mode, target environment, phase of moon, etc
    Chehui Chou
    @deadshot465_gitlab
    So it worked only because of...coincidence or the situation permits that?
    matrixbot
    @matrixbot
    Ralith undefined behavior doing what you intended by coincidence is common, yeah; typically followed by changing when you least expect it
    Mike Krasnenkov
    @agmike
    Hello. I'm trying to properly handle 1.2 features which reside in pNext chain, like VkPhysicalDeviceImagelessFramebufferFeatures. Is there a way to parse such chain returned by vulkan?
    Or do I need to walk through it manually
    I've seen internals such as ptr_chain_iter, but they are not exposed
    matrixbot
    @matrixbot
    Ralith vulkan never creates pNext chains
    Ralith it's up to you to construct them and pass them in
    Ralith otherwise the memory management situation would be a nightmare
    Mike Krasnenkov
    @agmike
    But isn't that how vkGetPhysicalDeviceProperties2 works?
    I would imagine the pointers are all pointing to static data somewhere in the driver
    it looks like vulkan-hpp provides the getters for them https://github.com/KhronosGroup/Vulkan-Hpp#structure-pointer-chains
    Mike Krasnenkov
    @agmike
    Aaah, I see, I got it all backwards
    So to get the properties and features I construct the chain and then vulkan fills it in.
    Mike Krasnenkov
    @agmike
    Well then, sorry for the disturbance :)
    matrixbot
    @matrixbot
    Ralith np
    Chehui Chou
    @deadshot465_gitlab
    What's the correct way to use extension methods like cmd_set_checkpoint_nv?
    Like for DebugUtils we can use ash::vk::extensions::DebugUtils, but it seems that I can't find similar thing for NVIDIA extensions, so right now I don't know how to use those extensions in ash...
    Chehui Chou
    @deadshot465_gitlab
    ash::vk::NvDeviceDiagnosticCheckpointsFn::cmd_set_checkpoint_nv takes &self and I don't know where to get that &self
    matrixbot
    @matrixbot
    Ralith functions that take &self are called methods; the &self comes from the value that you call them on
    Chehui Chou
    @deadshot465_gitlab
    Yes, I mean I didn't know how to get an instance of NvDeviceDiagnosticCheckpointsFn
    Thanks though
    Chehui Chou
    @deadshot465_gitlab
    Has anyone tried to compile and run their Vulkan applications on macOS recently? After it compiles, I tried to run it on macOS (both in x86_64 and via Rosetta 2), but whenever it reaches vkGetPhysicalDeviceFeatures I will get a segmentation fault. Not sure if it's a probelm in VulkanSDK for macOS, or a problem in ash.
    Chehui Chou
    @deadshot465_gitlab
    スクリーンショット 2020-12-05 8.24.14.png
    madmaxio
    @madmaxio
    There is metal backend there?
    Not vulkan
    Chehui Chou
    @deadshot465_gitlab
    It's MoltenVK
    Chehui Chou
    @deadshot465_gitlab
    Nevermind I found the culprit
    left_adjoint
    @leftadjoint
    Since an ash::Instance underlying value is a handle, is there some issue with adding an Eq implementation for it?
    MonkeyToiletLadder
    @MonkeyToiletLadder
    Is there any tutorials on how to use ash?
    Ralith
    @ralith:ralith.com
    [m]
    there are no meaningful differences from any other vulkan bindings
    refer to vulkan documentation
    MonkeyToiletLadder
    @MonkeyToiletLadder
    ok thanks
    MonkeyToiletLadder
    @MonkeyToiletLadder
    What are some prerequisites to using vulkan? Like should i learn basics of graphics modeling? What resources should i look over?
    vulkan is not a very good place to start learning from scratch unless you have a lot of patience
    MonkeyToiletLadder
    @MonkeyToiletLadder
    Thank you. Im going to try vulkan and if it doesnt work out ill pick up opengl
    MonkeyToiletLadder
    @MonkeyToiletLadder
    Yeah im switching to opengl myabe ill do vulkan when i have a grasped of graphics.
    Ralith
    @ralith:ralith.com
    [m]
    is there a reason we couldn't replace most/all raw pointers in structs with Option<&T>/Option<&mut T>?
    Ralith
    @ralith:ralith.com
    [m]
    that might make builders mostly unnecessary
    left_adjoint
    @leftadjoint
    Is there a way to pass an array of builders to builder arguments? I.E. pass an array of AttachmentReferenceBuilders to SubpassDescriptionBuilder's color_attachments method?
    Dereferencing individual arguments works fine, but arrays of builders don't dereference. Is there idiomatic way to do this without creating a new vec (which of course never lives long enough)?
    Ralith
    @ralith:ralith.com
    [m]
    call build()
    when constructing the array