Bug 93676 - [BDW] Bad blit from FBO to FRONT
Summary: [BDW] Bad blit from FBO to FRONT
Status: NEW
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: 11.0
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Ian Romanick
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-12 06:06 UTC by Clive McCarthy
Modified: 2019-05-27 01:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
No artefacts when rendering FRONT and BACK (5.79 MB, text/plain)
2016-01-12 06:06 UTC, Clive McCarthy
Details
artefacts when rendering via FBO (5.79 MB, application/x-executable)
2016-01-12 06:11 UTC, Clive McCarthy
Details
shared library list (3.98 KB, text/plain)
2016-01-12 06:13 UTC, Clive McCarthy
Details
executable (5.79 MB, application/x-executable)
2016-01-12 06:16 UTC, Clive McCarthy
Details
parts of the rendering set up (9.03 KB, text/plain)
2016-01-12 06:39 UTC, Clive McCarthy
Details
left good right bad (2.05 MB, image/jpeg)
2016-01-12 08:46 UTC, Clive McCarthy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Clive McCarthy 2016-01-12 06:06:04 UTC
Created attachment 120976 [details]
No artefacts when rendering FRONT and BACK

There are bad artefacts when rendering via an FBO to FRONT with a blit. These are absent when rendering to both FRONT_AND_BACK buffers with a buffer swap.

Environment:
   Linux Mint 17 (Linux 3.13.0-24-generic)
   Mesa 11.2.0 (via oibaf)
   HD6000 GPU

Attached are two executables one with FBO rendering one without. The Mesa Intel linker takes two minutes to link so be patient.

The very same executables work just fine with an Nvida GPU.
Comment 1 Clive McCarthy 2016-01-12 06:11:21 UTC
Created attachment 120977 [details]
artefacts when rendering via FBO

this is the second executable which exhibits the artefacts
Comment 2 Clive McCarthy 2016-01-12 06:13:38 UTC
Created attachment 120978 [details]
shared library list

This file shows the shared libraries used by these executables. Nothing special I think.
Comment 3 Clive McCarthy 2016-01-12 06:16:10 UTC
Created attachment 120979 [details]
executable
Comment 4 Matt Turner 2016-01-12 06:22:10 UTC
People are not likely to run stray executables for a variety of reasons. apitraces (or source code) would be much preferable.
Comment 5 Clive McCarthy 2016-01-12 06:22:51 UTC
Comment on attachment 120976 [details]
No artefacts when rendering FRONT and BACK

Whoops, it's an executable! I've added it at the end.
Comment 6 Clive McCarthy 2016-01-12 06:30:59 UTC
(In reply to Matt Turner from comment #4)
> People are not likely to run stray executables for a variety of reasons.
> apitraces (or source code) would be much preferable.

I understand Matt, but the source code is quite a large system and needs various large images to accompany it. I have embedded smaller images, the shaders etc. in the executable.

Apitrace just crashes when I have tried it -- after building it from source -- so I'd be engaged in yet another debug.

I'm sure you guys have a spare Linux machine that you use for crash purposes that isn't connected to your network? Back up the machine; unplug the RJ-45; do the tests; wipe the disk and restore. Or trust me.

BTW, thanks for buying Altera.
Comment 7 Clive McCarthy 2016-01-12 06:39:52 UTC
Created attachment 120980 [details]
parts of the rendering set up

Source code for the rendering set up. Various modes are set depending on the driver found.
Comment 8 Clive McCarthy 2016-01-12 08:46:28 UTC
Created attachment 120983 [details]
left good right bad

The left side of the image is the result of rendering to both the FRONT and BACK buffers with a periodic swap. The right hand side is rendering via an FBO to the FRONT buffer.

In the right hand side there are gridded dots of pixels both in solid areas and light areas which suggest the alpha channel is somehow corrupted.

Rendering to an FBO is the preferred method and it works just fine with Nvidia.
Comment 9 Andrii K 2019-05-23 10:33:18 UTC
Tried to reproduce issue using available part of source code. As it missing important parts of application it's impossible to observe mentioned issues (dotes) not from pre-compiled test. Behavior is identical with Intel, Radeon and Nvidia. So nothing to fix till exact sample to reproduce provided.
Comment 10 Clive McCarthy 2019-05-27 01:59:12 UTC
Thank you for working so hard on this issue. The FBO blitting turns out to be a red herring.

My fragment shader is 'odd' in that is has large switch statement. This has caused the linking time to be rather long as reported in bug #91857
and, to my surprise, it also causes the artifacts I reported here and in bug #110424

I created a sample application (attached to #110424) that illustrates the problem. I'm afraid it will be troublesome to build, though it is a regular GCC build, but it is possible to reproduce the artifacts with it.

The fragment shader's case statement has a #if ... #endif section that will enable/disable the artifact problem.


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.