Bug 101479

Summary: shader display problems Unreal 4 Engine
Product: Mesa Reporter: vinf100
Component: Drivers/Gallium/r600Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact: Default DRI bug account <dri-devel>
Severity: normal    
Priority: medium    
Version: 17.0   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Rendering problems with lit mode

Description vinf100 2017-06-17 10:14:29 UTC
Created attachment 132017 [details]
Rendering problems with lit mode

Hello,

I have installed and built the unreal 4 engine editor from source (with no errors), and I am attempting to trial it. Firstly, since mesa still hasn't implemented openGL 4.3, which Unreal Engine requires, I am running Unreal Engine in openGL 3 mode. My graphics card is AMD HD 5570, Redwood, which will in the future receive openGL 4.3/4.5 support. So until that happens, I was planning to just run Unreal Engine in the openGL 3 mode. However, when I run openGL in that mode, it starts up without error into the project browser, but when I create a project, the rendering of the game objects are horribly wrong (see attachment). It is fine when the scene is unlit; it is only wrong with lighting. When the viewport is in lit mode (the one with the problems), it floods the console with this message:

EE ../../../../../src/gallium/drivers/r600/r600_state_common.c:799 r600_shader_select - Failed to build shader variant (type=1) -1

I looked up the problem online, and it is a problem on the driver end, not on Unreal's end.
Comment 1 vinf100 2017-06-17 11:44:49 UTC
I looked up more, and this is probably a duplicate of bug 99349 (https://bugs.freedesktop.org/show_bug.cgi?id=99349) . At the end, there was a suggestion for a patch to fix this.  

It has not yet been released in an update, so I am applying the patch myself and checking if it works.
Comment 2 vinf100 2017-06-18 09:42:21 UTC
I built mesa with the patch, and it works.

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.