X11 上的 Vulkan:vkGetPhysicalDeviceSurfaceCapabilitiesKHR 错误 [英] Vulkan on X11: vkGetPhysicalDeviceSurfaceCapabilitiesKHR error

查看:47
本文介绍了X11 上的 Vulkan:vkGetPhysicalDeviceSurfaceCapabilitiesKHR 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让 Vulkan 在 X11 下运行.

I am trying to get Vulkan running under X11.

我(显然)成功创建了一个实例、设备和表面,并且与表面相关的几个调用也成功了,甚至返回了合理的值(例如 vkGetPhysicalDeviceSurfaceFormatsKHR 返回两种格式).但是,当我调用 vkGetPhysicalDeviceSurfaceCapabilitiesKHR 时,我得到以下信息:

I have (apparently) successfully created an instance, device and surface, and several calls relating to the surface also succeed, and even return reasonable values (for example vkGetPhysicalDeviceSurfaceFormatsKHR returns two formats). However, when I call vkGetPhysicalDeviceSurfaceCapabilitiesKHR, I get the following:

X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  14 (X_GetGeometry)
  Resource id in failed request:  0x5800009
  Serial number of failed request:  42
  Current serial number in output stream:  42

X11 窗口是 0x5800009,如错误中所述.我正在使用 Vulkan SDK 1.0.5 和 Nvidia 364.12 驱动程序(如果相关).

The X11 Window is 0x5800009, as referenced in the error. I am using Vulkan SDK 1.0.5, and Nvidia 364.12 drivers (if that is relevant).

推荐答案

基于 Vulkan 正在查询有关尚未创建的 Window 的某些信息的预感,我放置了一个 XSync(<display>, false) 在此之前调用,这似乎解决了问题.

On the hunch that Vulkan was querying something about the Window that had not yet been created, I put a XSync(<display>, false) call before this one, and that seems to have solved the issue.

我不确定这是否是正确操作所必需的(我不是 X11 专家),或者这是否是 Vulkan 本身的问题.如果有人有更好的解释,我很乐意听到.

I am not sure whether this is required for proper operation (I am not an X11 expert), or whether this is an issue with Vulkan itself. If somebody has a better explanation, I would love to hear it.

这篇关于X11 上的 Vulkan:vkGetPhysicalDeviceSurfaceCapabilitiesKHR 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆