<div dir="ltr">Hi,<br><br><div class="gmail_quote"><div dir="ltr">Il giorno mer 27 giu 2018 alle ore 10:41 Tapani Pälli <<a href="mailto:tapani.palli@intel.com" target="_blank">tapani.palli@intel.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi;<br>
<br>
On 06/13/2018 09:32 AM, Mauro Rossi wrote:<br>
> +Samuel Pitoiset<br>
> <br>
> <br>
> 2018-06-11 22:31 GMT+02:00 Mauro Rossi <<a href="mailto:issor.oruam@gmail.com" target="_blank">issor.oruam@gmail.com</a> <br>
> <mailto:<a href="mailto:issor.oruam@gmail.com" target="_blank">issor.oruam@gmail.com</a>>>:<br>
> <br>
>     Hi Bas,<br>
> <br>
>     commit [1] removed a check on 'supported' attribute in<br>
>     src/intel/vulkan/anv_entrypoints_gen.py<br>
> <br>
>     Should the check on 'supported' attribute be removed also in<br>
>     src/amd/vulkan/radv_entrypoints_gen.py ?<br>
<br>
Yes<br></blockquote><div><br></div><div>Infact with that change the vulkan.radv module works with amdgpu (dc=1) on HD7790,</div><div>I'm going to submit the patch to mesa-dev.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
>     Thanks for your feedback<br>
>     Mauro<br>
> <br>
>     [1]<br>
>     <a href="https://cgit.freedesktop.org/mesa/mesa/commit/?id=63525ba730e3d8a466d7f6382a2b91f4c75dd171" rel="noreferrer" target="_blank">https://cgit.freedesktop.org/mesa/mesa/commit/?id=63525ba730e3d8a466d7f6382a2b91f4c75dd171</a><br>
>     <<a href="https://cgit.freedesktop.org/mesa/mesa/commit/?id=63525ba730e3d8a466d7f6382a2b91f4c75dd171" rel="noreferrer" target="_blank">https://cgit.freedesktop.org/mesa/mesa/commit/?id=63525ba730e3d8a466d7f6382a2b91f4c75dd171</a>><br>
> <br>
> <br>
> <br>
> Hi Sam, Bas,<br>
> <br>
> there is an important matter regarding Android builds (android-x86)<br>
> <br>
> I have a series of patches for Android makefiles to build radv for that <br>
> platform,<br>
> they are building but they require the change in <br>
> src/amd/vulkan/radv_entrypoints_gen.py<br>
> to have the necessary entrypoints and vulkan apps starting to work.<br>
> <br>
> What I forgot to say is that I have the Android building rules ready to <br>
> submit to mesa-dev,<br>
> but they require to build libLLVM with a different name e.g libLLVM60 or <br>
> libLLVM_mesa and set the correct HAVE_LLVM properly<br>
> <br>
> The patches themselves would break the Android build for Intel, because <br>
> amd tree is built unconditionally,<br>
> but the libLLVM"for mesa" shared library is not in place in AOSP, Intel <br>
> builds and not even in android-x86 oreo,<br>
<br>
This *should* not be a problem for us since it's the dependencies set in <br>
<a href="http://product.mk" rel="noreferrer" target="_blank">product.mk</a> that define what libraries will be built. Android-IA <br>
(nowadays "Celadon") should just not then list the library name built <br>
for radv.<br></blockquote><div><br></div><div>If vulkan.radv is not added to PRODUCT_PACKAGES list then it should not be a problem for Android-IA</div><div><br></div><div>The problem I'm referring to is the libLLVM shared dependency in itself</div><div><br></div><div>AOSP builds libLLVM from external/llvm for its own purposes, version 3.9 is bundled with for Oreo branches,</div><div>recent mesa have ceased support for that version, so we cannot avoid building the bundled libLLVM and for mesa we need to build libLLVM50 (different shared library module name)</div><div>because Android Build system does not allow for duplicated shared libraries module names.</div><div><br></div><div>If this is not a problem I will submit the patches with Android building rules assuming that llvm shared library can be the current i.e. libLLVM,</div><div>but in reality to build vulkan.radv for Android, libLLVM must be version 5.0 or later and requires "the trick" to side-build another external/llvm50 project.</div><div><br></div><div>This setup does not have many users, but upstream the Android radv 

<span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">patches</span>

could make sense, if it's not disruptive for other users.</div><div>If someone know a different way or view please let me know.</div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
One issue is that anv currently builds as <br>
'vulkan.$(TARGET_BOARD_PLATFORM)' which is very generic, we should <br>
probably have something like vulkan.anv.$(TARGET_BOARD_PLATFORM) instead <br>
and then use ro.hardware.vulkan=vulkan.anv.$(TARGET_BOARD_PLATFORM) in <br>
<a href="http://device.mk" rel="noreferrer" target="_blank">device.mk</a> so that Android finds it (?)<br></blockquote><div><br></div><div>vulkan.anv should be ok, as the vulkan HAL module name should not need to depend on the 

<span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">$(TARGET_BOARD_PLATFORM) label</span></div><div><br></div><div>If I recall correctly for a 'vulkan.anv' named module the property is set as: </div><div><br></div><div><font face="monospace, monospace">

<span style="text-decoration-style:initial;text-decoration-color:initial;color:rgb(0,0,0);font-family:monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(255,255,255);float:none;display:inline">setprop</span><span style="font-family:sans-serif;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span>

ro.hardware.vulkan anv</font><br></div><div><font face="monospace, monospace"><br></font></div><div><font face="arial, helvetica, sans-serif">if set as </font>

<span style="font-family:monospace,monospace;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ro.hardware.vulkan vulkan.anv </span><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font face="arial, helvetica, sans-serif">the module may not be found.</font></span></div><div>

<br></div><div>In android-x86 we plan to set  the property in init.sh, according to the loaded drmfb module, for available vulkan hals:</div><div><br></div><div>for inteldrmfb        

<span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">setprop</span> <span style="font-family:monospace,monospace;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ro.hardware.vulkan anv</span>

</div><div><span style="font-family:monospace,monospace;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">

<span style="font-family:sans-serif;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">for amdgpudrmfb  

<span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">setprop</span>

</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ro.hardware.vulkan radv</span></span></div><div>[in the future as example] for<font face="arial, helvetica, sans-serif"> 

<span style="color:rgb(0,0,0);font-size:12px;white-space:pre;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">virtiodrmfb</span></font><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;white-space:pre;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> <span style="color:rgb(34,34,34);font-size:13px;white-space:normal;text-decoration-style:initial;text-decoration-color:initial;font-family:sans-serif;float:none;display:inline"><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">setprop</span><span> </span></span><span style="color:rgb(34,34,34);font-family:monospace,monospace;font-size:13px;white-space:normal;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ro.hardware.vulkan virgl</span></span></div><div><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">

</span></div><div><br></div><div>Mauro</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
> so I wanted to start discussing about how to integrate ravd for Android <br>
> in a way that does not break other drivers builds,<br>
> if there are other interested users.<br>
> <br>
> Mauro<br>
<br>
// Tapani<br>
</blockquote></div></div>