Hi,
I’m trying to get a couple of Vulkan images copied over to openGL (framebuffers backed by color images) so that I can submit them to OpenVR. It looks like I have everything confirmed working(*) but when I do the actual copy I’m getting “Access Violation reading location 0x0000000000000064”. The vulkan render loop is working in the same thread as the OpenGL context (but not the main thread) if that matters. (EDIT: it doesn’t)
Are there any limitations that I need to know about that would cause such a crash? i.e. Vulkan/OpenGL Image formats, layouts, etc.?
glDrawVkImageNV = (…) wglGetProcAddress(“glDrawVkImageNV”); // Successful
glDrawVkImageNV( (DTuint64) vki, 0, 0, 0, _width, _height, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F); // vki = VkImage, _width = 1512 & _height = 1680
Thanks!
Tod.
(*) Vulkan images confirmed with RenderDoc, OpenVR sees pre initialized textures just fine, Framebuffers are complete and I can glClear them just fine.
EDIT: It doesn’t appear related to be anything thread related. Also, the access violation location seems proportional to the VkImage index so there’s an array access there - it just seems like the base address is NULL-ish for some reason.
EDIT2: More details that are probably relevant. This is all on Windows. Normally, I’m using the Vulkan Swap chain for presenting to a window. However since OpenVR doesn’t accept VkImages I wrote a hacky conversion class. Basically it creates a second offscreen window with and OpenGL context on which I create framebuffers to render into (using the original vulkan window fails with an error). I’m trying to use these framebuffers as a target of glDrawVkImageNV. As an aside, how does glDrawVkImageNV know which vulkan device it’s dealing with? Could the fact I’m using 2 windows be the source of my issues?