&[u8]
but I don't know how to convert my own struct to an &[u8]
cargo build --release
to make a release build, and suddenly there are tons of error messages about RenderPass and GraphicsPipelines
[2020-09-20T17:52:55Z ERROR demo_game_rs::game::graphics::vk::graphics] Validation Error: [ VUID-VkRenderPassCreateInfo-attachment-00834 ] Object 0: handle = 0x16629e6ed68, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfca478c2 | Resolve: vkCreateRenderPass() attachment 38 must be less than the total number of attachments 3. The Vulkan spec states: If the attachment member of any element of pInputAttachments, pColorAttachments, pResolveAttachments or pDepthStencilAttachment, or any element of pPreserveAttachments in any element of pSubpasses is not VK_ATTACHMENT_UNUSED, it must be less than attachmentCount (https://vulkan.lunarg.com/doc/view/1.2.148.0/windows/1.2-extensions/vkspec.html#VUID-VkRenderPassCreateInfo-attachment-00834)
Ralith
a typical cause would be passing references to temporaries which no longer exist
build()
and making sure references exist until the structure is created everything works fine now
Ralith
undefined behavior is, by definition, unpredictable
Ralith
it can do different things depending on compile mode, target environment, phase of moon, etc
Ralith
it's up to you to construct them and pass them in
Ralith
otherwise the memory management situation would be a nightmare
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...
vkGetPhysicalDeviceFeatures
I will get a segmentation fault. Not sure if it's a probelm in VulkanSDK for macOS, or a problem in ash
.