-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create_render_pass causes validation errors, eventual crash #7
Comments
Sorry about the code formatting! Another go:
|
At the last line, you use |
Thank you very much for your help, both with my typo and general Julia
errors. I'm now able to create a render pass and framebuffer for the swap
chain. I haven't gone much farther, but when I exit Julia I get a message:
error in running finalizer: UndefVarError(var=:allocator)
jl_undefined_var_error at
/buildworker/worker/package_linux64/build/src/rtutils.c:132
jl_get_binding_or_error at
/buildworker/worker/package_linux64/build/src/module.c:363
#821 at
/home/moore/.julia/packages/Vulkan/WnbP2/generated/vulkan_wrapper.jl:10200
I'm not sure if you're interested in that or not.
I see that you also, have a VulkanExamples.jl repo; is that a good model to
follow?
Thanks again,
Tim
…On Thu, Apr 15, 2021 at 4:24 PM Cédric Belmant ***@***.***> wrote:
At the last line, you use SubpassDescription (the type) and not the
variable subpassDescription that you defined.
The fact that it errors hints me that you use Vulkan with using Vulkan,
but still prefix all symbols with VK. You may want to import Vulkan
instead if you prefer not to have all the exported symbols into your module
scope.
You can quickly see it from the validation layers; it is complaining that
the subpass description does not contain valid fields, which hints that the
array of subpass descriptions is not correct.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABAQAL2TX74AWDN4DIRLP3TI3ZJRANCNFSM427NJQIQ>
.
|
Ah, that is a bug in the wrapper. Thanks for reporting it, I'll open a new issue to track it. |
Hi,
Experienced graphics engineer, Julia newbie here.
My code that calls create_render_pass doesn't work and eventually causes a segfault. With the validation layer enabled, I get a ton of messages like:
VUID-VkSubpassDescription-flags-parameter(ERROR / SPEC): msgNum: 1258039040 - Validation Error: [ VUID-VkSubpassDescription-flags-parameter ] Object 0: handle = 0x255c658, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x4afc2700 | vkCreateRenderPass: value of pCreateInfo->pSubpasses[0].flags contains flag bits that are not recognized members of VkSubpassDescriptionFlagBits The Vulkan spec states: flags must be a valid combination of VkSubpassDescriptionFlagBits values (https://vulkan.lunarg.com/doc/view/1.2.170.0/linux/1.2-extensions/vkspec.html#VUID-VkSubpassDescription-flags-parameter)
Objects: 1
[0] 0x255c658, type: 3, name: NULL
VUID-VkSubpassDescription-pipelineBindPoint-parameter(ERROR / SPEC): msgNum: -93556066 - Validation Error: [ VUID-VkSubpassDescription-pipelineBindPoint-parameter ] Object 0: handle = 0x255c658, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xfa6c729e | vkCreateRenderPass: value of pCreateInfo->pSubpasses[0].pipelineBindPoint (32557) does not fall within the begin..end range of the core VkPipelineBindPoint enumeration tokens and is not an extension added token. The Vulkan spec states: pipelineBindPoint must be a valid VkPipelineBindPoint value (https://vulkan.lunarg.com/doc/view/1.2.170.0/linux/1.2-extensions/vkspec.html#VUID-VkSubpassDescription-pipelineBindPoint-parameter)
This leads me to believe that the proper C struct isn't being passed to Vulkan. This is my function: am I doing something wrong?
function createSimpleRenderpass(vDevice::VulkanDevice, colorFormat, depthFormat, colorFinalLayout) colorAttachmentDesc = VK.AttachmentDescription( colorFormat, VK.SAMPLE_COUNT_1_BIT, VK.VK_ATTACHMENT_LOAD_OP_CLEAR, VK.VK_ATTACHMENT_STORE_OP_STORE, VK.VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK.VK_ATTACHMENT_STORE_OP_DONT_CARE, VK.VK_IMAGE_LAYOUT_UNDEFINED, colorFinalLayout) depthAttachmentDesc = VK.AttachmentDescription( depthFormat, VK.SAMPLE_COUNT_1_BIT, VK.VK_ATTACHMENT_LOAD_OP_CLEAR, VK.VK_ATTACHMENT_STORE_OP_STORE, VK.VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK.VK_ATTACHMENT_STORE_OP_DONT_CARE, VK.VK_IMAGE_LAYOUT_UNDEFINED, VK.VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL) colorReference = VK.AttachmentReference(0, VK.VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL) depthReference = VK.AttachmentReference(1, VK.VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL) println("colorReference: $colorReference") println("depthReference: $depthReference") subpassDescription = VK.SubpassDescription( VK.VK_PIPELINE_BIND_POINT_GRAPHICS, [], [colorReference],[], resolve_attachments = [], depth_stencil_attachment = depthReference) println("SubpassDescription: $SubpassDescription") subpassDependencies = [ VK.SubpassDependency( VK.VK_SUBPASS_EXTERNAL, 0, VK.PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, VK.PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, src_access_mask = VK.VK_ACCESS_MEMORY_READ_BIT, dst_access_mask = VK.VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK.VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, dependency_flags = VK.VK_DEPENDENCY_BY_REGION_BIT), VK.SubpassDependency( 0, VK.VK_SUBPASS_EXTERNAL, VK.PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK.PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, src_access_mask = VK.VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK.VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, dst_access_mask = VK.VK_ACCESS_MEMORY_READ_BIT, dependency_flags = VK.VK_DEPENDENCY_BY_REGION_BIT)] println("subpassDependencies: $subpassDependencies") unwrap(VK.create_render_pass( vDevice.device, VK.RenderPassCreateInfo([colorAttachmentDesc, depthAttachmentDesc], [SubpassDescription], subpassDependencies))) end
The text was updated successfully, but these errors were encountered: