Bug 79534 - gen<7 renders garbage
Summary: gen<7 renders garbage
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Tapani Pälli
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
: 79624 79690 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-02 09:18 UTC by Tapani Pälli
Modified: 2014-06-10 20:44 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments
workaround (555 bytes, patch)
2014-06-02 09:44 UTC, Tapani Pälli
Details | Splinter Review
screenshot (691.02 KB, image/jpeg)
2014-06-02 11:43 UTC, Tapani Pälli
Details
workaround (611 bytes, text/plain)
2014-06-03 12:17 UTC, Tapani Pälli
Details
hopeful fix (1.30 KB, patch)
2014-06-05 07:01 UTC, Tapani Pälli
Details | Splinter Review
alternative patch to tackle this issue (694 bytes, patch)
2014-06-06 09:31 UTC, Tapani Pälli
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tapani Pälli 2014-06-02 09:18:48 UTC
commit 07af0abef024f8a17a00975265eff79aa069c9b5
Author: Matt Turner <mattst88@gmail.com>
Date:   Tue May 27 10:25:05 2014 -0700

    i965/fs: Clean up fs_inst constructors.
    
    In a fashion suggested by Ken.
    
    Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Comment 1 Tapani Pälli 2014-06-02 09:44:10 UTC
Created attachment 100279 [details] [review]
workaround

hopefully attached workaround gives clues to what's up ..
Comment 2 Petri Latvala 2014-06-02 11:41:47 UTC
Reproduced on Sandy Bridge, not on Haswell.
Comment 3 Tapani Pälli 2014-06-02 11:43:34 UTC
Created attachment 100298 [details]
screenshot

here's a screenshot from SNB desktop
Comment 4 Tapani Pälli 2014-06-03 12:17:48 UTC
Created attachment 100355 [details]
workaround

A bit more debugging update, the failure comes when using opcode SHADER_OPCODE_TEX, fs_visitor has different functions for gen7 and gen5 for emitting these. gen7 sets some payload with instruction so it never calls the same constructor and is not affected.

Attached workaround fixes the problem by doing same exact thing for opcode SHADER_OPCODE_TEX that happened before the change. I will continue to investigate possible better fix.
Comment 5 Matt Turner 2014-06-03 17:22:41 UTC
Huh. Seems really weird that the texture's source is implicit. I wonder why we do that instead of just making the MRF source explicit.
Comment 6 kmod 2014-06-04 09:22:15 UTC
I am also getting these garbled graphics on Ubuntu 14.04, Unity and the intel ironlake.

http://www.phoronix.com/forums/showthread.php?50038-Updated-and-Optimized-Ubuntu-Free-Graphics-Drivers/page116
Comment 7 Tapani Pälli 2014-06-04 11:43:18 UTC
(In reply to comment #6)
> I am also getting these garbled graphics on Ubuntu 14.04, Unity and the
> intel ironlake.
> 
> http://www.phoronix.com/forums/showthread.php?50038-Updated-and-Optimized-
> Ubuntu-Free-Graphics-Drivers/page116

do you have a mesa git hash (which exact mesa are you runinng) for checking if this is the same thing?
Comment 8 kmod 2014-06-04 16:25:42 UTC
It is mesa 10.3.0-git from the latest update of the Oibaf ppa. I am sorry, I am not sure what a git-hash is. How do I check?
Comment 9 José Suárez 2014-06-04 20:52:24 UTC
Open a console and type the following command:

dpkg -l | grep libgl1

You will see something like this:

ii  libgl1-mesa-dri:amd64                                       10.3~git1405280730.ecee4c~gd~t              amd64        free implementation of the OpenGL API -- DRI modules
ii  libgl1-mesa-dri:i386                                        10.3~git1405280730.ecee4c~gd~t              i386         free implementation of the OpenGL API -- DRI modules
ii  libgl1-mesa-glx:amd64                                       10.3~git1405280730.ecee4c~gd~t              amd64        free implementation of the OpenGL API -- GLX runtime
ii  libgl1-mesa-glx:i386                                        10.3~git1405280730.ecee4c~gd~t              i386         free implementation of the OpenGL API -- GLX runtime

Copy the 10.3~git1405280730.ecee4c~gd~t equivalent value in the output of your console. (In my output, the letters after the dot, i.e. ecee4c, are the begining of the git hash version. From those letters we can know the git version the oibaf drivers you are using)
Comment 10 kmod 2014-06-05 02:40:13 UTC
Hi,

Here it is

10.3~git1406041930.3642ee~gd~t
Comment 11 Tapani Pälli 2014-06-05 04:49:48 UTC
(In reply to comment #10)
> Hi,
> 
> Here it is
> 
> 10.3~git1406041930.3642ee~gd~t

thanks, then this is likely the same issue (also bug #79624).
Comment 12 Tapani Pälli 2014-06-05 07:01:53 UTC
Created attachment 100441 [details] [review]
hopeful fix

This patch initializes src register structure, otherwise we feed uninitialized brw_src to gen_texture call.
Comment 13 kmod 2014-06-05 23:22:11 UTC
Hi

Unfortunately, still not fixed after the latest update

10.3~git1406051930.221169~gd~t
Comment 14 Tapani Pälli 2014-06-06 04:33:13 UTC
*** Bug 79690 has been marked as a duplicate of this bug. ***
Comment 15 Tapani Pälli 2014-06-06 08:05:21 UTC
*** Bug 79624 has been marked as a duplicate of this bug. ***
Comment 16 Tapani Pälli 2014-06-06 09:31:20 UTC
Created attachment 100515 [details] [review]
alternative patch to tackle this issue

here's another possible fix
Comment 17 Matt Turner 2014-06-06 17:54:19 UTC
Comment on attachment 100441 [details] [review]
hopeful fix

Review of attachment 100441 [details] [review]:
-----------------------------------------------------------------

I'd modify the fs_inst constructor in the visitor code to have a reg_undef src0 argument, since that's functionally identical to this code before my change.
Comment 18 kmod 2014-06-07 20:47:08 UTC
Hi,

Still no improvement with tbe latest update

10.3~git1406071930.40500e~gd~t
Comment 19 kmod 2014-06-08 02:03:24 UTC
Not sure if this would be of any help. I have just rolled my system back to the state before the problematic updates that seem to have broken everything since a little more than a week ago 

My last working version was

10.3~git1405280730.ecee4c~gd~t
Comment 20 Tapani Pälli 2014-06-09 09:28:34 UTC
(In reply to comment #17)
> Comment on attachment 100441 [details] [review] [review]
> hopeful fix
> 
> Review of attachment 100441 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> I'd modify the fs_inst constructor in the visitor code to have a reg_undef
> src0 argument, since that's functionally identical to this code before my
> change.

I sent a patch that fixes the Piglit errors for me. Note that gen4 is probably broken too. I don't have the HW to prove it but I think logic goes the same way (?)
Comment 21 stfn 2014-06-09 10:03:28 UTC
Bug is still present in 10.3~git1406081930.eb58aa~gd~t

Intel® Core™ i3 CPU 530 @ 2.93GHz × 4
Intel® Ironlake Desktop
Comment 22 Matt Turner 2014-06-10 04:09:11 UTC
I've committed Tapani's patch. Thanks!
Comment 23 kmod 2014-06-10 20:44:51 UTC
Upgraded to 10.3~git1406100730.7a4527~gd~t a few hours ago, the bug is fixed for me (Intel Ironlake)
Thanks a lot!


bug/show.html.tmpl processed on Mar 24, 2017 at 12:09:53.
(provided by the Example extension).