[Mesa-dev] [Bug 95266] Geometry missing from rendering, only when using Mesa.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed May 4 17:54:11 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=95266

            Bug ID: 95266
           Summary: Geometry missing from rendering, only when using Mesa.
           Product: Mesa
           Version: git
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: david.lonie at kitware.com
        QA Contact: mesa-dev at lists.freedesktop.org

Created attachment 123465
  --> https://bugs.freedesktop.org/attachment.cgi?id=123465&action=edit
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: 

https://bugs.freedesktop.org/show_bug.cgi?id=94955

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:

https://gitlab.kitware.com/vtk/vtk.git

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)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160504/c0c5f4ca/attachment-0001.html>


More information about the mesa-dev mailing list