<div dir="ltr"><div dir="ltr"><br></div>Hello Jan,<br><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 15, 2020 at 12:45 PM Zielinski, Jan <<a href="mailto:jan.zielinski@intel.com">jan.zielinski@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> Is there any document for extending SWR for architectures other than Intel?<br>
<br>
Unfortunately not. SWR was not architected to be portable beyond CPUs with different levels of AVX ISAs. <br>
<br>
> It seems like SWR uses llvm_pipe shader creation, so is it still based on tgsi IR to LLVM conversion? <br>
<br>
Yes, it is still based on TGSI.<br>
<br>
> Is there a path from NIR->LLVM (it seems so as per <a href="https://phoronix.com/scan.php?page=news_item&px=LLVM-Switches-To-NIR-Default" rel="noreferrer" target="_blank">https://phoronix.com/scan.php?page=news_item&px=LLVM-Switches-To-NIR-Default</a> ?<br>
<br>
For SWR no - it does not exist, at least not yet. From the top of my head, I don't really know how much effort it would be to port SWR to NIR, but I do plan to look into it. At some point... <br>
<br>
> Is the above idea possible at high-level? or I am missing lots of important points?<br>
<br>
The most important point you may be missing is the fact that rasterization in SWR is not based on LLVM. It based on AVX intrinsics (see code in src/gallium/drivers/swr/rasterizer/core/). This is probably the biggest problem if you target any other architecture. Most probably you would need to rewrite the rasterizer to use LLVM IR or to some kind of language that is based on LLVM and supports explicit vectorization, like ISPC. Rewriting is most probably easier than convincing the community to introduce ISPC (or any other new language) dependency to Mesa, though. ;-)<br></blockquote><div>Thanks for the information.  <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>
> Overall idea is to have SWR retargettable for any architecture that is supported by LLVM codege and also don't want to use TGSI instead use NIR.<br>
<br>
Are you thinking about using SWR for Libre-SOC?<br></blockquote><div>Yes but for now I am developing simple thing similar to <a href="https://github.com/baldurk/visor">https://github.com/baldurk/visor</a> that is enough for experiments. </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,<br>
Jan<br>
<br>
---------------------------------------------------------------------<br>
Intel Technology Poland sp. z o.o.<br>
ul. Sowackiego 173 | 80-298 Gdask | Sd Rejonowy Gdask Pnoc | VII Wydzia Gospodarczy Krajowego Rejestru Sdowego - KRS 101882 | NIP 957-07-52-316 | Kapita zakadowy 200.000 PLN.<br>
Ta wiadomo wraz z zacznikami jest przeznaczona dla okrelonego adresata i moe zawiera informacje poufne. W razie przypadkowego otrzymania tej wiadomoci, prosimy o powiadomienie nadawcy oraz trwae jej usunicie; jakiekolwiek przegldanie lub rozpowszechnianie jest zabronione.<br>
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.<br>
<br>
</blockquote></div></div></div>