Bug 76721 - [i965 Bisected]Piglit/spec_ARB_framebuffer_object_fbo-drawbuffers-none_glDrawPixels fails
Summary: [i965 Bisected]Piglit/spec_ARB_framebuffer_object_fbo-drawbuffers-none_glDraw...
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: Ian Romanick
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-28 07:18 UTC by lu hua
Modified: 2014-05-23 05:05 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
always_save_context (2.45 KB, patch)
2014-03-29 16:23 UTC, gregory.hainaut
Details | Splinter Review

Description lu hua 2014-03-28 07:18:33 UTC
System Environment:
--------------------------
Platform: Ivybridge
Libdrm:		(master)libdrm-2.4.52-10-g1cb5fc706cf5913d9dee33c939f65a23ecea17a5
Mesa:		(master)b02bcea7157020b01d5f4fdcb5da69c10013a818
Xserver:	(master)xorg-server-1.15.99.901-160-g7b2a517ba99f6756e98c4aef47d9b9399b997157
Xf86_video_intel:(master)2.99.911-10-ge46c196ecc8ad83f78f4f948b5dcb07906f249c2
Libva:		(staging)708ec2979b52647ce4744d181d964c413e98cc11
Libva_intel_driver:(staging)150f67c67bd92cd201b75a92388fe3a63b00cd8a
Kernel:	(drm-intel-nightly) 10c69add19dda3677219254d3e9dc3becbb60b97

Bug detailed description:
-----------------------------
It fails on i965 platforms with mesa master branch, and works well on 10.1 branch.
Bisect shows:4caa9db71ce05dc2cc86177ca42655c2011fbe4a is the first bad commit.
commit 4caa9db71ce05dc2cc86177ca42655c2011fbe4a
Author:     Gregory Hainaut <gregory.hainaut@gmail.com>
AuthorDate: Fri Jun 28 17:18:35 2013 -0700
Commit:     Ian Romanick <ian.d.romanick@intel.com>
CommitDate: Tue Mar 25 10:25:25 2014 -0700

    mesa/sso: Add gl_pipeline_object parameter to _mesa_use_shader_program

    Extend use_shader_program to support a different target. Allow to reuse the
    function to update the pipeline state. Note I bypass the flush when target
    isn't current. Maybe it would be better to create a new UseProgramStages
    driver function

    This was originally included in another patch, but it was split out by
    Ian Romanick.

    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>

output:
Testing glDrawPixels.
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 0,
  config (NONE, COLOR_ATTACHMENT1, COLOR_ATTACHMENT0, COLOR_ATTACHMENT2)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 1 [details] [review],
  config (NONE, COLOR_ATTACHMENT1, COLOR_ATTACHMENT0, COLOR_ATTACHMENT2)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 2 [details] [review],
  config (NONE, COLOR_ATTACHMENT1, COLOR_ATTACHMENT0, COLOR_ATTACHMENT2)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 0,
  config (COLOR_ATTACHMENT1, NONE, COLOR_ATTACHMENT3, COLOR_ATTACHMENT0)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 1 [details] [review],
  config (COLOR_ATTACHMENT1, NONE, COLOR_ATTACHMENT3, COLOR_ATTACHMENT0)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 3 [details] [review],
  config (COLOR_ATTACHMENT1, NONE, COLOR_ATTACHMENT3, COLOR_ATTACHMENT0)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 1 [details] [review],
  config (COLOR_ATTACHMENT1, COLOR_ATTACHMENT3, NONE, COLOR_ATTACHMENT2)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 2 [details] [review],
  config (COLOR_ATTACHMENT1, COLOR_ATTACHMENT3, NONE, COLOR_ATTACHMENT2)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 3 [details] [review],
  config (COLOR_ATTACHMENT1, COLOR_ATTACHMENT3, NONE, COLOR_ATTACHMENT2)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 0,
  config (COLOR_ATTACHMENT2, COLOR_ATTACHMENT0, COLOR_ATTACHMENT3, NONE)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 2 [details] [review],
  config (COLOR_ATTACHMENT2, COLOR_ATTACHMENT0, COLOR_ATTACHMENT3, NONE)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 3 [details] [review],
  config (COLOR_ATTACHMENT2, COLOR_ATTACHMENT0, COLOR_ATTACHMENT3, NONE)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 2 [details] [review],
  config (NONE, NONE, COLOR_ATTACHMENT3, COLOR_ATTACHMENT2)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 3 [details] [review],
  config (NONE, NONE, COLOR_ATTACHMENT3, COLOR_ATTACHMENT2)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 0,
  config (NONE, COLOR_ATTACHMENT0, NONE, COLOR_ATTACHMENT1)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 1 [details] [review],
  config (NONE, COLOR_ATTACHMENT0, NONE, COLOR_ATTACHMENT1)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 0,
  config (NONE, COLOR_ATTACHMENT2, COLOR_ATTACHMENT0, NONE)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 2 [details] [review],
  config (NONE, COLOR_ATTACHMENT2, COLOR_ATTACHMENT0, NONE)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 1 [details] [review],
  config (COLOR_ATTACHMENT3, NONE, NONE, COLOR_ATTACHMENT1)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 3 [details] [review],
  config (COLOR_ATTACHMENT3, NONE, NONE, COLOR_ATTACHMENT1)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 0,
  config (COLOR_ATTACHMENT0, NONE, COLOR_ATTACHMENT1, NONE)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 1 [details] [review],
  config (COLOR_ATTACHMENT0, NONE, COLOR_ATTACHMENT1, NONE)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 0,
  config (COLOR_ATTACHMENT2, COLOR_ATTACHMENT0, NONE, NONE)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 2 [details] [review],
  config (COLOR_ATTACHMENT2, COLOR_ATTACHMENT0, NONE, NONE)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 1 [details] [review],
  config (NONE, NONE, NONE, COLOR_ATTACHMENT1)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 2 [details] [review],
  config (NONE, NONE, COLOR_ATTACHMENT2, NONE)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 0,
  config (NONE, COLOR_ATTACHMENT0, NONE, NONE)
Probe color at (0,0)
  Expected: 1.000000 0.000000 0.000000 1.000000
  Observed: 0.200000 0.200000 0.200000 0.200000
  from color attachment 3 [details] [review],
  config (COLOR_ATTACHMENT3, NONE, NONE, NONE)
PIGLIT: {'result': 'fail' }


Reproduce steps:
---------------------------- 
1. xinit
2. ./bin/fbo-drawbuffers-none glDrawPixels -fbo
Comment 1 gregory.hainaut 2014-03-29 16:23:56 UTC
Created attachment 96593 [details] [review]
always_save_context

Hello,

I think I found the root cause of the bug. On meta.c, the shader context (_Shader) is not saved when the extension is not enabled. It could potentially lead to a corruption of the shader context.

Please find attached a small patch that I hope will fix your issue. 
Note1: I didn't manage to reproduce the bug on my side.
Note2: I only run 1000 piglit test with this patch (kepler/nouveau).
Comment 2 lu hua 2014-03-31 05:50:13 UTC
(In reply to comment #1)
> Created attachment 96593 [details] [review] [review]
> always_save_context
> 
> Hello,
> 
> I think I found the root cause of the bug. On meta.c, the shader context
> (_Shader) is not saved when the extension is not enabled. It could
> potentially lead to a corruption of the shader context.
> 
> Please find attached a small patch that I hope will fix your issue. 
> Note1: I didn't manage to reproduce the bug on my side.
> Note2: I only run 1000 piglit test with this patch (kepler/nouveau).

Fixed by this patch.
Comment 3 gregory.hainaut 2014-04-23 07:09:43 UTC
Anyone to review the patch and commit it (or do I need to send it to the mailling list?)
Comment 4 Ian Romanick 2014-05-21 16:55:51 UTC
A similar change was made a few weeks ago, and this test passes for me.
Comment 5 lu hua 2014-05-23 05:05:24 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.