Bug 54524

Summary: [Bisected SNB IVB]oglc multicontext(basic.sharing.program) fails
Product: Mesa Reporter: lu hua <huax.lu>
Component: Drivers/DRI/i965Assignee: Kenneth Graunke <kenneth>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: high CC: idr, xunx.fang
Version: git   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: output

Description lu hua 2012-09-05 03:54:14 UTC
System Environment:
--------------------------
Arch:             x86_64
Platform:         Ivybridge
Libdrm:	(master)libdrm-2.4.39-2-g92fd0ce4f659d7b0680543e9e5b96a3c7737a5f3
Mesa:	(master)9a31e090efb15ec34e7a1a5e707d600a11d74925
Xserver:(master)xorg-server-1.12.99.905-12-g148583d62b84832369e9df39b3e527b99ca96761
Xf86_video_intel:(master)2.20.6-8-g18d26076c778c20eb589b638fc47fa847793f149
Libva:	(staging)9f5cfb90b8c89b1c91692c2f58c0a02eaf7ee682
Libva_intel_driver:(staging)f842b5021acbf093572a1bd0f86d32ff3e08621e
Kernel:	(drm-intel-nightly) af5f39db001bf71cb53a5026073f7dddbf2bd9a4

Bug detailed description:
-------------------------
It fails on Ivybridge and sandybridge with mesa master branch. It also fails on mesa 9.0 branch(commit 284fe97515998178962b5abb4ed0b828b3497c77).
Following cases also fail and have the same commit:
multicontext(basic.sharing.uniform)
multicontext(advanced.sharing.program.deleteInOriginal)
multicontext(advanced.sharing.deleteInShared.program)
multicontext(advanced.sharing.program.deleteOriginalCtxFirst)
multicontext(advanced.sharing.program.deleteObjectInUse)
multicontext(advanced.sharing.program.deleteOriginalContext)
multicontext(advanced.sharing.program.deleteSharedContext)
multicontext(advanced.sharing.uniform.deleteOriginalContext)

Bisect shows:9ef710575b914ddfc8e9a162d98ad554c1c217f7 is the first bad commit.
commit 9ef710575b914ddfc8e9a162d98ad554c1c217f7
Author: Kenneth Graunke 
Date: Sun Aug 26 12:11:50 2012 -0700

i965: Reenable the fragment shader precompile.

Precompiling the shader at link time often allows us to avoid compiling
it at the first use. This moves the expensive compilation and
optimization process to game or level load time, rather than at draw
time, where we really can't avoid any cycles and don't want to risk
stalling the GPU.


Visual Report:
ID      |ACCELERA|DB      |REND_T  |SURF_T  |C_BUF_T |BUF_S   |RED_S   |
     148|       1|       1|      gl|  wipbpx|    rgba|      32|       8|

GREEN_S |BLUE_S  |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES |
       8|       8|       8|      24|       8|      64|       0|       0|

SRGB    |TEX_RGB |TEX_RGBA|CAVEAT  |SWAP    |M_PBUF_W|M_PBUF_H|M_PBUF_P
      -1|       0|       0|    slow|   undef|       0|       0|       0

OpenGL Report.
    Vendor - 'Intel Open Source Technology Center'
    Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop x86/MMX/SSE2'
    Version - '3.0 Mesa 9.0-devel (git-284fe97)' (3.0)
    GLSL Version - '1.30'
    Context Flags - None

>> Multicontext/multithreading (multicontext)  test:
--> 1.1.3 - basic.sharing.program subcase:
Expected to read green color, instead [1.000000, 0.000000, 0.000000, 1.000000] was read
--< 1.1.3 - basic.sharing.program subcase failed.
<< Multicontext/multithreading (multicontext)  test failed. (1 of 1 subcases)

Intel Conformance failed.
Total Passed : 0
Total Failed : 1
Total Not run: 0

Reproduce steps:
----------------------------
1. xinit
2. ./oglconform -z -suite all -v 2 -D 148 -test multicontext \ basic.sharing.program
Comment 1 Eric Anholt 2012-11-13 21:19:46 UTC
Works for me on ivb with master.
Comment 2 lu hua 2012-11-14 02:59:40 UTC
Created attachment 70048 [details]
output

It still happens on ivybridge and sandybridge.
Comment 3 Kenneth Graunke 2013-01-09 01:01:09 UTC
I've posted a patch to fix this on mesa-dev:
http://lists.freedesktop.org/archives/mesa-dev/2013-January/032425.html
Comment 4 lu hua 2013-01-15 05:41:41 UTC
Fixed on master branch by commit 8c80bdc4a8d0b1c39cad8b8bfb1b982a498f0a8e. Still fail on 9.0 branch.
commit 8c80bdc4a8d0b1c39cad8b8bfb1b982a498f0a8e
Author: Kenneth Graunke 
Date: Tue Jan 8 17:00:13 2013 -0800

i965: Move program_id to intel_screen instead of brw_context.

According to bug #54524, I regressed oglconform's multicontext test
when I reenabled the fragment shader precompile.
Comment 5 Eric Anholt 2013-11-28 01:22:13 UTC
Closing.  This was fixed on master a long time ago.
Comment 6 lu hua 2013-12-02 07:51:46 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.