On 2022-11-08 18:35, Gert Wollny wrote:
Hello,

On Sun, 2022-11-06 at 11:33 -0800, Rob Clark wrote:
On Fri, Nov 4, 2022 at 1:42 AM Taylor Viktor<sysesc...@gmail.com>
wrote:
Dear Developers:

I am referring to this document
https://docs.mesa3d.org/drivers/venus.html#vtest  to develop vulkan
related functions, but every time I run vulkaninfo or vkcube some
errors occur.

virgl_test_server prints the following:

     gl_version 46 - core profile enabled
     vtest_client_dispatch_commands: client context created.
     client failed: VTEST_CLIENT_ERROR_INPUT_READ

Running vulkaninfo prints the following:

     WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Failed to 
CreateInstance in ICD 0.  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.
     ERROR at ./vulkaninfo/vulkaninfo.h:649:vkCreateInstance failed with 
ERROR_INCOMPATIBLE_DRIVER

Running vkcube prints the following:

     Cannot find a compatible Vulkan installable client driver (ICD).
     Please look at the Getting Started guide for additional information.

After debugging, I found that the error occurred when calling the system 
function
     res = read(fd, ptr, left)
in the
     vtest_block_read(struct vtest_input *input, void *buf, int size)
function, it returned 0 to the variable res,
but The variable left passed in is 8. This is only true if(res == left).


And I checked the Requirements by running below command: vulkaninfo | grep "Vulkan Instance Version" vulkaninfo | grep VK_EXT_external_memory_dma_buf vulkaninfo | grep VK_EXT_image_drm_format_modifier vulkaninfo | grep VK_EXT_queue_family_foreign uname -r the output: Vulkan Instance Version: 1.3.204 VK_EXT_external_memory_dma_buf : extension revision 1 VK_EXT_image_drm_format_modifier : extension revision 2 VK_EXT_queue_family_foreign : extension revision 1 5.15.0-52-generic Except the graphics card is GTX 1060 3GB, I think my other requirements are met. I use vtest, which can ignore the kernel version according to the documentation. When you were testing, what versions of virglrenderer and mesa were you using? If you guys know, please let me know and I will try it again. If you don't know the specific version, can you give me some debugging or method suggestions? Looking forward to your reply, thank you very much
I'm not sure about the venus/vk case, but I got the same error when
trying to use virgl+vtest the other day.  I think this must have
broken semi-recently, but didn't try to bisect or figure out if the
issue was in mesa or virglrenderer
The error message
    "client failed: VTEST_CLIENT_ERROR_INPUT_READ"
is also emitted when the guest client exits normally, this is a bit
unfortunate, but IMSMR it was not possible to distinguish between the
client just finishing or whether something had gone wrong with the file
descriptor.

AFAIR this has been printed since the beginning, and OpenGL should just
work fine (it does for me), but gives above sever side output.

As for Venus, for me I can run vulkaninfo just fine, and for vkcube I
get a client side error, complete client side output is:


   ./vkcube
   1 physical devices
   vendor id 1002, device name Virtio-GPU Venus (AMD Radeon RX 6700 XT
(RADV NAVI22))
   vkcube: ../src/virtio/vulkan/vn_queue.c:164:
   vn_queue_submission_prepare:
    Assertion `!submit->wsi_mem->base_memory && submit->wsi_mem-
base_bo' failed.
Aborted

(The same assertion is triggered on Intel)

You can also try these server side options:

    --no-fork and --multi-client

They make no difference for me, I just know that at the beginning they
were needed.

Hope that helps,
Gert

Thank you,  Gert.

I've added the entire previous letter to show the full error and problem.
* Do you remember the version of virglrenderer and mesa you were using? *

I tried something to handle:

1. I downloaded the source from KhronosGroup/Vulkan-Tools and compiled it with version tag v1.3.204. * Is the normal operation of mesa and virglrenderer related to the version of Vulkan-Tools? *  i) dll.fp_vkEnumerateInstanceVersion(&instance_version) in struct AppInstance::AppInstance() return version: 4206796
     I am not sure if this version number is correct.
ii) socket established and closed at line
             VkResult err = dll.fp_vkCreateInstance(&inst_info, nullptr, &instance);
     and which returned the error VK_ERROR_INCOMPATIBLE_DRIVER.

2. I tried with command strace to trace vulkaninfo, and noticed that there is a shutdown system call close the socket normally.
(BTW, ltrace didn't work with vulkaninfo to trace libvulkan_virtio.so)
However, after socket close, the virglrenderer still keep reading from the fd and the reason why is           client->in_fd_ready = true. in vtest_server_wait_clients(void) in file vtest_server.c

3. I tried --no-fork and --multi-client too. They make no difference for me too, and there is still error.

4. something unrelated but not mentioned

** The biggest problem currently bothering me is: I don't have a good way to trace calls to libvulkan_virtio.so **
any suggestion?

BR
-S

Reply via email to