[vtkusers] GPU volume rendering on ATI Radeon in VTK 5.8

Karthik Krishnan karthik.krishnan at kitware.com
Sat Mar 24 11:54:30 EDT 2012


Julien:

Yes. We know that it after the fixes (
http://vtk.org/gitweb?p=VTK.git;a=commit;h=ffe79ee12dcdc7b32defa9523567075a73dccbe7),
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.

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.

Here's what I know :


1. On my iMac

- Snow Leopard 10.6, ATI Radeon HD 4670, OpenGL 2.1 ATI-1.6.18
- Results in a crash (of the worst kind). It freezes the machine,
necessitating a restart.
- Attached is the iMac output log of the text.
- Attached is the iMac glxinfo.

The error is
    Validation Failed: Sampler error:
    Samplers of different types use the same texture image unit.
         - or -
   A sampler's texture unit is out of range (greater than max allowed or
negative).


2. On my macbook
- NVidia GeForce
9400M<http://www.nvidia.com/object/product_geforce_9400m_g_us.html>
(integrated
video card, that uses 256MB of the main system memory)
- 10.5.8 (Leopard)
- All tests pass except all tests that use shading. They are
    TestGPURayCastCompositeBinaryMask
    TestGPURayCastCompositeShadeMask
    TestGPURayCastCropping


3. A user has reported that it works on Lion, Nvidia card (
http://markmail.org/message/7mmcz5euptb56fw5). Not sure what card he is
referring to.

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).

--
karthik




On Sat, Mar 24, 2012 at 1:06 AM, Julien Finet <julien.finet at kitware.com>wrote:

> Hi,
>
> Do we have any reason to keep disabling ATI cards from using the GPU
> raycaster on Mac OS X?
>
> If not, I will backport this commit into VTK.
>
> https://github.com/Slicer/VTK/commit/3916fd9e3306ff0874379950764a7539a219f7f6
>
> Thanks,
> Julien.
>
> On Tue, Nov 1, 2011 at 1:28 PM, Karthik Krishnan <
> karthik.krishnan at kitware.com> wrote:
>
>> Yes. With the fix, GPU volume ray cast is supported on ATI now.
>>
>> Let's ask Dave Partyka if this fix can be moved to the last release of
>> VTK ?
>>
>> thanks
>> --
>> karthik
>>
>> On Tue, Nov 1, 2011 at 10:00 PM, ianl <ilindsay at insigniamedical.co.uk>wrote:
>>
>>> Good news. Looks like this might be fixed now (I haven't checked for my
>>> card
>>> yet though):
>>>
>>>
>>> http://vtk.org/gitweb?p=VTK.git;a=commit;h=ffe79ee12dcdc7b32defa9523567075a73dccbe7
>>>
>>> I think you will need to get the master version. Any chance of this
>>> getting
>>> this merged into the 5.8 branch? It might already be, my knowledge of
>>> git is
>>> limited at best!
>>>
>>> Ian Lindsay
>>>
>>> --
>>> View this message in context:
>>> http://vtk.1045678.n5.nabble.com/GPU-volume-rendering-on-ATI-Radeon-in-VTK-5-8-tp4806774p4955675.html
>>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>


-- 
--
karthik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120324/3327c727/attachment.htm>
-------------- next part --------------
name of display: /tmp/launch-qNWPap/org.x:0
display: /tmp/launch-qNWPap/org.x:0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method, 
    GLX_SGI_make_current_read, GLX_SGIX_fbconfig, GLX_MESA_copy_sub_buffer
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_rating, 
    GLX_SGIX_fbconfig, GLX_SGIX_visual_select_group, 
    GLX_EXT_texture_from_pixmap
GLX version: 1.2
GLX extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_rating, 
    GLX_SGIX_fbconfig, GLX_EXT_texture_from_pixmap
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon HD 4670 OpenGL Engine
OpenGL version string: 2.1 ATI-1.6.18
OpenGL shading language version string: 1.20
OpenGL extensions:
    GL_ARB_transpose_matrix, GL_ARB_vertex_program, GL_ARB_vertex_blend, 
    GL_ARB_window_pos, GL_ARB_shader_objects, GL_ARB_vertex_shader, 
    GL_ARB_shading_language_100, GL_EXT_multi_draw_arrays, 
    GL_EXT_clip_volume_hint, GL_EXT_rescale_normal, 
    GL_EXT_draw_range_elements, GL_EXT_fog_coord, 
    GL_EXT_gpu_program_parameters, GL_EXT_geometry_shader4, 
    GL_EXT_transform_feedback, GL_APPLE_client_storage, 
    GL_APPLE_specular_vector, GL_APPLE_transform_hint, GL_APPLE_packed_pixels, 
    GL_APPLE_fence, GL_APPLE_vertex_array_object, 
    GL_APPLE_vertex_program_evaluators, GL_APPLE_element_array, 
    GL_APPLE_flush_render, GL_APPLE_aux_depth_stencil, 
    GL_NV_texgen_reflection, GL_NV_light_max_exponent, GL_IBM_rasterpos_clip, 
    GL_SGIS_generate_mipmap, GL_ARB_imaging, GL_ARB_point_parameters, 
    GL_ARB_texture_env_crossbar, GL_ARB_texture_border_clamp, 
    GL_ARB_multitexture, GL_ARB_texture_env_add, GL_ARB_texture_cube_map, 
    GL_ARB_texture_env_dot3, GL_ARB_multisample, GL_ARB_texture_env_combine, 
    GL_ARB_texture_compression, GL_ARB_texture_mirrored_repeat, GL_ARB_shadow, 
    GL_ARB_depth_texture, GL_ARB_shadow_ambient, GL_ARB_fragment_program, 
    GL_ARB_fragment_program_shadow, GL_ARB_fragment_shader, 
    GL_ARB_occlusion_query, GL_ARB_point_sprite, 
    GL_ARB_texture_non_power_of_two, GL_ARB_vertex_buffer_object, 
    GL_ARB_pixel_buffer_object, GL_ARB_draw_buffers, 
    GL_ARB_shader_texture_lod, GL_ARB_color_buffer_float, 
    GL_ARB_half_float_vertex, GL_ARB_texture_rg, 
    GL_ARB_texture_compression_rgtc, GL_ARB_framebuffer_object, 
    GL_EXT_compiled_vertex_array, GL_EXT_draw_buffers2, 
    GL_EXT_framebuffer_object, GL_EXT_framebuffer_blit, 
    GL_EXT_framebuffer_multisample, GL_EXT_texture_rectangle, 
    GL_ARB_texture_rectangle, GL_EXT_texture_env_add, GL_EXT_blend_color, 
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_texture_lod_bias, 
    GL_EXT_abgr, GL_EXT_bgra, GL_EXT_stencil_wrap, 
    GL_EXT_texture_filter_anisotropic, GL_EXT_separate_specular_color, 
    GL_EXT_secondary_color, GL_EXT_blend_func_separate, GL_EXT_shadow_funcs, 
    GL_EXT_stencil_two_side, GL_EXT_texture_compression_s3tc, 
    GL_EXT_texture_compression_dxt1, GL_EXT_texture_sRGB, 
    GL_EXT_blend_equation_separate, GL_EXT_texture_mirror_clamp, 
    GL_EXT_packed_depth_stencil, GL_EXT_bindable_uniform, 
    GL_EXT_texture_integer, GL_EXT_gpu_shader4, GL_EXT_framebuffer_sRGB, 
    GL_EXT_provoking_vertex, GL_APPLE_flush_buffer_range, GL_APPLE_ycbcr_422, 
    GL_APPLE_rgb_422, GL_APPLE_vertex_array_range, GL_APPLE_texture_range, 
    GL_APPLE_float_pixels, GL_ATI_texture_float, GL_ARB_texture_float, 
    GL_ARB_half_float_pixel, GL_APPLE_pixel_buffer, GL_APPLE_object_purgeable, 
    GL_NV_blend_square, GL_NV_fog_distance, GL_NV_conditional_render, 
    GL_ATI_texture_mirror_once, GL_ATI_blend_equation_separate, 
    GL_ATI_blend_weighted_minmax, GL_ATI_texture_env_combine3, 
    GL_ATI_separate_stencil, GL_ATI_texture_compression_3dc, 
    GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_SGI_color_matrix, 
    GL_EXT_texture_array, GL_EXT_vertex_array_bgra, GL_ARB_instanced_arrays, 
    GL_ARB_depth_buffer_float, GL_EXT_packed_float, 
    GL_EXT_texture_shared_exponent

1088 GLX Visuals
   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat

<truncated>
-------------- next part --------------
test 183
      Start 183: TestGPUInfo

183: Test command: /Users/karthik/BuildVTK/bin/RenderingCxxTests "TestGPUInfo" "-D" "/Users/karthik/vtkdata-5-1" "-T" "/Users/karthik/BuildVTK/Testing/Temporary" "-V" "Baseline/Rendering/TestGPUInfo.png"
183: Test timeout computed to be: 1500
183: There is 1 GPU(s).
183:  GPU 0: 
183:   dedicated VRAM=0 MB
183:   dedicated RAM=0 MB
183:   shared RAM=0 MB
 1/18 Test #183: TestGPUInfo ......................................   Passed    0.81 sec
test 259
      Start 259: TestGPURayCastAdditive

259: Test command: /Users/karthik/BuildVTK/bin/VolumeRenderingCxxTests "TestGPURayCastAdditive" "-D" "/Users/karthik/vtkdata-5-1" "-T" "/Users/karthik/BuildVTK/Testing/Temporary" "-V" "Baseline/VolumeRendering/TestGPURayCastAdditive.png"
259: Test timeout computed to be: 1500
259: CTEST_FULL_OUTPUT (Avoid ctest truncation of output)
259: Current framebuffer is bind to the system one
259: draw buffer 0=GL_BACK
259: draw buffer 1=GL_NONE
259: draw buffer 2=GL_NONE
259: draw buffer 3=GL_NONE
259: draw buffer 4=GL_NONE
259: draw buffer 5=GL_NONE
259: draw buffer 6=GL_NONE
259: draw buffer 7=GL_NONE
259: read buffer=GL_BACK
259: Current framebuffer is bind to the system one
259: draw buffer 0=GL_BACK
259: draw buffer 1=GL_NONE
259: draw buffer 2=GL_NONE
259: draw buffer 3=GL_NONE
259: draw buffer 4=GL_NONE
259: draw buffer 5=GL_NONE
259: draw buffer 6=GL_NONE
259: draw buffer 7=GL_NONE
259: read buffer=GL_BACK
259: BEFORE isValid0
259: Validation Failed: Sampler error:
259:   Samplers of different types use the same texture image unit.
259:    - or -
259:   A sampler's texture unit is out of range (greater than max allowed or negative).
259: 
259: There are 20 active uniform variables.
259: 0 vec2 windowLowerLeftCorner={0 0}
259: 1 vec2 invWindowSize={0 0}
259: 2 sampler2D depthTexture=3 (Texture Unit)->1 (Texture Object)
259: 3 vec2 invOriginalWindowSize={0 0}
259: 4 mat4 textureToEye={0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0}
259: 5 sampler2D noiseTexture=6 (Texture Unit)->5 (Texture Object)
259: 6 vec3 cameraPosition={0 0 0}
259: 7 vec3 matrix1={0 0 0}
259: 8 vec3 matrix2={0 0 0}
259: 9 float sampleDistance=0
259: 10 sampler3D dataSetTexture=0 (Texture Unit)->0 (Texture Object)
259: 11 sampler1D opacityTexture=2 (Texture Unit)->0 (Texture Object)
259: 12 vec3 lowBounds={0 0 0}
259: 13 vec3 highBounds={0 0 0}
259: 14 sampler2D frameBufferTexture=0 (Texture Unit)->1 (Texture Object)
259: 15 sampler1D colorTexture=1 (Texture Unit)->4 (Texture Object)
259: 16 float gl_DepthRange.near=<built-in value>
259: 17 float gl_DepthRange.far=<built-in value>
259: 18 float gl_DepthRange.diff=<built-in value>
259: 19 mat4 gl_ProjectionMatrixInverse={<built-in value>}
259: vtkUniformVariables (0x104333840)
259:   Debug: Off
259:   Modified Time: 1855
259:   Reference Count: 1
259:   Registered Events: (none)
259:   colorTexture (uniform1i): 1
259:   dataSetTexture (uniform1i): 0
259:   depthTexture (uniform1i): 3
259:   noiseTexture (uniform1i): 6
259:   opacityTexture (uniform1i): 2
259: 
259: AFTER isValid0
259: Current framebuffer is bind to the system one
259: draw buffer 0=GL_BACK
259: draw buffer 1=GL_NONE
259: draw buffer 2=GL_NONE
259: draw buffer 3=GL_NONE
259: draw buffer 4=GL_NONE
259: draw buffer 5=GL_NONE
259: draw buffer 6=GL_NONE
259: draw buffer 7=GL_NONE
259: read buffer=GL_BACK
259: BEFORE isValid1
259: AFTER isValid1
259: Current framebuffer is bind to the system one
259: draw buffer 0=GL_BACK
259: draw buffer 1=GL_NONE
259: draw buffer 2=GL_NONE
259: draw buffer 3=GL_NONE
259: draw buffer 4=GL_NONE
259: draw buffer 5=GL_NONE
259: draw buffer 6=GL_NONE
259: draw buffer 7=GL_NONE
259: read buffer=GL_BACK
259: BEFORE isValid2
259: AFTER isValid2
259: Current framebuffer is bind to the system one
259: draw buffer 0=GL_BACK
259: draw buffer 1=GL_NONE
259: draw buffer 2=GL_NONE
259: draw buffer 3=GL_NONE
259: draw buffer 4=GL_NONE
259: draw buffer 5=GL_NONE
259: draw buffer 6=GL_NONE
259: draw buffer 7=GL_NONE
259: read buffer=GL_BACK
259: Current framebuffer is bind to framebuffer object 1
259: color attachement 0:
259:  this attachment is a texture with name: 2
259:  its mipmap level is: 0
259:  this is not a cube map texture.
259:  this is not 3D texture.
259: color attachement 1:
259:  this attachment is empty
259: color attachement 2:
259:  this attachment is empty
259: color attachement 3:
259:  this attachment is empty
259: color attachement 4:
259:  this attachment is empty
259: color attachement 5:
259:  this attachment is empty
259: color attachement 6:
259:  this attachment is empty
259: color attachement 7:
259:  this attachment is empty
259: depth attachement :
259:  this attachment is a renderbuffer
259:  this attachment is a renderbuffer with name: 1
259:  renderbuffer width=301
259:  renderbuffer height=300
259:  renderbuffer internal format=0x81a7
259:  renderbuffer actual resolution for the red component=0
259:  renderbuffer actual resolution for the green component=0
259:  renderbuffer actual resolution for the blue component=0
259:  renderbuffer actual resolution for the alpha component=0
259:  renderbuffer actual resolution for the depth component=32
259:  renderbuffer actual resolution for the stencil component=0
259: stencil attachement :
259:  this attachment is empty
259: draw buffer 0=GL_COLOR_ATTACHMENT0_EXT
259: draw buffer 1=GL_NONE
259: draw buffer 2=GL_NONE
259: draw buffer 3=GL_NONE
259: draw buffer 4=GL_NONE
259: draw buffer 5=GL_NONE
259: draw buffer 6=GL_NONE
259: draw buffer 7=GL_NONE
259: read buffer=GL_COLOR_ATTACHMENT0_EXT
259: Current framebuffer is bind to framebuffer object 1
259: color attachement 0:
259:  this attachment is a texture with name: 2
259:  its mipmap level is: 0
259:  this is not a cube map texture.
259:  this is not 3D texture.
259: color attachement 1:
259:  this attachment is a texture with name: 3
259:  its mipmap level is: 0
259:  this is not a cube map texture.
259:  this is not 3D texture.
259: color attachement 2:
259:  this attachment is empty
259: color attachement 3:
259:  this attachment is empty
259: color attachement 4:
259:  this attachment is empty
259: color attachement 5:
259:  this attachment is empty
259: color attachement 6:
259:  this attachment is empty
259: color attachement 7:
259:  this attachment is empty
259: depth attachement :
259:  this attachment is a renderbuffer
259:  this attachment is a renderbuffer with name: 1
259:  renderbuffer width=301
259:  renderbuffer height=300
259:  renderbuffer internal format=0x81a7
259:  renderbuffer actual resolution for the red component=0
259:  renderbuffer actual resolution for the green component=0
259:  renderbuffer actual resolution for the blue component=0
259:  renderbuffer actual resolution for the alpha component=0
259:  renderbuffer actual resolution for the depth component=32
259:  renderbuffer actual resolution for the stencil component=0
259: stencil attachement :
259:  this attachment is empty
259: draw buffer 0=GL_COLOR_ATTACHMENT0_EXT
259: draw buffer 1=GL_COLOR_ATTACHMENT1_EXT
259: draw buffer 2=GL_NONE
259: draw buffer 3=GL_NONE
259: draw buffer 4=GL_NONE
259: draw buffer 5=GL_NONE
259: draw buffer 6=GL_NONE
259: draw buffer 7=GL_NONE
259: read buffer=GL_COLOR_ATTACHMENT0_EXT
259: Current framebuffer is bind to framebuffer object 1
259: color attachement 0:
259:  this attachment is a texture with name: 2
259:  its mipmap level is: 0
259:  this is not a cube map texture.
259:  this is not 3D texture.
259: color attachement 1:
259:  this attachment is empty
259: color attachement 2:
259:  this attachment is empty
259: color attachement 3:
259:  this attachment is empty
259: color attachement 4:
259:  this attachment is empty
259: color attachement 5:
259:  this attachment is empty
259: color attachement 6:
259:  this attachment is empty
259: color attachement 7:
259:  this attachment is empty
259: depth attachement :
259:  this attachment is a renderbuffer
259:  this attachment is a renderbuffer with name: 1
259:  renderbuffer width=301
259:  renderbuffer height=300
259:  renderbuffer internal format=0x81a7
259:  renderbuffer actual resolution for the red component=0
259:  renderbuffer actual resolution for the green component=0
259:  renderbuffer actual resolution for the blue component=0
259:  renderbuffer actual resolution for the alpha component=0
259:  renderbuffer actual resolution for the depth component=32
259:  renderbuffer actual resolution for the stencil component=0
259: stencil attachement :
259:  this attachment is empty
259: draw buffer 0=GL_COLOR_ATTACHMENT0_EXT
259: draw buffer 1=GL_NONE
259: draw buffer 2=GL_NONE
259: draw buffer 3=GL_NONE
259: draw buffer 4=GL_NONE
259: draw buffer 5=GL_NONE
259: draw buffer 6=GL_NONE
259: draw buffer 7=GL_NONE
259: read buffer=GL_COLOR_ATTACHMENT0_EXT
259: Current framebuffer is bind to framebuffer object 1
259: color attachement 0:
259:  this attachment is a texture with name: 2
259:  its mipmap level is: 0
259:  this is not a cube map texture.
259:  this is not 3D texture.
259: color attachement 1:
259:  this attachment is empty
259: color attachement 2:
259:  this attachment is empty
259: color attachement 3:
259:  this attachment is empty
259: color attachement 4:
259:  this attachment is empty
259: color attachement 5:
259:  this attachment is empty
259: color attachement 6:
259:  this attachment is empty
259: color attachement 7:
259:  this attachment is empty
259: depth attachement :
259:  this attachment is a renderbuffer
259:  this attachment is a renderbuffer with name: 1
259:  renderbuffer width=301
259:  renderbuffer height=300
259:  renderbuffer internal format=0x81a7
259:  renderbuffer actual resolution for the red component=0
259:  renderbuffer actual resolution for the green component=0
259:  renderbuffer actual resolution for the blue component=0
259:  renderbuffer actual resolution for the alpha component=0
259:  renderbuffer actual resolution for the depth component=32
259:  renderbuffer actual resolution for the stencil component=0
259: stencil attachement :
259:  this attachment is empty
259: draw buffer 0=GL_COLOR_ATTACHMENT0_EXT
259: draw buffer 1=GL_NONE
259: draw buffer 2=GL_NONE
259: draw buffer 3=GL_NONE
259: draw buffer 4=GL_NONE
259: draw buffer 5=GL_NONE
259: draw buffer 6=GL_NONE
259: draw buffer 7=GL_NONE
259: read buffer=GL_COLOR_ATTACHMENT0_EXT
259: There are 20 active uniform variables.
259: 0 vec2 windowLowerLeftCorner={0 0}
259: 1 vec2 invWindowSize={0.00332226 0.00333333}
259: 2 sampler2D depthTexture=3 (Texture Unit)->1 (Texture Object)
259: 3 vec2 invOriginalWindowSize={0.00332226 0.00333333}
259: 4 mat4 textureToEye={0.5 -0 0 -0 -0 0.5 -0 0 0 -0 0.5 -0 0.5 0.5 3.84607 1}
259: 5 sampler2D noiseTexture=6 (Texture Unit)->5 (Texture Object)
259: 6 vec3 cameraPosition={0.5 0.5 3.81972}
259: 7 vec3 matrix1={4 4 4}
259: 8 vec3 matrix2={0 0 0}
259: 9 float sampleDistance=0.015873
259: 10 sampler3D dataSetTexture=0 (Texture Unit)->7 (Texture Object)
259: 11 sampler1D opacityTexture=2 (Texture Unit)->6 (Texture Object)
259: 12 vec3 lowBounds={0.00393701 0.00393701 0.00393701}
259: 13 vec3 highBounds={0.996063 0.996063 0.996063}
259: 14 sampler2D frameBufferTexture=4 (Texture Unit)->3 (Texture Object)
259: 15 sampler1D colorTexture=1 (Texture Unit)->4 (Texture Object)
259: 16 float gl_DepthRange.near=<built-in value>
259: 17 float gl_DepthRange.far=<built-in value>
259: 18 float gl_DepthRange.diff=<built-in value>
259: 19 mat4 gl_ProjectionMatrixInverse={<built-in value>}


More information about the vtkusers mailing list