[Mesa-dev] [Bug 41787] [llvmpipe] stencil broken

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Oct 30 12:53:07 PDT 2012


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

--- Comment #16 from José Fonseca <jfonseca at vmware.com> ---
I spent sometime today looking at this.

I modified glretrace to dump the stencil buffer instead of color buffer:
$ git diff
diff --git a/retrace/glstate_images.cpp b/retrace/glstate_images.cpp
index e534a65..75664e6 100644
--- a/retrace/glstate_images.cpp
+++ b/retrace/glstate_images.cpp
@@ -739,6 +739,7 @@ getFramebufferAttachmentDesc(Context &context, GLenum
target, GLenum attachment,
 image::Image *
 getDrawBufferImage() {
     GLenum format = GL_RGB;
+    format = GL_STENCIL_INDEX;
     GLint channels = _gl_format_channels(format);
     if (channels > 4) {
         return NULL;

And ran retracediff.py script to compare the stencil buffer contents, on every
draw call, between llvmpipe and Intel:


$ ./scripts/retracediff.py -r ./glretrace --src-env
LD_LIBRARY_PATH=/home/jfonseca/projects/opengl/mesa/build/linux-x86_64-debug/gallium/targets/graw-xlib:/home/jfonseca/projects/opengl/mesa/build/linux-x86_64-debug/gallium/targets/libgl-xlib
/home/jfonseca/projects/opengl/traces/stencil.trace
call    precision
387    36.802488
531    36.802488
622    36.802488
708    36.802488
776    36.802488
802    7.947939
{
  GL_ATTRIB_STACK_DEPTH: 0 -> 1,
  GL_COLOR_ARRAY: "GL_TRUE" -> "GL_FALSE",
  GL_COLOR_ARRAY_POINTER: 59042800 -> 62751856,
  GL_COLOR_WRITEMASK: [
    "GL_TRUE" -> "GL_FALSE",
    "GL_TRUE" -> "GL_FALSE",
    "GL_TRUE" -> "GL_FALSE",
    "GL_TRUE" -> "GL_FALSE"
  ],
  GL_CULL_FACE_MODE: "GL_BACK" -> "GL_FRONT",
  GL_CURRENT_MATRIX_ARB: [
    1 -> 1.961161,
    0 -> 0.07548513,
    0 -> 0.3849002,
    0,
    0,
    1 -> 1.962614,
    0 -> -0.3849002,
    0,
    0 -> -0.3922323,
    0 -> 0.3774257,
    1 -> 1.924501,
    0,
    0 -> -17.65045,
    0 -> -12.45505,
    0 -> 92.37605,
    1
  ],
  GL_DEBUG_CALLBACK_USER_PARAM: 36090016 -> 39956640,
  GL_DEPTH_WRITEMASK: "GL_TRUE" -> "GL_FALSE",
  GL_LIGHTING: "GL_TRUE" -> "GL_FALSE",
  GL_MATRIX_MODE: "GL_TEXTURE" -> "GL_MODELVIEW",
  GL_NORMAL_ARRAY: "GL_TRUE" -> "GL_FALSE",
  GL_NORMAL_ARRAY_POINTER: 61292368 -> 65157424,
  GL_POLYGON_OFFSET_BIAS_EXT: 0 -> 1,
  GL_POLYGON_OFFSET_FILL: "GL_FALSE" -> "GL_TRUE",
  GL_POLYGON_OFFSET_UNITS: 0 -> 1,
  GL_STENCIL_BACK_PASS_DEPTH_FAIL: "GL_KEEP" -> "GL_INCR_WRAP",
  GL_STENCIL_PASS_DEPTH_FAIL: "GL_KEEP" -> "GL_INCR_WRAP",
  GL_STENCIL_TEST: "GL_FALSE" -> "GL_TRUE",
  GL_TEXTURE_COORD_ARRAY: "GL_TRUE" -> "GL_FALSE",
  GL_TEXTURE_COORD_ARRAY_POINTER: 61081232 -> 64931200,
  GL_TRANSPOSE_CURRENT_MATRIX_ARB: [
    1 -> 1.961161,
    0 -> 0.07548513,
    0 -> 0.3849002,
    0,
    0,
    1 -> 1.962614,
    0 -> -0.3849002,
    0,
    0 -> -0.3922323,
    0 -> 0.3774257,
    1 -> 1.924501,
    0,
    0 -> -17.65045,
    0 -> -12.45505,
    0 -> 92.37605,
    1
  ],
  GL_VERTEX_ARRAY_POINTER: 61337392 -> 65378608,
  GL_VERTEX_ARRAY_STRIDE: 36 -> 12,
}

806    5.831233
837    5.831233

So the differences start on call 802. 

The attached stencil-802-intel.png stencil-802-llvmpipe.png show the stencil
contents on that call.

It's still not clear whether this is a truly a depth stencil issue, or simply a
depth test (polygon offset) problem.

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


More information about the mesa-dev mailing list