Bug 77865 - [BDW] Many Ogles3conform framebuffer_blit cases fail
Summary: [BDW] Many Ogles3conform framebuffer_blit cases fail
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: Kenneth Graunke
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-24 05:56 UTC by lu hua
Modified: 2014-06-23 05:26 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
output (152.36 KB, text/plain)
2014-06-05 06:21 UTC, lu hua
Details
output(39cdf1621) (151.74 KB, text/plain)
2014-06-17 09:04 UTC, lu hua
Details

Description lu hua 2014-04-24 05:56:10 UTC
System Environment:
--------------------------
Platform: Broadwell
Libdrm:		(master)libdrm-2.4.53-6-gd4083dc762a2974c35ecd16be995272bbb6d57b4
Mesa:		(master)34a68345e228b7cbc1bc6909704a89c08bf5368e
Xserver:	(master)xorg-server-1.15.99.902-47-ge924034269532979f1e88947ee9c33d30461edae
Xf86_video_intel:(master)2.99.911-94-gbb5b21e34f6cbe44a249e566471754b45c500e60
Libva:		(staging)8577efbd3b1d4e8f113f78cf13d2182aa681b738
Libva_intel_driver:(staging)42258e128f19b93aa102672d5f61eb73d9f9808f
Kernel:	(drm-intel-nightly)1e771b84e47085ef9b6efea1321e7cb5a8b2c065

Bug detailed description:
-----------------------------
They segfault on Broadwell with Mesa master branch, but work well on Haswell.
Following cases have this issue:
(GLES30)GL3Tests_framebuffer_blit_framebuffer_blit_functionality_all_buffer_blit.test
(GLES30)GL3Tests_framebuffer_blit_framebuffer_blit_functionality_color_and_stencil_blit.test
(GLES30)GL3Tests_framebuffer_blit_framebuffer_blit_functionality_magnifying_blit.test
(GLES30)GL3Tests_framebuffer_blit_framebuffer_blit_functionality_minifying_blit.test
(GLES30)GL3Tests_framebuffer_blit_framebuffer_blit_functionality_missing_buffers_blit.test
(GLES30)GL3Tests_framebuffer_blit_framebuffer_blit_functionality_multisampled_to_singlesampled_blit.test
(GLES30)GL3Tests_framebuffer_blit_framebuffer_blit_functionality_negative_dimensions_blit.test
(GLES30)GL3Tests_framebuffer_blit_framebuffer_blit_functionality_negative_height_blit.test
(GLES30)GL3Tests_framebuffer_blit_framebuffer_blit_functionality_negative_width_blit.test
(GLES30)GL3Tests_framebuffer_blit_framebuffer_blit_functionality_scissor_blit.test
(GLES30)GL3Tests_framebuffer_blit_framebuffer_blit_functionality_stencil_blit.test
(GLES30)GL3Tests_packed_depth_stencil_packed_depth_stencil_blit.test


run ./GTF -width=64 -height=64 -run=GL3Tests/framebuffer_blit/framebuffer_blit_functionality_all_buffer_blit.test

output:
Running GTF (Graphics Test Framework)
egl_vendor: Mesa Project
egl_version: 1.4
ConfigID: 14 RGBA bits( 8, 8, 8, 8) Depth bits: 0 Stencil bits: 0
gtf_version: 3.0
mode: egl
arg: /GFX/Test/Ogles3conform/ogles3conform/GTF_ES/glsl/GTF/GTF -width=64 -height=64 -run=/GFX/Test/Ogles3conform/ogles3conform/GTF_ES/glsl/GTF/GL3Tests/framebuffer_blit/framebuffer_blit_functionality_all_buffer_blit.test
gl_renderer: Mesa DRI Intel(R) Broadwell
gl_shading_language_version: OpenGL ES GLSL ES 3.0
gl_version: OpenGL ES 3.0 Mesa 10.2.0-devel (git-34a6834)
gl_vendor: Intel Open Source Technology Center
gl_extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_filter_anisotropic GL_EXT_texture_compression_dxt1 GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_npot GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_vertex_array_object GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_EXT_map_buffer_range GL_OES_depth_texture_cube_map GL_OES_surfaceless_context GL_EXT_color_buffer_float GL_EXT_shader_integer_mix
stamp: 20140424135148
Zero epsilon: 0.000122, RGBA epsilon: ( 0.004044, 0.004044, 0.004044, 0.004044)
framebuffer_blit: Start
Segmentation fault

Reproduce steps:
----------------------------
1. xinit
2. ./GTF -width=64 -height=64 -run=GL3Tests/framebuffer_blit/framebuffer_blit_functionality_all_buffer_blit.test
Comment 1 Kenneth Graunke 2014-04-29 01:00:03 UTC
Some of these are probably due to missing stencil stuff.  CC'ing Topi.
Comment 2 Kenneth Graunke 2014-06-04 07:40:21 UTC
Oh, this got fixed a while back as well.
Comment 3 lu hua 2014-06-05 06:21:17 UTC
The segfault goes away, but they still fail.

run ./GTF -width=64 -height=64 -run=GL3Tests/framebuffer_blit/framebuffer_blit_functionality_all_buffer_blit.test

Skipping ConfigID: 82 Sample Buffers: 1 Samples: 4
Skipping ConfigID: 84 Sample Buffers: 1 Samples: 8
Skipping ConfigID: 86 Sample Buffers: 1 Samples: 4
Skipping ConfigID: 88 Sample Buffers: 1 Samples: 8
Conformance FAILED 5 of 6 tests.
Test duration: 1s
Comment 4 lu hua 2014-06-05 06:21:42 UTC
Created attachment 100437 [details]
output
Comment 5 Kenneth Graunke 2014-06-17 03:42:42 UTC
These are all working for me, as of:

commit 49659ad90c501ae584b7d76ca98f35a8f57d40fe
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Fri Jun 13 15:26:40 2014 -0700

    i965: Use 8x4 aligned rectangles for HiZ operations on Broadwell.
    
    Like on Haswell, we need to use 8x4 aligned rectangle primitives for
    hierarchical depth buffer resolves and depth clears.  See the comments
    in brw_blorp.cpp's brw_hiz_op_params() constructor.  (The Broadwell
    documentation confirms that this is still necessary.)
    
    This patch makes the Broadwell code follow the same behavior as Chad and
    Jordan's Gen7 BLORP code.  Based on a patch by Topi Pohjolainen.
    
    This fixes es3conform's framebuffer_blit_functionality_scissor_blit
    test, with no Piglit regressions.
    
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
    Cc: "10.2" <mesa-stable@lists.freedesktop.org>

Can you retest?  Thanks!
Comment 6 lu hua 2014-06-17 09:04:57 UTC
Created attachment 101216 [details]
output(39cdf1621)

(In reply to comment #5)
> These are all working for me, as of:
> 
> commit 49659ad90c501ae584b7d76ca98f35a8f57d40fe
> Author: Kenneth Graunke <kenneth@whitecape.org>
> Date:   Fri Jun 13 15:26:40 2014 -0700
> 
>     i965: Use 8x4 aligned rectangles for HiZ operations on Broadwell.
>     
>     Like on Haswell, we need to use 8x4 aligned rectangle primitives for
>     hierarchical depth buffer resolves and depth clears.  See the comments
>     in brw_blorp.cpp's brw_hiz_op_params() constructor.  (The Broadwell
>     documentation confirms that this is still necessary.)
>     
>     This patch makes the Broadwell code follow the same behavior as Chad and
>     Jordan's Gen7 BLORP code.  Based on a patch by Topi Pohjolainen.
>     
>     This fixes es3conform's framebuffer_blit_functionality_scissor_blit
>     test, with no Piglit regressions.
>     
>     Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
>     Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
>     Cc: "10.2" <mesa-stable@lists.freedesktop.org>
> 
> Can you retest?  Thanks!

Test on latest master branch(commit 39cdf1621efaebcefc74403b0ef8fa1f699e4b97), they still fail.
Comment 7 Kenneth Graunke 2014-06-19 07:01:32 UTC
Oops.  They worked for me with -minfmt, but not with the default options.

This patch should fix it:
http://lists.freedesktop.org/archives/mesa-dev/2014-June/061825.html
Comment 8 lu hua 2014-06-19 07:37:40 UTC
(In reply to comment #7)
> Oops.  They worked for me with -minfmt, but not with the default options.
> 
> This patch should fix it:
> http://lists.freedesktop.org/archives/mesa-dev/2014-June/061825.html

Fixed by this patch.
Comment 9 Kenneth Graunke 2014-06-23 01:05:08 UTC
Fixed by:

commit a20994d61677adea7f15facbc6bb025f32b37c93
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Wed Jun 18 22:25:33 2014 -0700

    i965: Save meta stencil blit programs in the context.
    
    When the last context in a share group is destroyed, the hash table
    containing all of the shader programs (ctx->Shared->ShaderObjects) is
    destroyed, throwing away all of the shader programs.
    
    Using a static variable to store program IDs ends up holding on to them
    after this, so we think we still have a compiled program, when it
    actually got destroyed.  _mesa_UseProgram then hits GL errors, since no
    program by that ID exists.
    
    Instead, store the program IDs in the context, so we know to recompile
    if our context gets destroyed and the application creates another one.
    
    Fixes es3conform tests when run without -minfmt (where it creates
    separate contexts for testing each visual).
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77865
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    Cc: "10.2" <mesa-stable@lists.freedesktop.org>
Comment 10 lu hua 2014-06-23 05:26:36 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.