[Libre-soc-dev] [Mesa-dev] Loading Vulkan Driver

vivek pandya vivekvpandya at gmail.com
Sun Aug 23 16:11:39 BST 2020


More detailed log with VK_LOADER_DEBUG=1

INFO: Found ICD manifest file
/home/vivek/install/share/vulkan/icd.d/libresoc_icd.x86_64.json, version
"1.0.0"
DEBUG: Searching for ICD drivers named
/home/vivek/install/lib/x86_64-linux-gnu/libvulkan_libresoc.so
GetProcAddr called for: vkCreateInstance
GetProcAddr called for: vkEnumerateInstanceExtensionProperties
DEBUG: Build ICD instance extension list
libreSoc_EnumerateInstanceExtensionProperties called for layer: (null)
libreSoc_EnumerateInstanceExtensionProperties called for layer: (null)
DEBUG: Instance Extension: VK_KHR_surface
(/home/vivek/install/lib/x86_64-linux-gnu/libvulkan_libresoc.so) version
0.0.25
DEBUG: Instance Extension: VK_KHR_display
(/home/vivek/install/lib/x86_64-linux-gnu/libvulkan_libresoc.so) version
0.0.23
DEBUG: Instance Extension: VK_EXT_direct_mode_display
(/home/vivek/install/lib/x86_64-linux-gnu/libvulkan_libresoc.so) version
0.0.1
DEBUG: Instance Extension: VK_EXT_display_surface_counter
(/home/vivek/install/lib/x86_64-linux-gnu/libvulkan_libresoc.so) version
0.0.1
DEBUG: Instance Extension: VK_EXT_debug_report
(/home/vivek/install/lib/x86_64-linux-gnu/libvulkan_libresoc.so) version
0.0.9
DEBUG: ReadDataFilesInSearchPaths: Searching the following paths for
manifest files:
/etc/xdg/xdg-ubuntu/vulkan/implicit_layer.d:/etc/xdg/vulkan/implicit_layer.d:/etc/vulkan/implicit_layer.d:/usr/share/ubuntu/vulkan/implicit_layer.d:/usr/local/share/vulkan/implicit_layer.d:/usr/share/vulkan/implicit_layer.d:/var/lib/snapd/desktop/vulkan/implicit_layer.d:/home/vivek/.local/share/vulkan/implicit_layer.d

DEBUG: ReadDataFilesInSearchPaths: Searching the following paths for
manifest files:
/etc/xdg/xdg-ubuntu/vulkan/implicit_layer.d:/etc/xdg/vulkan/implicit_layer.d:/etc/vulkan/implicit_layer.d:/usr/share/ubuntu/vulkan/implicit_layer.d:/usr/local/share/vulkan/implicit_layer.d:/usr/share/vulkan/implicit_layer.d:/var/lib/snapd/desktop/vulkan/implicit_layer.d:/home/vivek/.local/share/vulkan/implicit_layer.d

DEBUG: ReadDataFilesInSearchPaths: Searching the following paths for
manifest files:
/etc/xdg/xdg-ubuntu/vulkan/explicit_layer.d:/etc/xdg/vulkan/explicit_layer.d:/etc/vulkan/explicit_layer.d:/usr/share/ubuntu/vulkan/explicit_layer.d:/usr/local/share/vulkan/explicit_layer.d:/usr/share/vulkan/explicit_layer.d:/var/lib/snapd/desktop/vulkan/explicit_layer.d:/home/vivek/.local/share/vulkan/explicit_layer.d

INFO: Found manifest file
/usr/share/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json, version
"1.0.0"
DEBUG: Adding VK_LAYER_LUNARG_standard_validation using the loader legacy
path.  This is not an error.
INFO: Meta-layer VK_LAYER_LUNARG_standard_validation all 0 component layers
appear to be valid.

Is this version 0.0.25 and similar values look bad?

On Sun, Aug 23, 2020 at 8:33 PM vivek pandya <vivekvpandya at gmail.com> wrote:

>
>
>
>
>> crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
>>
>> On Sun, Aug 23, 2020 at 10:36 AM vivek pandya <vivekvpandya at gmail.com>
>> wrote:
>> >
>> > Hello all,
>> >
>> > I just cleanup a bit and commited code at :
>> >
>> https://gitlab.freedesktop.org/vivekvpandya/mesa/-/commit/d1f29adf926eb44453db1255834575a6f7169d5f
>> >
>> > However it is not working as per my expectation (or my expectations are
>> > wrong)
>> >
>> > I want to see that driver fail at
>> >
>> https://gitlab.freedesktop.org/vivekvpandya/mesa/-/commit/d1f29adf926eb44453db1255834575a6f7169d5f#54a82819ff146aa01755bf951d797d55a0332a32_0_43
>> > however in debugger control never reach there.
>>
>> hm does it reach here?
>>
>> https://gitlab.freedesktop.org/vivekvpandya/mesa/-/blob/d1f29adf926eb44453db1255834575a6f7169d5f/src/libre-soc/vulkan/libresoc_device.c#L105
>>
>> (can i recommend a #ifdef VERBOSE_DEBUG and some printfs: it's crude
>> but effective and when restarting or when others try to replicate this
>> they will not need to set large numbers of breakpoints.  plus, the
>> debug print statements become a discussion anchor / reference-point,
>> and a form of documentation in themselves)
>>
>> about that: is there an "official" MESA macro for use to do verbose
>> development-level debug output?  i see the radv code checks an
>> environment variable:
>>
>> https://gitlab.freedesktop.org/vivekvpandya/mesa/-/blob/d1f29adf926eb44453db1255834575a6f7169d5f/src/amd/vulkan/radv_device.c#L2569
>>
>>
>>
>> > I see that in
>> >
>> https://gitlab.freedesktop.org/apinheiro/mesa/-/commit/07d01ebf6aae2f9ae71a8bea13a5d8acccb6280e
>> > CreateShaderModule() is defined
>>
>> hmm i don't see an equivalent createShaderModule in here:
>>
>> https://gitlab.freedesktop.org/vivekvpandya/mesa/-/blob/d1f29adf926eb44453db1255834575a6f7169d5f/src/libre-soc/vulkan/libresoc_pipeline.c
>>
>> also, enumerateInstanceDeviceProperties is empty:
>>
>> https://gitlab.freedesktop.org/vivekvpandya/mesa/-/blob/d1f29adf926eb44453db1255834575a6f7169d5f/src/libre-soc/vulkan/libresoc_device.c#L259
>>
>> whereas it is not, here:
>>
>> https://gitlab.freedesktop.org/apinheiro/mesa/-/commit/07d01ebf6aae2f9ae71a8bea13a5d8acccb6280e#0b80c3a6757284417a6c75db460ee183cd5e80dd_0_35
>>
>> i would recommend putting debug printfs at the top of
>> libresoc_GetInstanceProcAddr, to get a handle (ha ha) on what
>> functions are being looked for.  ah: it *might* also be worthwhile
>> actually checking out that very early version of the broadcom driver,
>> liberally sprinkling it with debug printfs at least at the start of
>> every function, and see what is called, and in which order.
>>
>> by doing the same thing in the libresoc driver that would give you an
>> idea of what is missing.
>>
>> the other thought that occurred to me: it could just be that expecting
>> createGraphicsPipelines to be called is too early, and that to trigger
>> it, a little more of the infrastructure has to be in place, such as
>> responding to vkinfo:
>>
>> https://gitlab.axiodl.com/AxioDL/mesa/-/blob/abd629eb3d4027b89c13158e90c6732b412e550e/src/intel/vulkan/anv_device.c#L782
>>
>> I added few debug statements but still the same result:
> Here is my debug log:
> vivek at vivek-VirtualBox:~/mesa/dbg$ vulkaninfo
> GetProcAddr called for: vkCreateInstance
> GetProcAddr called for: vkEnumerateInstanceExtensionProperties
> libreSoc_EnumerateInstanceExtensionProperties called for layer: (null)
> libreSoc_EnumerateInstanceExtensionProperties called for layer: (null)
> GetProcAddr called for: vkCreateInstance
> GetProcAddr called for: vkEnumerateInstanceExtensionProperties
> libreSoc_EnumerateInstanceExtensionProperties called for layer: (null)
> libreSoc_EnumerateInstanceExtensionProperties called for layer: (null)
> GetProcAddr called for: vkCreateInstance
> GetProcAddr called for: vkEnumerateInstanceExtensionProperties
> libreSoc_EnumerateInstanceExtensionProperties called for layer: (null)
> libreSoc_EnumerateInstanceExtensionProperties called for layer: (null)
> libreSoc_EnumerateInstanceExtensionProperties called for layer: (null)
> libreSoc_EnumerateInstanceExtensionProperties called for layer: (null)
> GetProcAddr called for: vkEnumerateInstanceVersion
> GetProcAddr called for: vkDestroyInstance
> WARNING:
> WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Failed to
> CreateInstance and find entrypoints with ICD.  Skipping ICD.
> WARNING: terminator_CreateInstance: Failed to CreateInstance and find
> entrypoints with ICD.  Skipping ICD.
> 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.
> /build/vulkan-tools-KEbD_A/vulkan-tools-1.2.131.1+dfsg1/vulkaninfo/vulkaninfo.h:371:
> failed with ERROR_INCOMPATIBLE_DRIVER
>
> I hope this is not due to the VirtualBox environment.
>
> just a thought.
>>
>> l
>
>


More information about the Libre-soc-dev mailing list