<div dir="ltr"><p class="gmail-md-end-block gmail-md-p gmail-md-focus" style="box-sizing:border-box;line-height:inherit;margin:0.8em 0px;white-space:pre-wrap;color:rgb(51,51,51);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"><span class="gmail-md-plain gmail-md-expand" style="box-sizing:border-box">Dear Developers:</span></p><p class="gmail-md-end-block gmail-md-p" style="box-sizing:border-box;line-height:inherit;margin:0.8em 0px;white-space:pre-wrap;color:rgb(51,51,51);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"><span class="gmail-md-plain" style="box-sizing:border-box">I am referring to this document </span><span class="gmail-md-link gmail-md-pair-s" style="box-sizing:border-box;word-break:break-all"><a href="https://docs.mesa3d.org/drivers/venus.html#vtest" style="box-sizing:border-box;color:rgb(65,131,196)">https://docs.mesa3d.org/drivers/venus.html#vtest</a></span><span class="gmail-md-plain" style="box-sizing:border-box"> to develop vulkan related functions, but every time I run </span><span class="gmail-md-pair-s" style="box-sizing:border-box"><code style="box-sizing:border-box;vertical-align:initial;border:1px solid rgb(231,234,237);background-color:rgb(243,244,244);border-radius:3px;padding:0px 2px;font-size:0.9em">vulkaninfo</code></span><span class="gmail-md-plain" style="box-sizing:border-box"> or </span><span class="gmail-md-pair-s" style="box-sizing:border-box"><code style="box-sizing:border-box;vertical-align:initial;border:1px solid rgb(231,234,237);background-color:rgb(243,244,244);border-radius:3px;padding:0px 2px;font-size:0.9em">vkcube</code></span><span class="gmail-md-plain" style="box-sizing:border-box"> some errors occur.</span></p><p class="gmail-md-end-block gmail-md-p" style="box-sizing:border-box;line-height:inherit;margin:0.8em 0px;white-space:pre-wrap;color:rgb(51,51,51);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"><span class="gmail-md-pair-s" style="box-sizing:border-box"><code style="box-sizing:border-box;vertical-align:initial;border:1px solid rgb(231,234,237);background-color:rgb(243,244,244);border-radius:3px;padding:0px 2px;font-size:0.9em">virgl_test_server</code></span><span class="gmail-md-plain" style="box-sizing:border-box"> prints the following:</span></p><blockquote style="box-sizing:border-box;margin:0.8em 0px;border-left:4px solid rgb(223,226,229);padding:0px 15px;color:rgb(119,119,119);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"><p class="gmail-md-end-block gmail-md-p" style="box-sizing:border-box;line-height:inherit;margin:0px;white-space:pre-wrap"><span class="gmail-md-plain" style="box-sizing:border-box">gl_version 46 - core profile enabled</span><span class="gmail-md-softbreak" style="box-sizing:border-box">
</span><span class="gmail-md-plain" style="box-sizing:border-box">vtest_client_dispatch_commands: client context created.</span><span class="gmail-md-softbreak" style="box-sizing:border-box">
</span><span class="gmail-md-plain" style="box-sizing:border-box">client failed: VTEST_CLIENT_ERROR_INPUT_READ</span></p></blockquote><p class="gmail-md-end-block gmail-md-p" style="box-sizing:border-box;line-height:inherit;margin:0.8em 0px;white-space:pre-wrap;color:rgb(51,51,51);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"><span class="gmail-md-plain" style="box-sizing:border-box">Running </span><span class="gmail-md-pair-s" style="box-sizing:border-box"><code style="box-sizing:border-box;vertical-align:initial;border:1px solid rgb(231,234,237);background-color:rgb(243,244,244);border-radius:3px;padding:0px 2px;font-size:0.9em">vulkaninfo</code></span><span class="gmail-md-plain" style="box-sizing:border-box"> prints the following:</span></p><blockquote style="box-sizing:border-box;margin:0.8em 0px;border-left:4px solid rgb(223,226,229);padding:0px 15px;color:rgb(119,119,119);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"><p class="gmail-md-end-block gmail-md-p" style="box-sizing:border-box;line-height:inherit;margin:0px;white-space:pre-wrap"><span class="gmail-md-plain" style="box-sizing:border-box">WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Failed to CreateInstance in ICD 0. Skipping ICD.</span><span class="gmail-md-softbreak" style="box-sizing:border-box">
</span><span class="gmail-md-plain" style="box-sizing:border-box">Cannot create Vulkan instance.</span><span class="gmail-md-softbreak" style="box-sizing:border-box">
</span><span class="gmail-md-plain" style="box-sizing:border-box">This problem is often caused by a faulty installation of the Vulkan driver or attempting to use a GPU that does not support Vulkan.</span><span class="gmail-md-softbreak" style="box-sizing:border-box">
</span><span class="gmail-md-plain" style="box-sizing:border-box">ERROR at ./vulkaninfo/vulkaninfo.h:649:vkCreateInstance failed with ERROR_INCOMPATIBLE_DRIVER</span></p></blockquote><p class="gmail-md-end-block gmail-md-p" style="box-sizing:border-box;line-height:inherit;margin:0.8em 0px;white-space:pre-wrap;color:rgb(51,51,51);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"><span class="gmail-md-plain" style="box-sizing:border-box">Running </span><span class="gmail-md-pair-s" style="box-sizing:border-box"><code style="box-sizing:border-box;vertical-align:initial;border:1px solid rgb(231,234,237);background-color:rgb(243,244,244);border-radius:3px;padding:0px 2px;font-size:0.9em">vkcube</code></span><span class="gmail-md-plain" style="box-sizing:border-box"> prints the following:</span></p><blockquote style="box-sizing:border-box;margin:0.8em 0px;border-left:4px solid rgb(223,226,229);padding:0px 15px;color:rgb(119,119,119);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"><p class="gmail-md-end-block gmail-md-p" style="box-sizing:border-box;line-height:inherit;margin:0px;white-space:pre-wrap"><span class="gmail-md-plain" style="box-sizing:border-box">Cannot find a compatible Vulkan installable client driver (ICD).</span><span class="gmail-md-softbreak" style="box-sizing:border-box">
</span><span class="gmail-md-plain" style="box-sizing:border-box">Please look at the Getting Started guide for additional information.</span></p></blockquote><p class="gmail-md-end-block gmail-md-p" style="box-sizing:border-box;line-height:inherit;margin:0.8em 0px;white-space:pre-wrap;color:rgb(51,51,51);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"><span class="gmail-md-plain" style="box-sizing:border-box">After debugging, I found that the error occurred when calling the system function </span><span class="gmail-md-pair-s" style="box-sizing:border-box"><code style="box-sizing:border-box;vertical-align:initial;border:1px solid rgb(231,234,237);background-color:rgb(243,244,244);border-radius:3px;padding:0px 2px;font-size:0.9em">res = read(fd, ptr, left)</code></span><span class="gmail-md-plain" style="box-sizing:border-box"> in the </span><span class="gmail-md-pair-s" style="box-sizing:border-box"><code style="box-sizing:border-box;vertical-align:initial;border:1px solid rgb(231,234,237);background-color:rgb(243,244,244);border-radius:3px;padding:0px 2px;font-size:0.9em">vtest_block_read(struct vtest_input *input, void *buf, int size)</code></span><span class="gmail-md-plain" style="box-sizing:border-box"> function, it returned 0 to the variable </span><span class="gmail-md-pair-s" style="box-sizing:border-box"><code style="box-sizing:border-box;vertical-align:initial;border:1px solid rgb(231,234,237);background-color:rgb(243,244,244);border-radius:3px;padding:0px 2px;font-size:0.9em">res</code></span><span class="gmail-md-plain" style="box-sizing:border-box">, but The variable </span><span class="gmail-md-pair-s" style="box-sizing:border-box"><code style="box-sizing:border-box;vertical-align:initial;border:1px solid rgb(231,234,237);background-color:rgb(243,244,244);border-radius:3px;padding:0px 2px;font-size:0.9em">left</code></span><span class="gmail-md-plain" style="box-sizing:border-box"> passed in is 8. This is only true </span><span class="gmail-md-pair-s" style="box-sizing:border-box"><code style="box-sizing:border-box;vertical-align:initial;border:1px solid rgb(231,234,237);background-color:rgb(243,244,244);border-radius:3px;padding:0px 2px;font-size:0.9em">if(res == left)</code></span><span class="gmail-md-plain" style="box-sizing:border-box">.</span></p><p class="gmail-md-end-block gmail-md-p" style="box-sizing:border-box;line-height:inherit;margin:0.8em 0px;white-space:pre-wrap;color:rgb(51,51,51);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"><span class="gmail-md-plain" style="box-sizing:border-box">And I checked the Requirements by running below command:</span></p><pre class="gmail-md-fences gmail-md-end-block gmail-md-fences-with-lineno gmail-ty-contain-cm gmail-modeLoaded" lang="" style="box-sizing:border-box;overflow:visible;font-size:0.9em;break-inside:avoid;white-space:normal;background-image:inherit;background-position:inherit;background-size:inherit;background-repeat:inherit;background-origin:inherit;background-clip:inherit;background-color:rgb(248,248,248);border:1px solid rgb(231,234,237);border-radius:3px;padding:8px 4px 6px 0px;margin-bottom:15px;margin-top:15px;width:inherit;color:rgb(51,51,51)"> <span role="presentation" style="box-sizing:border-box;padding-right:0.1px">vulkaninfo | grep "Vulkan Instance Version"</span><br> <span role="presentation" style="box-sizing:border-box;padding-right:0.1px">vulkaninfo | grep VK_EXT_external_memory_dma_buf</span><br> <span role="presentation" style="box-sizing:border-box;padding-right:0.1px">vulkaninfo | grep VK_EXT_image_drm_format_modifier</span><br> <span role="presentation" style="box-sizing:border-box;padding-right:0.1px">vulkaninfo | grep VK_EXT_queue_family_foreign</span><br> <span role="presentation" style="box-sizing:border-box;padding-right:0.1px">uname -r</span></pre><p class="gmail-md-end-block gmail-md-p" style="box-sizing:border-box;line-height:inherit;margin:0.8em 0px;white-space:pre-wrap;color:rgb(51,51,51);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"><span class="gmail-md-plain" style="box-sizing:border-box">the output:</span></p><blockquote style="box-sizing:border-box;margin:0.8em 0px;border-left:4px solid rgb(223,226,229);padding:0px 15px;color:rgb(119,119,119);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"><p class="gmail-md-end-block gmail-md-p" style="box-sizing:border-box;line-height:inherit;margin:0px;white-space:pre-wrap"><span class="gmail-md-plain" style="box-sizing:border-box">Vulkan Instance Version: 1.3.204</span><span class="gmail-md-softbreak" style="box-sizing:border-box">
</span><span class="gmail-md-plain" style="box-sizing:border-box">VK_EXT_external_memory_dma_buf : extension revision 1</span><span class="gmail-md-softbreak" style="box-sizing:border-box">
</span><span class="gmail-md-plain" style="box-sizing:border-box">VK_EXT_image_drm_format_modifier : extension revision 2</span><span class="gmail-md-softbreak" style="box-sizing:border-box">
</span><span class="gmail-md-plain" style="box-sizing:border-box">VK_EXT_queue_family_foreign : extension revision 1</span><span class="gmail-md-softbreak" style="box-sizing:border-box">
</span><span class="gmail-md-plain" style="box-sizing:border-box">5.15.0-52-generic</span></p></blockquote><p class="gmail-md-end-block gmail-md-p" style="box-sizing:border-box;line-height:inherit;margin:0.8em 0px;white-space:pre-wrap;color:rgb(51,51,51);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"><span class="gmail-md-plain" style="box-sizing:border-box">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.</span></p><ul class="gmail-ul-list" style="box-sizing:border-box;margin:0.8em 0px;padding-left:30px;color:rgb(51,51,51);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"><li class="gmail-md-list-item" style="box-sizing:border-box;margin:0px"><p class="gmail-md-end-block gmail-md-p" style="box-sizing:border-box;line-height:inherit;margin:0px 0px 0.5rem;white-space:pre-wrap"><span class="gmail-md-plain" style="box-sizing:border-box">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.</span></p></li></ul><ul class="gmail-ul-list" style="box-sizing:border-box;margin:0.8em 0px;padding-left:30px;color:rgb(51,51,51);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"><li class="gmail-md-list-item" style="box-sizing:border-box;margin:0px"><p class="gmail-md-end-block gmail-md-p" style="box-sizing:border-box;line-height:inherit;margin:0px 0px 0.5rem;white-space:pre-wrap"><span class="gmail-md-plain" style="box-sizing:border-box">If you don't know the specific version, can you give me some debugging or method suggestions?</span></p></li></ul><p class="gmail-md-end-block gmail-md-p" style="box-sizing:border-box;line-height:inherit;margin:0.8em 0px;white-space:pre-wrap;color:rgb(51,51,51);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"></p><p class="gmail-md-end-block gmail-md-p" style="box-sizing:border-box;line-height:inherit;margin:0.8em 0px;white-space:pre-wrap;color:rgb(51,51,51);font-family:"Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,"Segoe UI Emoji",sans-serif;font-size:16px"><span class="gmail-md-plain gmail-md-expand" style="box-sizing:border-box">Looking forward to your reply, thank you very much</span></p></div>