Bug 95144

Summary: [BDW] Incorrect rendering of Win8.1 VM working in VMware Workstation
Product: Mesa Reporter: Andrey Sudnik <andrey.sudnik>
Component: Drivers/DRI/i965Assignee: Ian Romanick <idr>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: emil.l.velikov
Version: 11.2Keywords: bisected
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Visual corrution example in MS pdf Reader
glxinfo output on Linux host OS
Apitrace trace file that reproduces the issue.
Trace file from HSW

Description Andrey Sudnik 2016-04-26 06:57:00 UTC
Created attachment 123265 [details]
Visual corrution example in MS pdf Reader

System Environment:
--------------------------
 chipset: BDW
 system architecture: x86-64
 xserver-xorg-video-intel: 2.99.917+git20160325-1ubuntu1
 xserver-xorg-core: 1.18.3-1ubuntu2
 mesa: 11.2.0
 libdrm-intel: 2.4.67-1
 kernel: Linux 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
 OS: Ubuntu Linux 16.04
 VMware Workstation: 12.1.0
 Guest OS: Windows 8.1 64-bit

Bug detailed description:
-------------------------
I run Windows 8.1 VM under Linux Workstation with enabled hardware graphics acceleration. Here are the options in vmx configuration file that enable 3D support:
mks.enable3d = "TRUE"
mks.use3dRenderer = "hardware"
mks.gl.allowBlacklistedDrivers = "TRUE"
svga.graphicsMemoryKB = "1048576"

I observe visual corruptions in Microsoft pdf Reader. When I open some pdf files using Microsoft pdf Reader there are black triangles on the page.

The issue reproducible only on BDW. System with HSW renders image correctly.
Moreover apitrace file captured from VM on BDW doesn't reproduces the issue on HSW while replaying.

See attached files for more details.
Comment 1 Andrey Sudnik 2016-04-26 07:00:23 UTC
Created attachment 123266 [details]
glxinfo output on Linux host OS

Added glxinfo output
Comment 2 Andrey Sudnik 2016-04-28 11:16:43 UTC
Created attachment 123317 [details]
Apitrace trace file that reproduces the issue.

apitrace file is attached
Comment 3 Ilia Mirkin 2016-04-28 19:27:49 UTC
FTR, I also see the issues replaying the trace on SKL.
Comment 4 Andrey Sudnik 2016-05-20 08:00:03 UTC
Created attachment 123939 [details]
Trace file from HSW

Attached trace file captured on HSW.
It doesn't reproduce visual issues on HSW, but on BDW it reproduces visual corruptions.
Please ignore previous trace file, Windows VM cashes rendered image and even on HSW previous trace file reproduces the issue.

A good example is call #55306 glDrawArrays(GL_TRIANGLE_STRIP,0,4),
This call draws a background of the pdf document page. On HSW is draws white rectangle however on BDW it draws only white triangle.

This draw call uses shader program #201 created in call #24247.
Most likely the issue not in the fragment shader. FS was modified to output always vec4(1.0, 1.0, 1.0, 1.0), and the glDrawArrays draws white triangle on BDW.
Most likely the issue is in vertex shader processing.

Haven't checked vertex data stored in buffers.
Comment 5 Svyatoslav Pankratov 2016-06-23 13:43:26 UTC
Looks like that this problem will be fixed in upcoming Mesa 12.0.0.
I've bisected commits between 11.2.0 and 12.0.0-rc3 and found that commit "i965: Clamp "Maximum VP Index" to 1 when gl_ViewportIndex isn't written."(e0e7280db0b03b08479ef9db681db186f80605e5) fixes this issue.
Comment 6 Matt Turner 2016-06-23 17:12:35 UTC
Emil, can we cherry-pick the commit mentioned in comment 5 to the 11.2 branch? It was marked for stable -- perhaps there was a problem picking it?
Comment 7 Matt Turner 2016-11-02 05:22:55 UTC
(In reply to Matt Turner from comment #6)
> Emil, can we cherry-pick the commit mentioned in comment 5 to the 11.2
> branch? It was marked for stable -- perhaps there was a problem picking it?

I failed in getting the commit into 11.2.x. Sorry for that. I suppose since the bug was resolved in 12.0 and 12.0+ are the only supported versions we'll mark this resolved.

commit e0e7280db0b03b08479ef9db681db186f80605e5
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Sat May 7 17:30:02 2016 -0700

    i965: Clamp "Maximum VP Index" to 1 when gl_ViewportIndex isn't written.

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.