<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Geometry missing from rendering, only when using Mesa."
href="https://bugs.freedesktop.org/show_bug.cgi?id=95266">95266</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Geometry missing from rendering, only when using Mesa.
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Mesa core
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>david.lonie@kitware.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=123465" name="attach_123465" title="Reproduction of issue">attachment 123465</a> <a href="attachment.cgi?id=123465&action=edit" title="Reproduction of issue">[details]</a></span>
Reproduction of issue
VTK's new depth peeling implementation has been tested on numerous platforms
(mac, windows, linux, iOS/android ES3) and various OpenGL implementations
(nVidia, ATI, Intel, and Mesa), but only fails when using mesa.
This issue was first described in another bug report:
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Uninitialized variables leads to random segfaults (valgrind log, apitrace attached)"
href="show_bug.cgi?id=94955">https://bugs.freedesktop.org/show_bug.cgi?id=94955</a>
but the issue has moved away from the original topic of that report. From the
discussion there, it appears to be some issue in the floating point textures
used in the new peeling code, as the samplers are returning NaNs (If I
understand the discussion correctly). Indeed, the old peeling implementation
(which works on Mesa) only used 32-bit RGBA textures.
I've provided an executable from VTK that reproduces the issue, a compiled mesa
libGL.so, and sample outputs using nVidia and Mesa OpenGL implementations,
along with details on how VTK and Mesa were configured.
The README included in the tarball is pasted below for further details.
---------------------------------
This directory contains a reproduction of a Mesa OpenGL bug that
affects VTK's new depth peeling code. It contains the following files:
libGL.so - A compiled mesa OpenGL implementation, built against 38fcf7cb.
run-mesa.sh - A script to run the test executable with the included mesa
library.
run-sysGL.sh - A script to run the test executable using the system OpenGL
library.
TestTranslucentLUTDepthPeeling-valid.png - Example valid output for test.
TestTranslucentLUTDepthPeeling-mesa.png - Incorrect output for test from mesa.
vtkRenderingCoreCxxTests -- The test executable.
# Reproducing the bug
Execute run-sysGL.sh. This will run the TestTranslucentLUTDepthPeeling
test in the vtkRenderingCoreCxxTests executable using the libGL.so
found in LD_LIBRARY_PATH. This code has been successfully tested on
windows, mac, iOS/android GL ES3, and linux, using nVidia, intel, and
ATI OpenGL implementations. The output should resemble the included
'valid' png.
Execute run-mesa.sh. This runs the test using the included libGL.so
(change the LD_PRELOAD value in the script to test a different
library). The output will resemble the included 'mesa' png -- just the
background, with no visible geometry.
# Notes: Building Mesa
The included mesa libGL.so was compiled with the options:
./autogen.sh \
--enable-debug \
--prefix=/ssd/src/mesa-master-install-nomangle \
--disable-dri \
--disable-egl \
--disable-gles1 \
--disable-gles2 \
--disable-shared-glapi \
--enable-xlib-glx \
--enable-gallium-osmesa \
--with-gallium-drivers=swrast \
--enable-gallium-llvm=yes \
LLVM_CONFIG=/path/to/llvm-3.8.0/llvm-config \
--enable-llvm-shared-libs
with debugging symbols stripped later to reduce file size.
# Notes: Building VTK
The VTK test can be built by downloading the VTK source code from our
git repo:
<a href="https://gitlab.kitware.com/vtk/vtk.git">https://gitlab.kitware.com/vtk/vtk.git</a>
I built against HEAD acd85fe48d.
There is currently a workaround that falls back to an older depth
peeling implementation for Mesa 11.3.0(-devel). To reproduce the bug,
edit Rendering/OpenGL2/vtkOpenGLRenderer.cxx and remove the version check in
vtkOpenGLRenderer::DeviceRenderTranslucentPolygonalGeometry, around line 307:
std::string glVersion =
reinterpret_cast<const char *>(glGetString(GL_VERSION));
if (glVersion.find("Mesa 11.3.0") != std::string::npos)
{
vtkDebugMacro("Disabling dual depth peeling -- mesa bug detected. "
"GL_VERSION = " << glVersion);
dualDepthPeelingSupported = false;
}
}
Configure using cmake:
mkdir vtk-build
cd vtk-build
cmake path/to/vtk/sourcecode/ \
-DVTK_RENDERING_BACKEND=OpenGL2 \
-DOPENGL_INCLUDE_DIR=/path/to/installed/mesa/include
-DOPENGL_gl_LIBRARY=/path/to/installed/mesa/lib/libGL.so
-DOPENGL_glu_LIBRARY=""
Run 'make' to build, and run the depth peeling tests:
cd vtk-build
ctest -R DepthPeel
(use "ctest -V -R 'SomeTestName'" to see the actual
executables/arguments/output)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>