question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vulkan surface creation error

See original GitHub issue

using glfw.create_window_surface I get an error:

ctypes.ArgumentError: argument 1: <class ‘TypeError’>: wrong type

argument 1 is the vulkan instance and mine was created as it should : <cdata 'struct VkInstance_T *' 0x0000022EF5F83520>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
okuma10commented, Jul 10, 2020

yes it works now! Thank you for addressing this so quickly!

0reactions
FlorianRhiemcommented, Jul 10, 2020

I have just released pyGLFW1.12.0 which contains some utilities for working with CFFI based Vulkan wrappers. You can now do the following:

surface_ptr = ffi.new('VkSurfaceKHR[1]')
glfw.create_window_surface(instance, window, None, surface_ptr)
surface = surface_ptr[0]

and pyGLFW will automatically convert the CFFI pointers to ctypes pointers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vulkan create VK_KHR_surface error - Stack Overflow
I have created window with GLFW and initialized Vulkan instance without errors. But Vulkan fails to create VKSurfaceKHR. bool ...
Read more >
GLFW / Vulkan init error - dev
If Vulkan is available but no set of extensions allowing window surface creation was found, this function returns NULL. You may still use...
Read more >
Trouble creating surface with SDL2 : r/vulkan - Reddit
It looks like the surface creation fails if vkCreateWin32SurfaceKHR fails to load using vkGetInstanceProcAddr . When you call this function ...
Read more >
Window surface - Vulkan Tutorial
The window surface needs to be created right after the instance creation, because it can actually influence the physical device selection. The reason...
Read more >
1134001 - ozone/wayland: Failed to create vulkan surface.
Issue 1134001: ozone/wayland: Failed to create vulkan surface. ... vulkan surface is created and compositing is hardware accelerated
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found