[Libre-soc-dev] [Mesa-dev] Loading Vulkan Driver
vivek pandya
vivekvpandya at gmail.com
Sun Aug 23 16:03:35 BST 2020
> 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