gpt4 book ai didi

why would vulkan graphics not work despite vulkan compute working?(为什么在Vulkan计算机工作的情况下,Vulkan显卡不能工作?)

转载 作者:bug小助手 更新时间:2023-10-26 20:10:17 27 4
gpt4 key购买 nike



When I run vkcube, I get this:

当我运行vkcube时,我得到这样的结果:


Selected GPU 0: NVIDIA GeForce RTX 4070, type: DiscreteGpu
Could not find both graphics and present queues

But when I run vulkaninfo --summary, I get this:

但是当我运行Common kaninfo时--总结,我得到的是:


==========
VULKANINFO
==========

Vulkan Instance Version: 1.3.261


Instance Extensions: count = 20
-------------------------------
VK_EXT_acquire_drm_display : extension revision 1
VK_EXT_acquire_xlib_display : extension revision 1
VK_EXT_debug_report : extension revision 10
VK_EXT_debug_utils : extension revision 2
VK_EXT_direct_mode_display : extension revision 1
VK_EXT_display_surface_counter : extension revision 1
VK_KHR_device_group_creation : extension revision 1
VK_KHR_display : extension revision 23
VK_KHR_external_fence_capabilities : extension revision 1
VK_KHR_external_memory_capabilities : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2 : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2 : extension revision 1
VK_KHR_portability_enumeration : extension revision 1
VK_KHR_surface : extension revision 25
VK_KHR_surface_protected_capabilities : extension revision 1
VK_KHR_xcb_surface : extension revision 6
VK_KHR_xlib_surface : extension revision 6
VK_LUNARG_direct_driver_loading : extension revision 1

Instance Layers: count = 2
--------------------------
VK_LAYER_KHRONOS_validation Khronos Validation Layer 1.3.261 version 1
VK_LAYER_NV_optimus NVIDIA Optimus layer 1.3.242 version 1

Devices:
========
GPU0:
apiVersion = 1.3.242
driverVersion = 535.104.5.0
vendorID = 0x10de
deviceID = 0x2786
deviceType = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
deviceName = NVIDIA GeForce RTX 4070
driverID = DRIVER_ID_NVIDIA_PROPRIETARY
driverName = NVIDIA
driverInfo = 535.104.05
conformanceVersion = 1.3.5.0
deviceUUID = 73a71b25-954b-86b1-c8fa-48e86f00e0d8
driverUUID = 0415fb4e-e904-5af7-8fad-a705dd68f35e

And furthermore, I can query my physical device queue flag bits in a c++ vulkan application and I get this output:

此外,我可以在c++ vulkan应用程序中查询我的物理设备队列标志位,并得到以下输出:


queue family 0:
VK_QUEUE_GRAPHICS_BIT
VK_QUEUE_COMPUTE_BIT
VK_QUEUE_TRANSFER_BIT
VK_QUEUE_SPARSE_BINDING_BIT
queue family 1:
VK_QUEUE_TRANSFER_BIT
VK_QUEUE_SPARSE_BINDING_BIT
queue family 2:
VK_QUEUE_COMPUTE_BIT
VK_QUEUE_TRANSFER_BIT
VK_QUEUE_SPARSE_BINDING_BIT
queue family 3:
VK_QUEUE_TRANSFER_BIT
VK_QUEUE_SPARSE_BINDING_BIT
VK_QUEUE_VIDEO_DECODE_BIT_KHR
queue family 4:
VK_QUEUE_TRANSFER_BIT
VK_QUEUE_SPARSE_BINDING_BIT
VK_QUEUE_OPTICAL_FLOW_BIT_NV

It seems like I should be able to run Vulkan apps, but my queues are not good for my surfaces. I am running Gentoo Linux with xlib/xcb.

看起来我应该可以运行Vulkan应用程序,但我的队列对我的表面不好。我正在运行带有xlib/xcb的Gentoo Linux。


Compute shaders work, I have verified this using https://github.com/SaschaWillems/Vulkan:

计算着色器可以工作,我已经使用https://github.com/SaschaWillems/Vulkan:进行了验证


$ ./build/bin/computeheadless 
Running headless compute example
GPU: NVIDIA GeForce RTX 4070
Compute input:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1
5 16 17 18 19 20 21 22 23 24 25 26 27 28 29 3
0 31
Compute output:
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377
610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 5142
29 832040 1346269
Finished. Press enter to terminate...

but, again, when I try a graphics example...

但是,再说一次,当我尝试一个图形示例时。


$ ./build/bin/triangle 
Could not find a graphics and/or presenting queue!

In my app, I was using GLFW to get a window. So next I tried getting the surface directly from XCB, and I get the same message from the validation layers:

在我的应用程序中,我使用GLFW获得了一个窗口。因此,接下来我尝试直接从XCB获取表面,并从验证层获得相同的消息:


VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-06211(ERROR / SPEC): 
msgNum:
301859828 - Validation Error:
[ VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-06211 ] Object 0: handle = 0x55ccc31578d0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE;
| MessageID = 0x11fe03f4 |
vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): surface is not supported by the physicalDevice.
The Vulkan spec states: surface must be supported by physicalDevice, as reported by vkGetPhysicalDeviceSurfaceSupportKHR or an equivalent platform-specific mechanism
(https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-surface-06211)
Objects: 1 [0] 0x55ccc31578d0, type: 2, name: NULL

This looks like some kind bad interaction with the windowing system but I am out of ideas for now. What could be going wrong, and what else can I try?

这看起来像是与窗口系统的某种不良交互,但我目前没有想法。可能会出什么问题,我还能尝试什么?


更多回答

I mean, is the display connected to this GPU? Some linux distros do not support display migration out of the box...

我的意思是,显示器连接到这个图形处理器了吗?一些Linux发行版不支持开箱即用的显示迁移...

The display is connected to this GPU. Actually there are 3 displays connected to it, and 1 integrated intel gpu that isn't connected to anything. Maybe that has something to do with it? Anyway, I wound up going around the problem (needed to visualize cuda arrays, just used opengl-cuda interop). So the Vulkan thing is still a mystery.

显示器已连接到此GPU。实际上,有3个显示器连接到它,1个集成的英特尔图形处理器没有连接到任何东西。也许这和这件事有关?无论如何,我最终绕过了这个问题(需要可视化Cuda数组,只使用了OpenGL-Cuda互操作)。所以Vulkan的事情仍然是个谜。

优秀答案推荐
更多回答

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com