On 21/8/20 7:27, vivek pandya wrote:
Thanks Jason for your time to reply. I understand the error but I am not much familiar with entry points generation code.


As Jason mentioned, to get a Vulkan driver started, you would need more than just one method. If you want a reference:

https://gitlab.freedesktop.org/apinheiro/mesa/-/commit/07d01ebf6aae2f9ae71a8bea13a5d8acccb6280e

This commit added the basic skeleton for v3dv (broadcom mesa vulkan driver). It C&P and adapted the python scripts that Jason wrote for anv (that was that radv and turnip also did, afaik), and then provided several empty implementation for several methods, and dummy structs for several objects. It is possible that you could wrote something more simplified as a starting point (like no debug methods), but not too much.


Currently I just make it compile (I just want to develop a broken pipeline quickly that just returns from the entry point) .


As Jason mentioned, a device and instance would be required. I really doubt that any vulkan program would be able to skip calling the methods that create them. Although those could be dummy too.


I will study the code. Is there any document to read about that? I want to understand how loaders and icd interact.

On Thu, Aug 20, 2020 at 9:46 PM Jason Ekstrand <ja...@jlekstrand.net <mailto:ja...@jlekstrand.net>> wrote:

    The error says pretty clearly what went wrong.  The loader looked for
    the `vk_icdGetInstanceProcAddr` symbol and couldn't find it in your
    so.  You need at least the basic Get*ProcAddr symbols or else the
    loader can't do anything.  You'll also need device and instance
    creation functions and possibly some of the queries before anything
    will work.

    On Thu, Aug 20, 2020 at 10:43 AM vivek pandya
    <vivekvpan...@gmail.com <mailto:vivekvpan...@gmail.com>> wrote:
    >
    > Hello,
    >
    > I have started building mesa Vulkan driver.
    > I have started by copying amd/vulkan driver however I have just
    kept only one file in build
    > libresoc_pipeline.c
    > I have only one method
    >
    > VkResult libresoc_CreateGraphicsPipelines(
    >         VkDevice _device,
    >         VkPipelineCache  pipelineCache,
    >         uint32_t count,
    >         const VkGraphicsPipelineCreateInfo*  pCreateInfos,
    >         const VkAllocationCallbacks* pAllocator,
    >         VkPipeline*  pPipelines)
    > {
    >         return VK_ERROR_UNKNOWN;
    > }
    >
    > with few edits/commenting out code into files I am able to build
    libvulkan_libresoc.so
    >  but when I forced loaded driver with VK_ICD_FILENAMES I am
    getting following error:
    > however I was expecting to hit VK_ERROR_UNKNOWN. Anyone have any
    ideas? Am I missing any file in the build setting?
    >
    > vivek@vivek-VirtualBox:~/install/share/vulkan/icd.d$ vulkaninfo
    > ERROR: [Loader Message] Code 0 : loader_scanned_icd_add: Attempt
    to retrieve either 'vkGetInstanceProcAddr' or
    'vk_icdGetInstanceProcAddr' from ICD
    /home/vivek/install/lib/x86_64-linux-gnu/libvulkan_libresoc.so failed.
    > 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
    >
    > Thanks,
    > Vivek
    > _______________________________________________
    > mesa-dev mailing list
    > mesa-dev@lists.freedesktop.org
    <mailto:mesa-dev@lists.freedesktop.org>
    > https://lists.freedesktop.org/mailman/listinfo/mesa-dev


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to