Commit d9d8d222 authored by Burlen Loring's avatar Burlen Loring Committed by Burlen Loring
Browse files

workaround specific Mesa bugs

* Mesa's "Software Rasterizer" renderer has bugs that
prevent depth peeling. all related ctests fail. disable
this feature.

* Mesa's "llvmpipe" has bugs that prevent depth peeling.
some of the ctests fail. disable this feature.

* Mesa version 7 "Software Rasterizer" GL_ARB_draw_buffers
has a bug that leaves FBO in a perpetually incomplete state,
disable FBO for this renderer.

Change-Id: I46f4f175fbd634a67eeeff904e19ef195494c1ff
parent 8bd885f1
......@@ -101,12 +101,19 @@ bool vtkFrameBufferObject::IsSupported(vtkRenderWindow *win)
bool fbo = mgr->ExtensionSupported("GL_EXT_framebuffer_object")==1;
bool fboBlit = mgr->ExtensionSupported("GL_EXT_framebuffer_blit")==1;
// On 1.4 Mesa 8.0.4 with Mesa DRI Intel(R) 945GME
// shader fails to compile "gl_FragData[1] = ..."
// 0:46(15): error: array index must be < 1
// On Mesa 8.0.4 reporting OpenGL 1.4 with renderer
// "Mesa DRI Intel(R) 945GME" shader fails to compile
// "gl_FragData[1] = ..." with the error
// 0:46(15): error: array index must be < 1
// Mesa 7 with renderer "Software Rasterizer
// has a bug GL_ARB_draw_buffers that leaves the FBO
// perpetually incomplete.
bool driver
= !(mgr->DriverIsMesa()
&& mgr->DriverGLVersionIs(1,4));
&& (mgr->DriverGLVersionIs(1,4)
|| (mgr->DriverVersionIs(7)
&& mgr->DriverGLRendererIs("Software Rasterizer"))));
return tex3D && depthTex && drawBufs && fbo && fboBlit && driver;
}
......
......@@ -378,10 +378,21 @@ void vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry()
int supportsAtLeast8AlphaBits=alphaBits>=8;
// TODO verify that newer ATI devices still have the issue
// TODO verify that newer Mesa Gallium llvmpipe still have the issue
// Mesa with "Offscreen" renderer (ie OS Mesa) supports depth peeling in
// all versions tested 7.10, 8.0, 8.0.5, 9.0.3, 9.1.3, 9.1.4, 9.1.5
// Mesa version 7 with "Software Rasterizer" renderer all Opacity/Translucent
// ctests fail with depth peeling
// Mesa 9.1.5 with Gallium llvmpipe renderer some of these tests fail
// Mesa 8 with GMA945 renderer supports depth peeling
int driver_support
= (!extensions->DriverIsATI()
&& (!extensions->DriverIsMesa() || extensions->DriverVersionAtLeast(6,5,3)))
|| extensions->GetIgnoreDriverBugs("ATI depth peeling bug." );
&& (!extensions->DriverIsMesa()
|| extensions->DriverGLRendererHas("Offscreen")
|| (extensions->DriverVersionAtLeast(6,5,3)
&& !extensions->DriverGLRendererIs("Software Rasterizer")
&& !extensions->DriverGLRendererHasToken("llvmpipe"))))
|| extensions->GetIgnoreDriverBugs("ATI/Mesa depth peeling bug." );
this->DepthPeelingIsSupported =
supports_depth_texture &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment