<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [llvmpipe] piglit fbo-missing-attachment-blit es2 from regression"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=73638">73638</a>
          </td>
        </tr>

        <tr>
          <th>Keywords</th>
          <td>regression
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>brianp@vmware.com, maraeo@gmail.com
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[llvmpipe] piglit fbo-missing-attachment-blit es2 from regression
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>vlee@freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Mesa core
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>mesa: 8c4a9f631d7438aeaf56785401891d0773792123 (master)

$ ./bin/fbo-missing-attachment-blit es2 from -auto
Testing blit from buffer with missing attachment to complete buffer...
Segmentation fault (core dumped)

Program terminated with signal 11, Segmentation fault.
#0  0x00007f6e6757cd1c in lp_scene_begin_binning (scene=0x7f6e6b1e0010,
fb=0x191a998, discard=0 '\000') at src/gallium/drivers/llvmpipe/lp_scene.c:524
524          if (llvmpipe_resource_is_texture(cbuf->texture)) {
(gdb) bt
#0  0x00007f6e6757cd1c in lp_scene_begin_binning (scene=0x7f6e6b1e0010,
fb=0x191a998, discard=0 '\000') at src/gallium/drivers/llvmpipe/lp_scene.c:524
#1  0x00007f6e6757e1ed in lp_setup_get_empty_scene (setup=0x191a820) at
src/gallium/drivers/llvmpipe/lp_setup.c:84
#2  0x00007f6e6757e964 in set_scene_state (setup=0x191a820,
new_state=SETUP_CLEARED, reason=0x7f6e68384cb0 <__func__.16142>
"lp_setup_try_clear")
    at src/gallium/drivers/llvmpipe/lp_setup.c:290
#3  0x00007f6e6757ed7b in lp_setup_try_clear (setup=0x191a820,
color=0x7f6e5dc404ec, depth=0, stencil=0, flags=1) at
src/gallium/drivers/llvmpipe/lp_setup.c:434
#4  0x00007f6e6757ee5c in lp_setup_clear (setup=0x191a820,
color=0x7f6e5dc404ec, depth=0, stencil=0, flags=1) at
src/gallium/drivers/llvmpipe/lp_setup.c:461
#5  0x00007f6e675a400f in llvmpipe_clear (pipe=0x19038b0, buffers=1,
color=0x7f6e5dc404ec, depth=0, stencil=0) at
src/gallium/drivers/llvmpipe/lp_clear.c:62
#6  0x00007f6e677e6a6a in st_Clear (ctx=0x7f6e5dc3f010, mask=16) at
src/mesa/state_tracker/st_cb_clear.c:512
#7  0x00007f6e677413d4 in _mesa_Clear (mask=256) at src/mesa/main/clear.c:206
#8  0x00007f6e6ae762cf in stub_glClear (mask=256) at
piglit/tests/util/generated_dispatch.c:1935
#9  0x00000000004015ef in do_blit_test (use_es2=true,
from_missing_to_complete=true) at
piglit/tests/spec/arb_es2_compatibility/fbo-missing-attachment-blit.c:143
#10 0x00000000004018fc in piglit_init (argc=3, argv=0x7fffbad52918) at
piglit/tests/spec/arb_es2_compatibility/fbo-missing-attachment-blit.c:214
#11 0x00007f6e6ae718fa in run_test (gl_fw=0x7f6e6b15f340 <glut_fw>, argc=3,
argv=0x7fffbad52918) at
piglit/tests/util/piglit-framework-gl/piglit_glut_framework.c:140
#12 0x00007f6e6ae6f6c9 in piglit_gl_test_run (argc=3, argv=0x7fffbad52918,
config=0x7fffbad527e0) at piglit/tests/util/piglit-framework-gl.c:191
#13 0x000000000040133e in main (argc=3, argv=0x7fffbad52918) at
piglit/tests/spec/arb_es2_compatibility/fbo-missing-attachment-blit.c:67
(gdb) frame 0
#0  0x00007f6e6757cd1c in lp_scene_begin_binning (scene=0x7f6e6b1e0010,
fb=0x191a998, discard=0 '\000') at src/gallium/drivers/llvmpipe/lp_scene.c:524
524          if (llvmpipe_resource_is_texture(cbuf->texture)) {
(gdb) print cbuf
$1 = (struct pipe_surface *) 0x0


9baa45f78b8ca7d66280e36009b6a685055d7cd6 is the first bad commit
commit 9baa45f78b8ca7d66280e36009b6a685055d7cd6
Author: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>>
Date:   Wed Jan 8 01:09:15 2014 +0100

    st/mesa: bind NULL colorbuffers as specified by glDrawBuffers

    An example why it is required:

        Let's say there's a fragment shader writing to gl_FragData[0..1].
        The user calls: glDrawBuffers(2, {GL_NONE, GL_COLOR_ATTACHMENT0});

        That means gl_FragData[0] is unused and gl_FragData[1] is written
        to GL_COLOR_ATTACHMENT0.

    st/mesa was skipping the GL_NONE draw buffer, therefore gl_FragData[0]
    was written to GL_COLOR_ATTACHMENT0, which was wrong.

    This commit fixes it, but drivers must also be fixed not to crash when
    binding NULL colorbuffers. There is also a new set of piglit tests for
this.

    The MSAA state also had to be fixed not to crash when reading fb->cbufs[0].

    Reviewed-by: Brian Paul <<a href="mailto:brianp@vmware.com">brianp@vmware.com</a>>

:040000 040000 6818bdd84e475c30bd43fc3b5d98af8c6cdd39a7
e73a34aacda41dd8046b425b6d2397a1f8dd6ee8 M    src
bisect run success</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>