CCing the long thread to the dev list for archival (hopefully someone there will contribute an ATI build to the dashboard)<br><br>So after these three commits, the gist is that GPU ray cast on ATI can now work when used without shading. Why it would fail with shading enabled, is puzzling, since its essentially the same extensions, just a few more shader vars. <br>
<br>  <a href="http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=603423177b3514fd45e68d29ba7d18aa31cbd643" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=603423177b3514fd45e68d29ba7d18aa31cbd643</a><br>
  <a href="http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=09af243374d6d7cc5bd300147843fa58f5e797a8" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=09af243374d6d7cc5bd300147843fa58f5e797a8</a><br>
  <a href="http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=d6c9a0bbb5dbced83aee7b76c57779b6f541c212" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=d6c9a0bbb5dbced83aee7b76c57779b6f541c212</a><br><br>I'd prefer to continue committing to head since it'll tell me if it works on all the dashboard machines.<br>
<br>Thanks<br>--<br>karthik<br><br><div class="gmail_quote">On Sat, Jan 8, 2011 at 2:21 AM, Mark Roden <span dir="ltr"><<a href="mailto:mmroden@gmail.com">mmroden@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Karthik,<br>
<br>
Whoops.  These are the results with the most recently sycned code.<br>
Same three tests are failing.<br>
<br>
If you want, we can set up some kind of skype dual-programming on<br>
Monday if you need to have faster feedback.  I could sync to a branch<br>
in git that you're working in and compile and run the tests<br>
immediately.  When we do this by email, I start working on other<br>
projects in the meantime.<br>
<br>
Thanks,<br>
Mark<br>
<br>
<br>
On Fri, Jan 7, 2011 at 10:15 AM, Karthik Krishnan<br>
<div><div></div><div class="h5"><<a href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>> wrote:<br>
> Thanks Mark:<br>
><br>
> Great. We are getting there.<br>
><br>
> Did you also update VTK from git. As I mentioned earlier, I committed a<br>
> third fix to VTK for the ATI stuff hours ago, so as to set the size of the<br>
> max/min/additive value FBOs before their attachment is done.<br>
><br>
><br>
> <a href="http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=HEAD;hp=abd3dde48cd35e9e5b2c744735e5f12a33333af2" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=HEAD;hp=abd3dde48cd35e9e5b2c744735e5f12a33333af2</a><br>

><br>
> I was hoping that would get rid of the "AllocateFrameBuffers ERROR (x502)<br>
> Invalid operation" output on the test results that you have. I know they<br>
> pass, but its a bad sign.<br>
><br>
> Please update vtk and then send us the result.<br>
><br>
> ------<br>
><br>
> Now to the 3 remaining test failures. The 3 failing tests all use shading.<br>
> All the tests that pass don't use shading. This is something I'm finding on<br>
> my macs too and I haven't yet gotten to the bottom of it. I'm not sure why<br>
> volume rendering with shading should fail since they don't need any extra<br>
> extensions, as compared to not using shading. They just need a few more<br>
> shader vars to be passed. Will take a closer look at that.<br>
><br>
> Thanks again for your help.<br>
> --<br>
> karthik<br>
><br>
> On Fri, Jan 7, 2011 at 11:34 PM, Mark Roden <<a href="mailto:mmroden@gmail.com">mmroden@gmail.com</a>> wrote:<br>
>><br>
>> Hi Karthik,<br>
>><br>
>> So I pulled the VTKData as per: <a href="http://www.vtk.org/Wiki/VTK/Git" target="_blank">http://www.vtk.org/Wiki/VTK/Git</a><br>
>> Then re-cmaked with the new data directory.  I'm attaching these test<br>
>> results now.<br>
>><br>
>> Down to just three test failures, excellent!<br>
>><br>
>> Thanks,<br>
>> Mark<br>
>><br>
>><br>
>> On Thu, Jan 6, 2011 at 11:10 PM, Karthik Krishnan<br>
>> <<a href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>> wrote:<br>
>> > Thanks for your help Mark:<br>
>> ><br>
>> > I committed a third fix:<br>
>> ><br>
>> ><br>
>> > <a href="http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=HEAD;hp=abd3dde48cd35e9e5b2c744735e5f12a33333af2" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=HEAD;hp=abd3dde48cd35e9e5b2c744735e5f12a33333af2</a><br>

>> ><br>
>> > Could you please update. Also please switch to VTKData git. And send us<br>
>> > the<br>
>> > test results again.<br>
>> ><br>
>> > -------------<br>
>> ><br>
>> > Long summary:<br>
>> ><br>
>> > 11 of the GPU ray casting tests do pass with this change. Now to the 6<br>
>> > failed tests ...<br>
>> ><br>
>> > 4 tests can't locate baseline files. it appears that you are using<br>
>> > VTKData-5.6. I've added a few tests/baselines since. Please update<br>
>> > VTKData<br>
>> ><br>
>> >     TestGPURayCastAdditive - Update VTKData<br>
>> >     TestGPURayCastCompositeBinaryMask - Update VTKData<br>
>> >     TestGPURayCastMIPBinaryMask - Update VTKData<br>
>> >     TestGPURayCastPerspectiveParallel - Update VTKData<br>
>> ><br>
>> > The following tests report "AllocateFrameBuffers ERROR (x502) Invalid<br>
>> > operation" , although they pass:<br>
>> ><br>
>> >     TestGPURayCastAdditive<br>
>> >     TestGPURayCastCompositeToMIP<br>
>> >     TestGPURayCastDataTypesMinIP<br>
>> >     TestGPURayCastMIPBinaryMask<br>
>> >     TestGPURayCastDataTypesMIP<br>
>> >     TestGPURayCastFourComponentsMinIP<br>
>> >     TestGPURayCastFourComponentsMIP<br>
>> >     TestGPURayCastMIPToComposite<br>
>> >     TestGPURayCastNearestDataTypesMIP<br>
>> ><br>
>> > Now to the two remaining tests that appear to have really failed :<br>
>> ><br>
>> >     TestGPURayCastCompositeShadeMask<br>
>> >     TestGPURayCastCropping<br>
>> ><br>
>> > The following tests pass without errors:<br>
>> ><br>
>> >     TestGPURayCastCompositeMaskBlend<br>
>> >     TestGPURayCastCompositeMask<br>
>> >     TestGPURayCastFourComponentsComposite<br>
>> >     TestGPURayCastFourComponentsCompositeStreaming<br>
>> ><br>
>> ><br>
>> > As you can see, the MIP, MinIP and Additive modes produce errors. The<br>
>> > fact<br>
>> > is that modes use an extra FBO to store the max/min/add value. I've made<br>
>> > the<br>
>> > following commit to set the size of this FBO as well before they are<br>
>> > attached. That should hopefully get these modes working too on the ATI.<br>
>> ><br>
>> > -------------<br>
>> ><br>
>> > Mark: Onto your second question about the GPURenderDemo. We really<br>
>> > should<br>
>> > rename this demo.<br>
>> ><br>
>> > The GPURenderDemo example uses a vtkSmartVolumeMapper, which is<br>
>> > essentially<br>
>> > a "mapper chooser", ie if a GPU mapper is not supported due to any<br>
>> > required<br>
>> > extensions, it will fall back to either 3D texture mapping or to<br>
>> > software<br>
>> > rendering. (We should remove GPU from its name). That's the reason why<br>
>> > its<br>
>> > coming up quickly.. It just may not be doing a GPU ray cast :)<br>
>> ><br>
>> > -----<br>
>> ><br>
>> > Thanks again for your help.<br>
>> ><br>
>> > --<br>
>> > karthik<br>
>> ><br>
>> > On Fri, Jan 7, 2011 at 4:32 AM, Mark Roden <<a href="mailto:mmroden@gmail.com">mmroden@gmail.com</a>> wrote:<br>
>> >><br>
>> >> Hi Karthik,<br>
>> >><br>
>> >> I've attached the test results.  The first one passed, the second one<br>
>> >> not so much.<br>
>> >><br>
>> >> The interesting thing is that I have a pelvic CT study that appears to<br>
>> >> run very well on the GPURenderDemo MIP mode.  Not sure if those other<br>
>> >> test failures mean I can't use composite mode or what, though.<br>
>> >><br>
>> >> Also, the GPURenderDemo contexts come up _much_ more rapidly than when<br>
>> >> I try to load things in Java.  Would you know of any particular reason<br>
>> >> why a context would be slow to load?<br>
>> >><br>
>> >> Thanks,<br>
>> >> Mark<br>
>> >><br>
>> >> On Thu, Jan 6, 2011 at 8:00 AM, Mark Roden <<a href="mailto:mmroden@gmail.com">mmroden@gmail.com</a>> wrote:<br>
>> >> > Hi Karthik,<br>
>> >> ><br>
>> >> > Thanks for this!  I'll take a look.  I've been having problems<br>
>> >> > getting<br>
>> >> > the gdcm git head to work with the vtk git head-- there appears to be<br>
>> >> > some kind of misalignment in the java wrappings, as the<br>
>> >> > vtkStringArray<br>
>> >> > needed by gdcm to read a DICOM image appeared to have some problems<br>
>> >> > getting initialized when in java.  I'll retry, because I'd rather be<br>
>> >> > at the head anyway instead of 5.6.1.<br>
>> >> ><br>
>> >> > Mark<br>
>> >> ><br>
>> >> > On Wed, Jan 5, 2011 at 11:46 PM, Karthik Krishnan<br>
>> >> > <<a href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>> wrote:<br>
>> >> >> Mark:<br>
>> >> >><br>
>> >> >> I put some fixes in to attempt getting volume rendering to work on<br>
>> >> >> ATI.<br>
>> >> >> The<br>
>> >> >> FBO creation fails on ATI, probably because the assignment of the<br>
>> >> >> Renderbuffer/Texture is made to the FBO before the size of those is<br>
>> >> >> set.<br>
>> >> >><br>
>> >> >><br>
>> >> >><br>
>> >> >><br>
>> >> >> <a href="http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=09af243374d6d7cc5bd300147843fa58f5e797a8" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=09af243374d6d7cc5bd300147843fa58f5e797a8</a><br>

>> >> >><br>
>> >> >><br>
>> >> >><br>
>> >> >> <a href="http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=d6c9a0bbb5dbced83aee7b76c57779b6f541c212" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=d6c9a0bbb5dbced83aee7b76c57779b6f541c212</a><br>

>> >> >><br>
>> >> >><br>
>> >> >> Could you please update your repository and send me the results of<br>
>> >> >> the<br>
>> >> >> following :<br>
>> >> >><br>
>> >> >>   ctest -R LoadOpenGLExtension -V<br>
>> >> >>   ctest -R TestGPU -V<br>
>> >> >><br>
>> >> >> Alternatively you could submit to the dashboard. There are no ATI's<br>
>> >> >> on<br>
>> >> >> the<br>
>> >> >> VTK dashboard, so we are grateful for any contributions.<br>
>> >> >><br>
>> >> >> Thanks<br>
>> >> >> --<br>
>> >> >> karthik<br>
>> >> >><br>
>> >> >><br>
>> >> >> On Thu, Jan 6, 2011 at 5:50 AM, Mark Roden <<a href="mailto:mmroden@gmail.com">mmroden@gmail.com</a>><br>
>> >> >> wrote:<br>
>> >> >>><br>
>> >> >>> OK, I think I found the error.<br>
>> >> >>><br>
>> >> >>>  const char *gl_vendor=reinterpret_cast<const char<br>
>> >> >>> *>(glGetString(GL_VENDOR));<br>
>> >> >>>  if(strstr(gl_vendor,"ATI")!=0)<br>
>> >> >>>    {<br>
>> >> >>>    this->LoadExtensionsSucceeded=0;<br>
>> >> >>>    return;<br>
>> >> >>>    }<br>
>> >> >>><br>
>> >> >>> Why no ATI cards?  Is there some cmake flag I can set for this, or<br>
>> >> >>> am<br>
>> >> >>> I just SOL?  My graphics code editing experience is limited at<br>
>> >> >>> best,<br>
>> >> >>> but if there's a set of functions I can look at doing to get ATI<br>
>> >> >>> working, lemme know.<br>
>> >> >>><br>
>> >> >>> If I comment out those lines, the program now fails (badly) in<br>
>> >> >>> AllocateFrameBuffers.  I'll have to switch to C++ to track down the<br>
>> >> >>> error further, so that's next, I guess.<br>
>> >> >>><br>
>> >> >>> Mark<br>
>> >> >>><br>
>> >> >>> On Wed, Jan 5, 2011 at 3:04 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>><br>
>> >> >>> wrote:<br>
>> >> >>> > Just one additional note.  I just looked at the code for the<br>
>> >> >>> > various<br>
>> >> >>> > volume mappers, and only the vtkGPUVolumeRayCastMapper<br>
>> >> >>> > supports the Additive mode.  This mode is not supported by the<br>
>> >> >>> > vtkVolumeRayCastMapper or vtkFixedPointVolumeRayCastMapper.<br>
>> >> >>> ><br>
>> >> >>> > I think that I'll play around with this a bit myself when I get<br>
>> >> >>> > home<br>
>> >> >>> > (since only my home computer supports this GPU stuff).  I'm kind<br>
>> >> >>> > of curious about how well this Additive mode works.<br>
>> >> >>> ><br>
>> >> >>> >  David<br>
>> >> >>> ><br>
>> >> >>> ><br>
>> >> >>> > On Wed, Jan 5, 2011 at 3:40 PM, Mark Roden <<a href="mailto:mmroden@gmail.com">mmroden@gmail.com</a>><br>
>> >> >>> > wrote:<br>
>> >> >>> >> Hi David,<br>
>> >> >>> >><br>
>> >> >>> >> Thanks for the pointers.  I had been looking at those tests<br>
>> >> >>> >> earlier.<br>
>> >> >>> >> I'm considering porting at least the additive test to java, just<br>
>> >> >>> >> to<br>
>> >> >>> >> see if it works.  I have a version of the Medical3 test in java,<br>
>> >> >>> >> and<br>
>> >> >>> >> doing so will let me know if I should expect this to work, and<br>
>> >> >>> >> if<br>
>> >> >>> >> not,<br>
>> >> >>> >> to have a concise piece of code to demonstrate the error in the<br>
>> >> >>> >> hopes<br>
>> >> >>> >> it can be fixed.<br>
>> >> >>> >><br>
>> >> >>> >> Mark<br>
>> >> >>> >><br>
>> >> >>> >> On Wed, Jan 5, 2011 at 1:58 PM, David Gobbi<br>
>> >> >>> >> <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>><br>
>> >> >>> >> wrote:<br>
>> >> >>> >>> It looks like I might have been wrong about my last statement.<br>
>> >> >>> >>> I see this in vtkVolumeMapper.h:<br>
>> >> >>> >>><br>
>> >> >>> >>>  SetBlendModeToAdditive();<br>
>> >> >>> >>><br>
>> >> >>> >>> So it looks like at least some of the VTK volume renderers<br>
>> >> >>> >>> can do summation.  It looks like there are even some tests:<br>
>> >> >>> >>><br>
>> >> >>> >>> VolumeRendering/Testing/Cxx/TestGPURayCastAdditive.cxx<br>
>> >> >>> >>><br>
>> >> >>> >>> VolumeRendering/Testing/Cxx/TestGPURayCastPerspectiveParallel.cxx<br>
>> >> >>> >>><br>
>> >> >>> >>> Interesting stuff.<br>
>> >> >>> >>><br>
>> >> >>> >>>  David<br>
>> >> >>> >>><br>
>> >> >>> >>><br>
>> >> >>> >>> On Wed, Jan 5, 2011 at 2:35 PM, David Gobbi<br>
>> >> >>> >>> <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>><br>
>> >> >>> >>> wrote:<br>
>> >> >>> >>>> About all that I can suggest is that you look directly into<br>
>> >> >>> >>>> the<br>
>> >> >>> >>>> code<br>
>> >> >>> >>>> for<br>
>> >> >>> >>>> vtkOpenGLGPUVolumeRayCastMapper::LoadExtensions() and see<br>
>> >> >>> >>>> what extension is failing.<br>
>> >> >>> >>>><br>
>> >> >>> >>>> In LoadExtensions(), the one place where it can fail without<br>
>> >> >>> >>>> printing<br>
>> >> >>> >>>> the extension it failed on is right here:<br>
>> >> >>> >>>><br>
>> >> >>> >>>>    if(glslMajor<1 || (glslMajor==1 && glslMinor<20))<br>
>> >> >>> >>>>      {<br>
>> >> >>> >>>>      this->LoadExtensionsSucceeded=0;<br>
>> >> >>> >>>>      }<br>
>> >> >>> >>>><br>
>> >> >>> >>>> That might provide you with some clues.<br>
>> >> >>> >>>><br>
>> >> >>> >>>> Also, don't forget my earlier comment that VTK volume<br>
>> >> >>> >>>> rendering<br>
>> >> >>> >>>> does not do averaging or summation, so if averaging is what<br>
>> >> >>> >>>> you<br>
>> >> >>> >>>> need, then all of this is moot :)<br>
>> >> >>> >>>><br>
>> >> >>> >>>>  David<br>
>> >> >>> >>>><br>
>> >> >>> >>>><br>
>> >> >>> >>>> On Wed, Jan 5, 2011 at 2:11 PM, Mark Roden <<a href="mailto:mmroden@gmail.com">mmroden@gmail.com</a>><br>
>> >> >>> >>>> wrote:<br>
>> >> >>> >>>>> Hi David,<br>
>> >> >>> >>>>><br>
>> >> >>> >>>>> I'm actually doing this on Windows this time.  Sorry I didn't<br>
>> >> >>> >>>>> specify-- although it's good to know to not even try on the<br>
>> >> >>> >>>>> mac<br>
>> >> >>> >>>>> just<br>
>> >> >>> >>>>> yet :)<br>
>> >> >>> >>>>><br>
>> >> >>> >>>>> Thanks,<br>
>> >> >>> >>>>> Mark<br>
>> >> >>> >>>><br>
>> >> >>> >>><br>
>> >> >>> >><br>
>> >> >>> ><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<br>
>> >> >>> <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:<br>
>> >> >>> <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>
>> >> >><br>
>> >> ><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br>