<div dir="ltr"><div><span id="result_box" class="" lang="en"><span class="">First,</span> <span class="">thank you</span> <span class="">all for your</span> <span class="">answers.<br><br></span></span>So i<span id="result_box" class="" lang="en"><span class=""><span id="result_box" class="" lang="en"><span class="">f</span> <span class="">I summarize</span> <span class="">what was</span> <span class="">said, we need<br></span></span>Ian:<br></span></span> - add<br>
 - negate<br>
 - absolute value<br>
 - multiply<br>
 - reciprocal<br>
 - convert to single precision<br>
 - convert from single precision<br>Roland:<br> - sqrt<br></div><div> - comparaison (< / == / >)<br> - floor/ceil<br></div><div>I will contact Pat Brown (His name appear in the contact field in [1]) to know if we need the function below for implement gpu_shader_fp64.<br></div><div> - pow<br></div><div> - exp<br></div><div> - log<br><br></div><div>About the license<br></div><div><blockquote><i>Like I mentioned in the project description, there are quite a few<br>
existing C implementations of these functions.  Finding one of those<br>
that you can understand and that has a compatible license is probably<br>
the best place to start.</i><br></blockquote>Main Mesa code is under MIT license. <br>If I chose to use a GNU GPL license file like Linux kernel [3], my code must be under GNU GPL and probably all the project too. Am I right?<br></div><div><br>[1] <a href="https://www.opengl.org/registry/specs/ARB/gpu_shader_fp64.txt">https://www.opengl.org/registry/specs/ARB/gpu_shader_fp64.txt</a><br>[2] <a href="http://www.mesa3d.org/license.html">http://www.mesa3d.org/license.html</a><br>[3] <a href="https://github.com/torvalds/linux/blob/097f70b3c4d84ffccca15195bdfde3a37c0a7c0f/arch/arm/nwfpe/softfloat.c">https://github.com/torvalds/linux/blob/097f70b3c4d84ffccca15195bdfde3a37c0a7c0f/arch/arm/nwfpe/softfloat.c</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-10 2:18 GMT+01:00 Roland Scheidegger <span dir="ltr"><<a href="mailto:sroland@vmware.com" target="_blank">sroland@vmware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Am 09.03.2016 um 23:51 schrieb Ian Romanick:<br>
> On 03/09/2016 02:25 AM, tournier.elie wrote:<br>
>> Hi everyone.<br>
>><br>
>> My name is Elie TOURNIER, I am enrolled in a French Engineering school<br>
>> (Telecom Physique Strasbourg) specialized in Medical ICT.<br>
>> I'm interested in implementing "Soft" double precision floating point<br>
>> support [1].<br>
>> Taking this subject seem to be a good way to get my feet wet in the Mesa<br>
>> code and discover how some of its components works.<br>
>><br>
>> I come to you in order to become know but also to retrieve valuable<br>
>> information for the success of this project.<br>
>><br>
>> I would like to know more about the following things to understand your<br>
>> requirements :<br>
>> 1- "/Each double precision value would be stored in a uvec2/" The IEEE<br>
>> double precision floating point standard representation requires a 64<br>
>> bit: 1 for sign, 11 for exponent and the others for fraction [2].<br>
>> -> How double precision value must be stored?<br>
><br>
> As Emil mentioned, on GLSL 1.30, a uvec2 consists of two, 32-bit<br>
> unsigned integers.  Each double precision value would be stored in a uvec2.<br>
><br>
>> 2- Where can I find |GL_ARB_gpu_shader_fp64 |documentation|?<br>
>> |<br>
>><br>
>><br>
>> This is my first exposure to Mesa. Please excuse me if I am asking basic<br>
>> questions.<br>
><br>
> For this particular project, you wouldn't need Mesa at all for quite<br>
> some time.  All of the initial project should be done in "raw" GLSL<br>
> 1.30, and any OpenGL implementation capable of GLSL 1.30 can be used.<br>
> You would implement (and test!) a library of functions like 'uvec2<br>
> addDouble(uvec2 a, uvec2 b)' that would provide all of the required<br>
> double precision operations.<br>
><br>
> The set of required functions should be pretty small.  I think:<br>
><br>
>  - add<br>
>  - negate<br>
>  - absolute value<br>
>  - multiply<br>
>  - reciprocal<br>
>  - convert to single precision<br>
>  - convert from single precision<br>
>  - pow (maybe?)<br>
>  - exp (maybe?)<br>
>  - log (maybe?)<br>
<br>
</div></div>I don't think you need exp/log. At least glsl dosen't require it, though<br>
the project isn't clear about it.<br>
(pow all hw I know of with exactly one exception (that would be intel<br>
graphics...) implements it as log2/mul/exp2 even for f32 anyway).<br>
I think though you need sqrt (or rsqrt). And some functions for<br>
rounding, plus comparison operations. Maybe min/max too (albeit if you<br>
have comparisons you can emulate them of course).<br>
<span class="HOEnZb"><font color="#888888"><br>
Roland<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
><br>
> I think everything else could be implemented using those functions.<br>
><br>
> Like I mentioned in the project description, there are quite a few<br>
> existing C implementations of these functions.  Finding one of those<br>
> that you can understand and that has a compatible license is probably<br>
> the best place to start.<br>
><br>
>> Please point me to the right resources so that I can better understand<br>
>> the project. I would also be happy to fix a bug to familiarize myself<br>
>> with the source code. Any suggestions on bugs that are relevant to the<br>
>> project will be of great help.<br>
>><br>
>> Regards,<br>
>> Elie<br>
>><br>
>> [1]<br>
>> <a href="http://www.x.org/wiki/SummerOfCodeIdeas/#softdoubleprecisionfloatingpointsupport" rel="noreferrer" target="_blank">http://www.x.org/wiki/SummerOfCodeIdeas/#softdoubleprecisionfloatingpointsupport</a><br>
>> [2] <a href="http://steve.hollasch.net/cgindex/coding/ieeefloat.html#storage" rel="noreferrer" target="_blank">http://steve.hollasch.net/cgindex/coding/ieeefloat.html#storage</a><br>
>><br>
>> PS: If you have any questions, please don't hesitate to contact me.<br>
>><br>
>><br>
>> _______________________________________________<br>
>> mesa-dev mailing list<br>
>> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
>> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
><br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
><br>
<br>
</div></div></blockquote></div><br></div>