I am using an i.MX8M Plus SOM from Variscite. The BSP includes the Vulkan recipes (Vulkan, Vulkan-tools, etc..) by default and libvulkan.so is located in /usr/lib/. If I run "ldconfig -p" on the command line, the Vulkan libraries are present in the cache. Unfortunately, when I run vulkaninfo I get "-sh: vulkaninfo: command not found." Are there steps I need to take to make these libraries available for use?
Thanks
Hi @AB22
I tried on i.MX8MP EVK with prebuild full image.
root@imx8mpevk:~# vulkaninfo
'DISPLAY' environment variable not set... skipping surface info
==========
VULKANINFO
==========
Vulkan Instance Version: 1.2.182
Instance Extensions: count = 10
===============================
VK_EXT_debug_report : extension revision 10
VK_EXT_debug_utils : extension revision 2
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_physical_device_properties2 : extension revision 2
VK_KHR_surface : extension revision 25
VK_KHR_wayland_surface : extension revision 6
Layers: count = 3
=================
VK_LAYER_KHRONOS_validation (Khronos Validation Layer) Vulkan version 1.2.182, layer version 1:
Layer Extensions: count = 3
VK_EXT_debug_report : extension revision 9
VK_EXT_debug_utils : extension revision 1
VK_EXT_validation_features : extension revision 2
Devices: count = 1
GPU id = 0 (VeriSilicon )
Layer-Device Extensions: count = 3
VK_EXT_debug_marker : extension revision 4
VK_EXT_tooling_info : extension revision 1
VK_EXT_validation_cache : extension revision 1
VK_LAYER_LUNARG_gfxreconstruct (GFXReconstruct Capture Layer Version 0.9.8-dev) Vulkan version 1.2.182, layer version 36872:
Layer Extensions: count = 0
Devices: count = 1
GPU id = 0 (VeriSilicon )
Layer-Device Extensions: count = 1
VK_EXT_tooling_info : extension revision 1
VK_LAYER_RENDERDOC_Capture (Debugging capture layer for RenderDoc) Vulkan version 1.2.131, layer version 17:
Layer Extensions: count = 1
VK_EXT_debug_utils : extension revision 1
Devices: count = 1
GPU id = 0 (VeriSilicon )
Layer-Device Extensions: count = 2
VK_EXT_debug_marker : extension revision 4
VK_EXT_tooling_info : extension revision 1
Presentable Surfaces:
=====================
GPU id : 0 (VeriSilicon
Surface type = VK_KHR_wayland_surface
Formats: count = 5
SurfaceFormat[0]:
format = FORMAT_R8G8B8A8_UNORM
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[1]:
format = FORMAT_R8G8B8A8_SRGB
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[2]:
format = FORMAT_B8G8R8A8_UNORM
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[3]:
format = FORMAT_B8G8R8A8_SRGB
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[4]:
format = FORMAT_R5G6B5_UNORM_PACK16
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
Present Modes: count = 2
PRESENT_MODE_MAILBOX_KHR
PRESENT_MODE_FIFO_KHR
VkSurfaceCapabilitiesKHR:
-------------------------
minImageCount = 1
maxImageCount = 8
currentExtent:
width = 4294967295
height = 4294967295
minImageExtent:
width = 1
height = 1
maxImageExtent:
width = 4294967295
height = 4294967295
maxImageArrayLayers = 1
supportedTransforms: count = 1
SURFACE_TRANSFORM_IDENTITY_BIT_KHR
currentTransform = SURFACE_TRANSFORM_IDENTITY_BIT_KHR
supportedCompositeAlpha: count = 2
COMPOSITE_ALPHA_OPAQUE_BIT_KHR
COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR
supportedUsageFlags: count = 4
IMAGE_USAGE_TRANSFER_SRC_BIT
IMAGE_USAGE_TRANSFER_DST_BIT
IMAGE_USAGE_SAMPLED_BIT
IMAGE_USAGE_COLOR_ATTACHMENT_BIT
Device Groups:
==============
Group 0:
Properties:
physicalDevices: count = 1
VeriSilicon (ID: 0)
subsetAllocation = 0
Present Capabilities:
VeriSilicon (ID: 0):
Can present images from the following devices: count = 1
Present modes: count = 1
DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR
Device Properties and Extensions:
=================================
GPU0:
VkPhysicalDeviceProperties:
---------------------------
apiVersion = 4202496 (1.2.0)
driverVersion = 25182219 (0x180400b)
vendorID = 0x10002
deviceID = 0x70006204
deviceType = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
deviceName = VeriSilicon
pipelineCacheUUID = 04620070-7d09-47bb-b5d1-0ac5c5b13c85
VkPhysicalDeviceLimits:
-----------------------
maxImageDimension1D = 8192
maxImageDimension2D = 8192
maxImageDimension3D = 512
maxImageDimensionCube = 8192
maxImageArrayLayers = 512
maxTexelBufferElements = 65536
maxUniformBufferRange = 16384
maxStorageBufferRange = 134217728
maxPushConstantsSize = 128
maxMemoryAllocationCount = 4096
maxSamplerAllocationCount = 4000
bufferImageGranularity = 0x00001000
sparseAddressSpaceSize = 0x00000000
maxBoundDescriptorSets = 4
maxPerStageDescriptorSamplers = 16
maxPerStageDescriptorUniformBuffers = 12
maxPerStageDescriptorStorageBuffers = 4
maxPerStageDescriptorSampledImages = 16
maxPerStageDescriptorStorageImages = 4
maxPerStageDescriptorInputAttachments = 4
maxPerStageResources = 128
maxDescriptorSetSamplers = 48
maxDescriptorSetUniformBuffers = 36
maxDescriptorSetUniformBuffersDynamic = 8
maxDescriptorSetStorageBuffers = 12
maxDescriptorSetStorageBuffersDynamic = 4
maxDescriptorSetSampledImages = 48
maxDescriptorSetStorageImages = 12
maxDescriptorSetInputAttachments = 4
maxVertexInputAttributes = 16
maxVertexInputBindings = 16
maxVertexInputAttributeOffset = 2047
maxVertexInputBindingStride = 2048
maxVertexOutputComponents = 68
maxTessellationGenerationLevel = 0
maxTessellationPatchSize = 0
maxTessellationControlPerVertexInputComponents = 0
maxTessellationControlPerVertexOutputComponents = 0
maxTessellationControlPerPatchOutputComponents = 0
maxTessellationControlTotalOutputComponents = 0
maxTessellationEvaluationInputComponents = 0
maxTessellationEvaluationOutputComponents = 0
maxGeometryShaderInvocations = 0
maxGeometryInputComponents = 0
maxGeometryOutputComponents = 0
maxGeometryOutputVertices = 0
maxGeometryTotalOutputComponents = 0
maxFragmentInputComponents = 64
maxFragmentOutputAttachments = 4
maxFragmentDualSrcAttachments = 0
maxFragmentCombinedOutputResources = 4
maxComputeSharedMemorySize = 32768
maxComputeWorkGroupCount: count = 3
65535
65535
65535
maxComputeWorkGroupInvocations = 128
maxComputeWorkGroupSize: count = 3
128
128
64
subPixelPrecisionBits = 4
subTexelPrecisionBits = 8
mipmapPrecisionBits = 8
maxDrawIndexedIndexValue = 16777215
maxDrawIndirectCount = 1
maxSamplerLodBias = 2
maxSamplerAnisotropy = 1
maxViewports = 1
maxViewportDimensions: count = 2
8192
8192
viewportBoundsRange: count = 2
-16384
16384
viewportSubPixelBits = 2
minMemoryMapAlignment = 64
minTexelBufferOffsetAlignment = 0x00000100
minUniformBufferOffsetAlignment = 0x00000100
minStorageBufferOffsetAlignment = 0x00000100
minTexelOffset = -8
maxTexelOffset = 7
minTexelGatherOffset = -8
maxTexelGatherOffset = 7
minInterpolationOffset = -0.5
maxInterpolationOffset = 0.5
subPixelInterpolationOffsetBits = 4
maxFramebufferWidth = 8192
maxFramebufferHeight = 8192
maxFramebufferLayers = 512
framebufferColorSampleCounts: count = 2
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_4_BIT
framebufferDepthSampleCounts: count = 2
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_4_BIT
framebufferStencilSampleCounts: count = 2
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_4_BIT
framebufferNoAttachmentsSampleCounts: count = 2
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_4_BIT
maxColorAttachments = 4
sampledImageColorSampleCounts: count = 2
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_4_BIT
sampledImageIntegerSampleCounts: count = 1
SAMPLE_COUNT_1_BIT
sampledImageDepthSampleCounts: count = 2
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_4_BIT
sampledImageStencilSampleCounts: count = 2
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_4_BIT
storageImageSampleCounts: count = 1
SAMPLE_COUNT_1_BIT
maxSampleMaskWords = 1
timestampComputeAndGraphics = false
timestampPeriod = 0
maxClipDistances = 8
maxCullDistances = 8
maxCombinedClipAndCullDistances = 8
discreteQueuePriorities = 2
pointSizeRange: count = 2
1
64
lineWidthRange: count = 2
1
8
pointSizeGranularity = 0.125
lineWidthGranularity = 0.125
strictLines = false
standardSampleLocations = false
optimalBufferCopyOffsetAlignment = 0x00000100
optimalBufferCopyRowPitchAlignment = 0x00000100
nonCoherentAtomSize = 0x00000100
VkPhysicalDeviceSparseProperties:
---------------------------------
residencyStandard2DBlockShape = false
residencyStandard2DMultisampleBlockShape = false
residencyStandard3DBlockShape = false
residencyAlignedMipSize = false
residencyNonResidentStrict = false
VkPhysicalDeviceFloatControlsPropertiesKHR:
-------------------------------------------
denormBehaviorIndependence = SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY
roundingModeIndependence = SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY
shaderSignedZeroInfNanPreserveFloat16 = false
shaderSignedZeroInfNanPreserveFloat32 = false
shaderSignedZeroInfNanPreserveFloat64 = false
shaderDenormPreserveFloat16 = false
shaderDenormPreserveFloat32 = false
shaderDenormPreserveFloat64 = false
shaderDenormFlushToZeroFloat16 = false
shaderDenormFlushToZeroFloat32 = false
shaderDenormFlushToZeroFloat64 = false
shaderRoundingModeRTEFloat16 = false
shaderRoundingModeRTEFloat32 = false
shaderRoundingModeRTEFloat64 = false
shaderRoundingModeRTZFloat16 = false
shaderRoundingModeRTZFloat32 = false
shaderRoundingModeRTZFloat64 = false
VkPhysicalDeviceIDPropertiesKHR:
--------------------------------
deviceUUID = 00000000-0000-0000-0000-000000000000
driverUUID = 00000000-0000-0000-0000-000000000000
deviceNodeMask = 0
deviceLUIDValid = false
VkPhysicalDeviceMaintenance3PropertiesKHR:
------------------------------------------
maxPerSetDescriptors = 0
maxMemoryAllocationSize = 0x00000000
VkPhysicalDevicePointClippingPropertiesKHR:
-------------------------------------------
pointClippingBehavior = POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES
VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT:
-------------------------------------------------
filterMinmaxSingleComponentFormats = false
filterMinmaxImageComponentMapping = false
VkPhysicalDeviceTimelineSemaphorePropertiesKHR:
-----------------------------------------------
maxTimelineSemaphoreValueDifference = 0
VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT:
----------------------------------------------------
maxVertexAttribDivisor = 0
Device Extensions: count = 24
-----------------------------
VK_EXT_device_memory_report : extension revision 2
VK_EXT_external_memory_dma_buf : extension revision 1
VK_EXT_queue_family_foreign : extension revision 1
VK_EXT_sampler_filter_minmax : extension revision 2
VK_EXT_vertex_attribute_divisor : extension revision 3
VK_KHR_16bit_storage : extension revision 1
VK_KHR_bind_memory2 : extension revision 1
VK_KHR_dedicated_allocation : extension revision 3
VK_KHR_descriptor_update_template : extension revision 1
VK_KHR_device_group : extension revision 4
VK_KHR_draw_indirect_count : extension revision 1
VK_KHR_external_fence_fd : extension revision 1
VK_KHR_external_memory : extension revision 1
VK_KHR_external_memory_fd : extension revision 1
VK_KHR_external_semaphore_fd : extension revision 1
VK_KHR_get_memory_requirements2 : extension revision 1
VK_KHR_maintenance1 : extension revision 2
VK_KHR_maintenance2 : extension revision 1
VK_KHR_maintenance3 : extension revision 1
VK_KHR_shader_float_controls : extension revision 4
VK_KHR_storage_buffer_storage_class : extension revision 1
VK_KHR_swapchain : extension revision 70
VK_KHR_timeline_semaphore : extension revision 2
VK_KHR_variable_pointers : extension revision 1
VkQueueFamilyProperties:
========================
queueProperties[0]:
-------------------
minImageTransferGranularity = (1,1,1)
queueCount = 1
queueFlags = QUEUE_GRAPHICS | QUEUE_COMPUTE | QUEUE_TRANSFER
timestampValidBits = 0
present support = true
VkPhysicalDeviceMemoryProperties:
=================================
memoryHeaps: count = 1
memoryHeaps[0]:
size = 805306368 (0x30000000) (768.00 MiB)
flags: count = 1
MEMORY_HEAP_DEVICE_LOCAL_BIT
memoryTypes: count = 2
memoryTypes[0]:
heapIndex = 0
propertyFlags = 0x0007: count = 3
MEMORY_PROPERTY_DEVICE_LOCAL_BIT
MEMORY_PROPERTY_HOST_VISIBLE_BIT
MEMORY_PROPERTY_HOST_COHERENT_BIT
usable for:
IMAGE_TILING_OPTIMAL:
color images
FORMAT_D16_UNORM
FORMAT_X8_D24_UNORM_PACK32
FORMAT_S8_UINT
FORMAT_D24_UNORM_S8_UINT
(non-sparse)
IMAGE_TILING_LINEAR:
color images
(non-sparse)
memoryTypes[1]:
heapIndex = 0
propertyFlags = 0x0001: count = 1
MEMORY_PROPERTY_DEVICE_LOCAL_BIT
usable for:
IMAGE_TILING_OPTIMAL:
color images
FORMAT_D16_UNORM
FORMAT_X8_D24_UNORM_PACK32
FORMAT_S8_UINT
FORMAT_D24_UNORM_S8_UINT
(non-sparse)
IMAGE_TILING_LINEAR:
color images
(non-sparse)
VkPhysicalDeviceFeatures:
=========================
robustBufferAccess = true
fullDrawIndexUint32 = false
imageCubeArray = true
independentBlend = true
geometryShader = false
tessellationShader = false
sampleRateShading = false
dualSrcBlend = false
logicOp = false
multiDrawIndirect = false
drawIndirectFirstInstance = false
depthClamp = false
depthBiasClamp = false
fillModeNonSolid = false
depthBounds = false
wideLines = true
largePoints = true
alphaToOne = false
multiViewport = false
samplerAnisotropy = false
textureCompressionETC2 = true
textureCompressionASTC_LDR = false
textureCompressionBC = false
occlusionQueryPrecise = true
pipelineStatisticsQuery = false
vertexPipelineStoresAndAtomics = true
fragmentStoresAndAtomics = true
shaderTessellationAndGeometryPointSize = false
shaderImageGatherExtended = false
shaderStorageImageExtendedFormats = false
shaderStorageImageMultisample = false
shaderStorageImageReadWithoutFormat = false
shaderStorageImageWriteWithoutFormat = false
shaderUniformBufferArrayDynamicIndexing = false
shaderSampledImageArrayDynamicIndexing = false
shaderStorageBufferArrayDynamicIndexing = false
shaderStorageImageArrayDynamicIndexing = false
shaderClipDistance = true
shaderCullDistance = false
shaderFloat64 = false
shaderInt64 = false
shaderInt16 = false
shaderResourceResidency = false
shaderResourceMinLod = false
sparseBinding = false
sparseResidencyBuffer = false
sparseResidencyImage2D = false
sparseResidencyImage3D = false
sparseResidency2Samples = false
sparseResidency4Samples = false
sparseResidency8Samples = false
sparseResidency16Samples = false
sparseResidencyAliased = false
variableMultisampleRate = false
inheritedQueries = false
VkPhysicalDevice16BitStorageFeaturesKHR:
----------------------------------------
storageBuffer16BitAccess = false
uniformAndStorageBuffer16BitAccess = false
storagePushConstant16 = false
storageInputOutput16 = false
VkPhysicalDeviceDeviceMemoryReportFeaturesEXT:
----------------------------------------------
deviceMemoryReport = false
VkPhysicalDeviceTimelineSemaphoreFeaturesKHR:
---------------------------------------------
timelineSemaphore = false
VkPhysicalDeviceVariablePointersFeaturesKHR:
--------------------------------------------
variablePointersStorageBuffer = false
variablePointers = false
VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT:
--------------------------------------------------
vertexAttributeInstanceRateDivisor = false
vertexAttributeInstanceRateZeroDivisor = false
root@imx8mpevk:~#
Have you checked your board with such gpu?
Best regards
Harvey
Hi Harvey,
I am using a Varsicite i.MX8M Plus SOM with Yocto Kirkstone (kernel 5.15.60). After adding the vulkan recipes to my local.conf, the vulkaninfo command was recognized but I was getting an error indicating the libvulkan_VSI.so file wasn't found when vulkaninfo was run. I have libvulkan_VSI.so in my Yocto build folder. After using sftp to transfer the file to /lib/usr in the rootfs, I can see the output of vulkaninfo correctly. It seems the Imx-gpu-viv-6.inc file includes the libvulkan_VSI.so.1 file but not the libvulkan_VSI.so file. Using md5sum it appears these files are identical. I am not sure how to modify the imx-gpu-viv-6.inc file to include the libvulkan_VSI.so file in the rootfs so I don't need to transfer it manually each time I build. Suggestions would be appreciated.
Thanks
Adding IMAGE_INSTALL:append = " vulkan-tools" to my local.conf allows the vulkaninfo command to be found.
I don't understand why this was necessary when vulkan is already listed in DISTRO_FEATURES.
I added the following as well:
IMAGE_INSTALL:append = " vulkan-headers"
IMAGE_INSTALL:append = " vulkan-loader"
IMAGE_INSTALL:append = " vulkan-samples"
Unfortunately, the vulcaninfo command results in the following error:
ERROR: [Loader Message] Code 0 : /usr/lib/libvulkan_VSI.so: cannot open shared object file: No such file or directory
Cannot create Vulkan instance.
This problem is often caused by a faulty installation of the Vulkan driver or attempting to use a GPU that does not support Vulkan.
ERROR at /usr/src/debug/vulkan-tools/1.2.182.0-r0/git/vulkaninfo/vulkaninfo.h:687:vkCreateInstance failed with ERROR_INCOMPATIBLE_DRIVER
Any suggestions will be appreciated.