From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 74853] New: [r300g, bisected] some piglit fbo tests segfault Date: Tue, 11 Feb 2014 19:33:48 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0768369048==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 423FEFAAAC for ; Tue, 11 Feb 2014 11:33:48 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0768369048== Content-Type: multipart/alternative; boundary="1392147228.ADdee2ab1.18922"; charset="us-ascii" --1392147228.ADdee2ab1.18922 Date: Tue, 11 Feb 2014 19:33:48 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable https://bugs.freedesktop.org/show_bug.cgi?id=3D74853 Priority: medium Bug ID: 74853 Keywords: regression CC: maraeo@gmail.com Assignee: dri-devel@lists.freedesktop.org Summary: [r300g, bisected] some piglit fbo tests segfault Severity: normal Classification: Unclassified OS: All Reporter: pavel.ondracka@email.cz Hardware: Other Status: NEW Version: git Component: Drivers/Gallium/r300 Product: Mesa Some affected tests: fbo-missing-attachment-blit es2 from -fbo -auto fbo-missing-attachment-blit es2 to -fbo -auto fbo-missing-attachment-clear -auto framebuffer-blit-levels draw depth -fbo -auto framebuffer-blit-levels draw stencil -fbo -auto and others... First bad commit: commit 9baa45f78b8ca7d66280e36009b6a685055d7cd6 Author: Marek Ol=C5=A1=C3=A1k 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 ./framebuffer-blit-levels draw depth -fbo -auto Program received signal SIGSEGV, Segmentation fault. 0xb6ca230f in r300_set_framebuffer_state (pipe=3D0x80880e8, state=3D0x84bc9= a0) at r300_state.c:1020 1020 r300->screen->cmask_resource =3D=3D state->cbufs[0]->textur= e; (gdb) bt #0 0xb6ca230f in r300_set_framebuffer_state (pipe=3D0x80880e8, state=3D0x8= 4bc9a0) at r300_state.c:1020 #1 0xb6affe43 in cso_set_framebuffer (ctx=3D0x84d16f0, fb=3D0x84bc9a0) at cso_cache/cso_context.c:649 #2 0xb69d0d84 in update_framebuffer_state (st=3D0x84bbf30) at state_tracker/st_atom_framebuffer.c:125 #3 0xb69ce0d3 in st_validate_state (st=3D0x84bbf30) at state_tracker/st_atom.c:202 #4 0xb69d7301 in st_BlitFramebuffer (ctx=3D0x84787d8, srcX0=3D0, srcY0=3D0= ,=20 srcX1=3D128, srcY1=3D128, dstX0=3D0, dstY0=3D0, dstX1=3D128, dstY1=3D12= 8, mask=3D256,=20 filter=3D9728) at state_tracker/st_cb_blit.c:94 #5 0xb6868fb3 in _mesa_BlitFramebuffer (srcX0=3D0, srcY0=3D0, srcX1=3D128,= =20 srcY1=3D128, dstX0=3D0, dstY0=3D0, dstX1=3D128, dstY1=3D128, mask=3D256= , filter=3D9728) at main/blit.c:509 #6 0xb7eb51ff in stub_glBlitFramebuffer (srcX0=3D0, srcY0=3D0, srcX1=3D128= ,=20 srcY1=3D128, dstX0=3D0, dstY0=3D0, dstX1=3D128, dstY1=3D128, mask=3D256= , filter=3D9728) at /home/Paulie/piglit/tests/util/generated_dispatch.c:1724 #7 0x080498c3 in piglit_display () at /home/Paulie/piglit/tests/spec/arb_framebuffer_object/framebuffer-blit-leve= ls.c:372 #8 0xb7eb0540 in display () at /home/Paulie/piglit/tests/util/piglit-framework-gl/piglit_glut_framework.c:= 60 #9 0xb7fb88ec in fghcbDisplayWindow () from /lib/libglut.so.3 #10 0xb7fbc507 in fgEnumWindows () from /lib/libglut.so.3 #11 0xb7fb8e6e in glutMainLoopEvent () from /lib/libglut.so.3 #12 0xb7fb9657 in glutMainLoop () from /lib/libglut.so.3 #13 0xb7eb0799 in run_test (gl_fw=3D0xb7fa1b20 , argc=3D3,=20 argv=3D0xbffff1e4) at /home/Paulie/piglit/tests/util/piglit-framework-gl/piglit_glut_framework.c:= 142 #14 0xb7eae59c in piglit_gl_test_run (argc=3D3, argv=3D0xbffff1e4,=20 config=3D0xbffff108) at /home/Paulie/piglit/tests/util/piglit-framework-gl.c:191 #15 0x08048df9 in main (argc=3D3, argv=3D0xbffff1e4) at /home/Paulie/piglit/tests/spec/arb_framebuffer_object/framebuffer-blit-leve= ls.c:63 --=20 You are receiving this mail because: You are the assignee for the bug. --1392147228.ADdee2ab1.18922 Date: Tue, 11 Feb 2014 19:33:48 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Priority medium
Bug ID 74853
Keywords regression
CC maraeo@gmail.com
Assignee dri-devel@lists.freedesktop.org
Summary [r300g, bisected] some piglit fbo tests segfault
Severity normal
Classification Unclassified
OS All
Reporter pavel.ondracka@email.cz
Hardware Other
Status NEW
Version git
Component Drivers/Gallium/r300
Product Mesa

Some affected tests:
fbo-missing-attachment-blit es2 from -fbo -auto
fbo-missing-attachment-blit es2 to -fbo -auto
fbo-missing-attachment-clear -auto
framebuffer-blit-levels draw depth -fbo -auto
framebuffer-blit-levels draw stencil -fbo -auto
and others...

First bad commit:
commit 9baa45f78b8ca7d66280e36009b6a685055d7cd6
Author: Marek Ol=C5=A1=C3=A1k <marek.olsak@amd.com>
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->cb=
ufs[0].

    Reviewed-by: Brian Paul <br=
ianp@vmware.com>


./framebuffer-blit-levels draw depth -fbo -auto
Program received signal SIGSEGV, Segmentation fault.
0xb6ca230f in r300_set_framebuffer_state (pipe=3D0x80880e8, state=3D0x84bc9=
a0)
    at r300_state.c:1020
1020            r300->screen->cmask_resource =3D=3D state->cbufs[0=
]->texture;
(gdb) bt
#0  0xb6ca230f in r300_set_framebuffer_state (pipe=3D0x80880e8, state=3D0x8=
4bc9a0)
    at r300_state.c:1020
#1  0xb6affe43 in cso_set_framebuffer (ctx=3D0x84d16f0, fb=3D0x84bc9a0)
    at cso_cache/cso_context.c:649
#2  0xb69d0d84 in update_framebuffer_state (st=3D0x84bbf30)
    at state_tracker/st_atom_framebuffer.c:125
#3  0xb69ce0d3 in st_validate_state (st=3D0x84bbf30)
    at state_tracker/st_atom.c:202
#4  0xb69d7301 in st_BlitFramebuffer (ctx=3D0x84787d8, srcX0=3D0, srcY0=3D0=
,=20
    srcX1=3D128, srcY1=3D128, dstX0=3D0, dstY0=3D0, dstX1=3D128, dstY1=3D12=
8, mask=3D256,=20
    filter=3D9728) at state_tracker/st_cb_blit.c:94
#5  0xb6868fb3 in _mesa_BlitFramebuffer (srcX0=3D0, srcY0=3D0, srcX1=3D128,=
=20
    srcY1=3D128, dstX0=3D0, dstY0=3D0, dstX1=3D128, dstY1=3D128, mask=3D256=
, filter=3D9728)
    at main/blit.c:509
#6  0xb7eb51ff in stub_glBlitFramebuffer (srcX0=3D0, srcY0=3D0, srcX1=3D128=
,=20
    srcY1=3D128, dstX0=3D0, dstY0=3D0, dstX1=3D128, dstY1=3D128, mask=3D256=
, filter=3D9728)
    at /home/Paulie/piglit/tests/util/generated_dispatch.c:1724
#7  0x080498c3 in piglit_display ()
    at
/home/Paulie/piglit/tests/spec/arb_framebuffer_object/framebuffer-blit-leve=
ls.c:372
#8  0xb7eb0540 in display ()
    at
/home/Paulie/piglit/tests/util/piglit-framework-gl/piglit_glut_framework.c:=
60
#9  0xb7fb88ec in fghcbDisplayWindow () from /lib/libglut.so.3
#10 0xb7fbc507 in fgEnumWindows () from /lib/libglut.so.3
#11 0xb7fb8e6e in glutMainLoopEvent () from /lib/libglut.so.3
#12 0xb7fb9657 in glutMainLoop () from /lib/libglut.so.3
#13 0xb7eb0799 in run_test (gl_fw=3D0xb7fa1b20 <glut_fw>, argc=3D3,=20
    argv=3D0xbffff1e4)
    at
/home/Paulie/piglit/tests/util/piglit-framework-gl/piglit_glut_framework.c:=
142
#14 0xb7eae59c in piglit_gl_test_run (argc=3D3, argv=3D0xbffff1e4,=20
    config=3D0xbffff108)
    at /home/Paulie/piglit/tests/util/piglit-framework-gl.c:191
#15 0x08048df9 in main (argc=3D3, argv=3D0xbffff1e4)
    at
/home/Paulie/piglit/tests/spec/arb_framebuffer_object/framebuffer-blit-leve=
ls.c:63


You are receiving this mail because: =20=20=20=20=20=20
  • You are the assignee for the bug.
--1392147228.ADdee2ab1.18922-- --===============0768369048== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0768369048==--