Bug 59498 - [ILK Bisected]Piglit spec/ARB_depth_buffer_float_fbo-clear-formats_stencil Aborted
Summary: [ILK Bisected]Piglit spec/ARB_depth_buffer_float_fbo-clear-formats_stencil Ab...
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high major
Assignee: Anuj Phogat
QA Contact:
URL:
Whiteboard:
Keywords:
: 61827 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-17 05:26 UTC by lu hua
Modified: 2013-07-25 08:32 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description lu hua 2013-01-17 05:26:35 UTC
System Environment:
--------------------------
Arch:           i386
Platform:       Ironlake
Libdrm:		(master)libdrm-2.4.40-13-g9e6f96a579fc2ed241e9a31a35a5995129ee8f7a
Mesa:       (master)56c01d81094795286828ecb83713e043695e905a 
Xserver:(master)xorg-server-1.13.99.901-2-g6703a7c7cf1a349c137e247a0c8eb462ff7b07be
Xf86_video_intel: (master)2.20.17-88-g2113f7f440dd2f10e80f0bb3bd5cd155f7e19098
Cairo:	(master)1dfea39841fc6d545e45420b1999239f29556c05
Libva:	(staging)21649988d6b532cc96f633db017d1e4369f640e9
Libva_intel_driver:(staging)788e99361208127763fdf1e146e63fca03a09f67
Kernel:	(drm-intel-nightly) 644e43935a4b9a61460fa4bf449b79032556fb90

Bug detailed description:
-------------------------
It happens on ironlake with mesa master branch. It works well on mesa 9.0 branch.

Bisect shows: 252573ae0fe6c928885f005cf6e77200b45601fb is the first bad commit.
commit 252573ae0fe6c928885f005cf6e77200b45601fb
Author:     Anuj Phogat <anuj.phogat@gmail.com>
AuthorDate: Mon Jan 7 15:55:31 2013 -0800
Commit:     Ian Romanick <ian.d.romanick@intel.com>
CommitDate: Tue Jan 15 15:08:12 2013 -0800

    mesa: Fix GL error generation in glBlitFramebuffer()

    V2:
    If mask has GL_STENCIL_BUFFER_BIT set, the depth formats for
    readRenderBuffer and drawRenderBuffer must match unless one of the two
    buffers doesn't have depth, in which case it's not blitted, so the
    format check should be ignored.  Same comment goes for stencil formats
    in depth renderbuffers if mask has GL_DEPTH_BUFFER_BIT set.

    v3 (Kayden): Refactor code to be a bit more readable.

output:
L_ARB_depth_buffer_float stencil -auto
Using test set: GL_ARB_depth_buffer_float
Testing GL_DEPTH_COMPONENT32F - no stencil.
Testing GL_DEPTH32F_STENCIL8
fbo-clear-formats: /GFX/Test/Piglit/piglit/tests/fbo/fbo-clear-formats.c:332: draw_stencil_mipmap: Assertion `piglit_dispatch_glGetError() == 0' failed.
Aborted (core dumped)

(gdb) bt
#0  0xb7fff424 in __kernel_vsyscall ()
#1  0x47d0e95f in raise () from /lib/libc.so.6
#2  0x47d102b3 in abort () from /lib/libc.so.6
#3  0x47d07697 in __assert_fail_base () from /lib/libc.so.6
#4  0x47d07747 in __assert_fail () from /lib/libc.so.6
#5  0x0804a674 in draw_stencil_mipmap (x=1, y=1, dim=256, tex=1, level=0)
    at /GFX/Test/Piglit/piglit/tests/fbo/fbo-clear-formats.c:332
#6  0x0804af87 in test_format (format=0x804c1c8)
    at /GFX/Test/Piglit/piglit/tests/fbo/fbo-clear-formats.c:532
#7  0x08049828 in fbo_formats_display (test_format=0x804ae38 <test_format>)
    at /GFX/Test/Piglit/piglit/tests/fbo/fbo-formats.h:641
#8  0x0804b085 in piglit_display ()
    at /GFX/Test/Piglit/piglit/tests/fbo/fbo-clear-formats.c:558
#9  0xb7f30759 in run_test (gl_fw=0x804f008, argc=3, argv=0xbffff314)
    at /GFX/Test/Piglit/piglit/tests/util/piglit-framework-gl/piglit_winsys_framework.c:63
#10 0xb7f2d616 in piglit_gl_test_run (argc=3, argv=0xbffff314,
    config=0xbffff24c)
    at /GFX/Test/Piglit/piglit/tests/util/piglit-framework-gl.c:127
#11 0x08049940 in main (argc=4, argv=0xbffff314)
    at /GFX/Test/Piglit/piglit/tests/fbo/fbo-clear-formats.c:49


Reproduce steps:
----------------
1. xinit
2. ./bin/fbo-clear-formats GL_ARB_depth_buffer_float stencil -auto
Comment 1 Anuj Phogat 2013-02-19 23:23:21 UTC
It fails with a different error on SandyBridge Mobile with mesa master (git-c1dd0e3) if hiz is enabled:

./bin/fbo-clear-formats GL_ARB_depth_buffer_float stencil -auto
Using test set: GL_ARB_depth_buffer_float
Testing GL_DEPTH_COMPONENT32F - no stencil.
fbo-clear-formats: brw_misc_state.c:652: emit_depthbuffer: Assertion `!separate_stencil || hiz_mt' failed.
Testing GL_DEPTH32F_STENCIL8Aborted

Including chad in CC. I think he was looking in to a similar issue on haswell.

Reproduced the error reported with hiz=false. I'll soon post more details.
Comment 2 Anuj Phogat 2013-03-18 17:24:32 UTC
*** Bug 61827 has been marked as a duplicate of this bug. ***
Comment 3 Anuj Phogat 2013-03-19 18:07:07 UTC
Test fails due to GL_INVALID_OPERATION in glBlitFrameBuffer() while testing format=GL_DEPTH32F_STENCIL8. glBlitFrameBuffer() called from test_format()->draw_stencil_mipmap() in fbo-clear-formats.c tries to blit between framebuffers of format GL_DEPTH32F_STENCIL8 and GL_DEPTH24_STENCIL8. Blitting between these formats is not allowed in OpenGL. Test produces GL_INVALID_OPERATION on nvidia drivers as well. So, the test need to be fixed so that it blits to a FB with matching format=GL_DEPTH32F_STENCIL8.
Comment 4 Chad Versace 2013-03-19 21:43:09 UTC
(In reply to comment #3)
> Blitting between these formats is not allowed in OpenGL.
> So, the test need to be
> fixed so that it blits to a FB with matching format=GL_DEPTH32F_STENCIL8.

Yep. The test needs fixing. From the OpenGL 3.2 spec:

If the color formats of the read and draw buffers do not match, and mask in-
cludes COLOR_BUFFER_BIT, pixel groups are converted to match the destination
format. However, colors are clamped only if all draw color buffers have fixed-
point components. Format conversion is not supported for all data types, and an
INVALID_OPERATION error is generated under any of the following conditions:

• The read buffer contains fixed-point or floating-point values and any draw
buffer contains neither fixed-point nor floating-point values.

• The read buffer contains unsigned integer values and any draw buffer does
not contain unsigned integer values.

• The read buffer contains signed i
Comment 5 Anuj Phogat 2013-03-20 01:26:01 UTC
Lu, Test don't pass on mobile SNB even before bisected commit(252573a). It just started throwing INVALID_OPERATION after this commit. Can you bisect the commit when it really started failing?
Comment 6 lu hua 2013-03-20 07:05:23 UTC
I bisect it again.
Bisect shows: f04dd3d0035f57854f0715c7e0f6a0fbe6b41f15 is the first bad commit
commit f04dd3d0035f57854f0715c7e0f6a0fbe6b41f15
Author: Marek Olšák <maraeo@gmail.com>
Date:   Mon Jan 14 06:58:52 2013 +0100

    gallium: remove PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE

    Reviewed-by: Brian Paul <brianp@vmware.com>
Comment 7 Anuj Phogat 2013-03-21 17:23:30 UTC
Bisect is incorrect. All the changes made in this commit are are for gallium drivers. Test fails before and after this commit.
Comment 8 lu hua 2013-03-22 07:48:45 UTC
Select good commit:1c9833ba70466906d3d2ad3aee6a10642a39abdd 
Select bad commit: 56c01d81094795286828ecb83713e043695e905a 

[1cedf7819b605cd78ae4762c2abc20988577d852] bad
[d9d857e24fef2ae5576523b861f46c426b94ba0d] good
[f727fc630462c91f19a59e8b48e3a4224dd0ec52] good
[d0ce8d6ceb5f597e9cb132e6395bce8fbd51b58e] bad
[b77243b9c245fd5957aa6d615a3d83d061f51cc1] bad
[0c535ae7fc703e10c1df7a108e8704263d7b75d3] bad
[252573ae0fe6c928885f005cf6e77200b45601fb] bad

Bisect shows: 252573ae0fe6c928885f005cf6e77200b45601fb is the first bad commit.
Comment 9 Gordon Jin 2013-05-24 03:39:12 UTC
I kept seeing Hua talked about Ironlake while Anuj talked about SNB. Can you sync?

Hua, I assume SNB mobile passes on your side, right?

Anuj, I saw you mentioned the test needs fixing. Is there a fixed test now?
Comment 10 lu hua 2013-05-24 05:31:08 UTC
It passes on Sandybridge, only happens on Ironlake.
Comment 11 Anuj Phogat 2013-06-25 18:57:15 UTC
(In reply to comment #9)
> I kept seeing Hua talked about Ironlake while Anuj talked about SNB. Can you
> sync?
> 
> Hua, I assume SNB mobile passes on your side, right?
> 
The issue I'm seeing on SNB can be reproduced by setting hiz=false. SNB issue looks different from what Hua is seeing on Ironlake. I think a separate bug should be opened for SNB. More investigation is required to find the cause of failure on Ironlake. I'm not planning to investigate Ironlake in near future.

> Anuj, I saw you mentioned the test needs fixing. Is there a fixed test now?
Test case fix will only help failure on SNB. I didn't get chance to fix the test.
Comment 12 lu hua 2013-07-25 08:32:05 UTC
Fixed on latest master branch.
Comment 13 lu hua 2013-07-25 08:32:21 UTC
Verified.Fixed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.