Hi all,<div><br></div><div>Our experience with GPU and mac graphic card is the following : </div><div><br>- Macbook pro 2011, with ATI HD6750M running OSX Lion -> working fine, with the option ShadeOn on the volume property<br>

- iMac with ATI HD5740, running OSX Snow Leopard -> not working at all, experimenting the same crash as Karthik<br>- Macbook pro 2010, with an NVIDIA GT330M running OSX Lion -> working strangely, sometimes half of the volume is rendered correctly, and the other part is like a plain cube. But this might be related to the card memory's capacities as it can hold only 256 Mo.<br>

<br>We had to build vtk 5.8 with a patch similar to the one that Julien provided, and to backport the commit that fixed the shader in order to test/use that.<br><br>So what we are doing internally is : <br>If the system is OSX Lion, and the card name is ATI, use the vtkGPUVolumeRayCastMapper mapper, otherwise (on OSX only), fall back to the vtkFixedPointVolumeRayCastMapper ... Not ideal, and not the same interaction experience for all users, but at least some mac users can make use of the power of their graphic card.</div>

<div><br></div><div>Hope this can help.</div><div>-Simon<br><br><div class="gmail_quote">On Sat, Mar 24, 2012 at 16:54, Karthik Krishnan <span dir="ltr"><<a href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Julien:<div><br></div><div>Yes. We know that it after the fixes (<a href="http://vtk.org/gitweb?p=VTK.git;a=commit;h=ffe79ee12dcdc7b32defa9523567075a73dccbe7" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=commit;h=ffe79ee12dcdc7b32defa9523567075a73dccbe7</a>), it still does not work on certain mac/GPUs. We use the vtkSmartVolumeMapper that defaults to software rendering when the GPU renderer says that it cannot render. Its better for the GPU mapper to conservatively state that it cannot render rather than state that it can and fail on certain platforms/hardware combinations.</div>


<div><br></div><div>Rather than enable it on all Macs, I would recommend that you do is to selectively enable it only on known combinations of Mac/ graphic cards.</div><div><br></div><div>Here's what I know :</div><div>


<br></div><div><div><div style="font-size:13px;font-family:arial,sans-serif"><br>1. On my iMac</div><div style="font-size:13px;font-family:arial,sans-serif">
<br></div><div style="font-size:13px;font-family:arial,sans-serif">- Snow Leopard 10.6, ATI Radeon HD 4670, OpenGL 2.1 ATI-1.6.18</div><div style="font-size:13px;font-family:arial,sans-serif">
- Results in a crash (of the worst kind). It freezes the machine, necessitating a restart. </div><div style="font-size:13px;font-family:arial,sans-serif">- Attached is the iMac output log of the text. </div>
<div style="font-size:13px;font-family:arial,sans-serif">- Attached is the iMac glxinfo.</div><div style="font-size:13px;font-family:arial,sans-serif"><br>
The error is <br>    Validation Failed: Sampler error:<br>    Samplers of different types use the same texture image unit.<br>         - or -<br>   A sampler's texture unit is out of range (greater than max allowed or negative).<br>


<br> <br></div><div style="font-size:13px;font-family:arial,sans-serif">2. On my macbook</div><div style="font-size:13px;font-family:arial,sans-serif">- <a href="http://www.nvidia.com/object/product_geforce_9400m_g_us.html" style="color:rgb(0,0,204)" target="_blank">NVidia GeForce 9400M</a> (integrated video card, that uses 256MB of the main system memory)</div>


<div style="font-size:13px;font-family:arial,sans-serif">- 10.5.8 (Leopard) </div><div style="font-size:13px;font-family:arial,sans-serif">- All tests pass except all tests that use shading. They are<br>
    TestGPURayCastCompositeBinaryMask<br>    TestGPURayCastCompositeShadeMask<br>    TestGPURayCastCropping</div></div><br></div><div><br></div><div>3. A user has reported that it works on Lion, Nvidia card (<a href="http://markmail.org/message/7mmcz5euptb56fw5" target="_blank">http://markmail.org/message/7mmcz5euptb56fw5</a>). Not sure what card he is referring to.</div>


<div><br></div><div>4. Bob O'Bara (Kitware) had once sent me an email reporting that it works on his iMac and MacbookPro, both running ATI cards. (not sure if he tried it with shading ON, and not sure about the OS (version) they run).</div>


<div><br></div><div>--</div><div>karthik</div><div><br></div><div><br></div><div><br></div><div><div><div class="h5"><br><div class="gmail_quote">On Sat, Mar 24, 2012 at 1:06 AM, Julien Finet <span dir="ltr"><<a href="mailto:julien.finet@kitware.com" target="_blank">julien.finet@kitware.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div><br></div><div>Do we have any reason to keep disabling ATI cards from using the GPU raycaster on Mac OS X? </div>


<div><br></div><div>If not, I will backport this commit into VTK.</div><div><a href="https://github.com/Slicer/VTK/commit/3916fd9e3306ff0874379950764a7539a219f7f6" target="_blank">https://github.com/Slicer/VTK/commit/3916fd9e3306ff0874379950764a7539a219f7f6</a></div>




<div><br></div><div>Thanks,</div><div>Julien.<font color="#888888"><br><br></font><div class="gmail_quote"><div>On Tue, Nov 1, 2011 at 1:28 PM, Karthik Krishnan <span dir="ltr"><<a href="mailto:karthik.krishnan@kitware.com" target="_blank">karthik.krishnan@kitware.com</a>></span> wrote:<br>




</div><div><div></div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes. With the fix, GPU volume ray cast is supported on ATI now.<div><br></div><div>
Let's ask Dave Partyka if this fix can be moved to the last release of VTK ?</div>

<div><br></div><div>thanks</div><div>--</div><div>karthik</div><div><div>
<div><br><div class="gmail_quote">On Tue, Nov 1, 2011 at 10:00 PM, ianl <span dir="ltr"><<a href="mailto:ilindsay@insigniamedical.co.uk" target="_blank">ilindsay@insigniamedical.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





Good news. Looks like this might be fixed now (I haven't checked for my card<br>
yet though):<br>
<br>
<a href="http://vtk.org/gitweb?p=VTK.git;a=commit;h=ffe79ee12dcdc7b32defa9523567075a73dccbe7" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=commit;h=ffe79ee12dcdc7b32defa9523567075a73dccbe7</a><br>
<br>
I think you will need to get the master version. Any chance of this getting<br>
this merged into the 5.8 branch? It might already be, my knowledge of git is<br>
limited at best!<br>
<br>
Ian Lindsay<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/GPU-volume-rendering-on-ATI-Radeon-in-VTK-5-8-tp4806774p4955675.html" target="_blank">http://vtk.1045678.n5.nabble.com/GPU-volume-rendering-on-ATI-Radeon-in-VTK-5-8-tp4806774p4955675.html</a><br>






Sent from the VTK - Users mailing list archive at Nabble.com.<br>
</font><div><div></div><div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div></div></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>--<div>karthik</div><br>
</font></span></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br><br><div>-- <br>------------------------------------------------------------------<br>Simon Esneault - Therenva<br>Centre d'Innovation Technologique<br>Centre Cardio-Pneumologique<br>CHU Pontchaillou<br>

Rennes, France<br>Tel : +33 (0)6 64 61 30 94<br>Mail : <a href="mailto:simon.esneault@therenva.com" target="_blank">simon.esneault@therenva.com</a><br>------------------------------------------------------------------</div>

<br>
</div>