简体   繁体   English

如果没有VK_KHR_swapchain扩展名,如何运行Vulkan API?

[英]How do I run the Vulkan API if I have no VK_KHR_swapchain extension?

I am on Windows 10, my GPU is GTX 880M. 我在Windows 10上,我的GPU是GTX 880M。 When I use vkEnumerateInstanceExtensionProperties to get supported extensions all I get is: 当我使用vkEnumerateInstanceExtensionProperties获取受支持的扩展时,我得到的是:

"VK_KHR_surface" “VK_KHR_surface”
"VK_KHR_win32_surface" “VK_KHR_win32_surface”
"VK_EXT_debug_report" “VK_EXT_debug_report”

However I have no "VK_KHR_swapchain" and if I try to enable "VK_KHR_swapchain" at instance creation, it just hangs. 但是,我没有“ VK_KHR_swapchain”,如果我尝试在实例创建时启用“ VK_KHR_swapchain”,它将挂起。

Without "VK_KHR_swapchain" however, I can't create a swap chain, my debug callback from the validation layer gets called with this message: 但是,如果没有“ VK_KHR_swapchain”,我将无法创建交换链,来自验证层的调试回调将通过以下消息进行调用:

"Attemped to call vkCreateSwapchainKHR() but its required extension VK_KHR_swapchain has not been enabled\\n" “尝试调用vkCreateSwapchainKHR(),但尚未启用其必需的扩展名VK_KHR_swapchain \\ n”

I can run games with Vulkan enabled just fine, as well as run the Cube demo from the Vulkan SDK, so there has to be some way I can create a Swapchain and render, right? 我可以在启用了Vulkan的情况下运行游戏,也可以从Vulkan SDK运行Cube演示,因此必须有某种方法可以创建Swapchain和渲染,对吗?

Or is there some kind of hack that has to be employed when a GPU doesn't have that extension? 还是在GPU没有扩展功能的情况下需要采用某种技巧?

VK_KHR_swapchain is a device extension , not an instance extension. VK_KHR_swapchain设备扩展 ,而不是实例扩展。 So you need to add it at device creation level instead. 因此,您需要在设备创建级别添加它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么在使用 VK_PRESENT_MODE_FIFO_KHR 呈现模式调整交换链图像大小时出现白色闪烁? - Why I got white blinking while resizing resizing the images of the swapchain with VK_PRESENT_MODE_FIFO_KHR present mode? VK_KHR_WIN32_SURFACE_EXTENSION_NAME 未定义,在 Vulkan 代码中 - VK_KHR_WIN32_SURFACE_EXTENSION_NAME undefined, in Vulkan code 如果扩展是核心扩展,我如何签入 Vulkan 代码? - How can i check in Vulkan code if extension is core extension? (Vulkan)当 VK_PRESENT_MODE_FIFO_KHR 选择当前模式时,vkAcquireNextImageKHR 需要很长时间 - (Vulkan) vkAcquireNextImageKHR takes so long when VK_PRESENT_MODE_FIFO_KHR choosen for present mode Vulkan 验证错误表明我的图像布局错误,但只有两次我第一次呈现来自交换链的图像 - Vulkan validation errors states my images are in the wrong layout, but only the two first times I present images from the swapchain 如何使用 CLion 设置 Vulkan 开发环境? - How do I setup a Vulkan dev environment with CLion? 如何在C ++中运行我有一个指针的函数? - How do I run a function that I have a pointer to in C++? Oculus Rift / Vulkan:使用计算着色器写入交换链 - Oculus Rift / Vulkan : Write to swapchain with a compute shader 如何在MinGW中使用Vulkan? (R_X86_64_32错误) - How do I use Vulkan with MinGW? (R_X86_64_32 error) 我可以以更“类似 Cpp 绑定”的方式加载 vulkan 扩展吗 - Can I load vulkan extension in more "Cpp-binding-like" way
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM