Bug 93114

Summary: No water rendered in CoR
Product: Mesa Reporter: smidjar2.reg
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED NOTOURBUG QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: No water for OpenGL
Water in gallium-nine enabled Wine
No Water in OpenGL
Water in gallium-nine enabled wine
Shader dump
water missing in Linux while using Mesa but visible in Win7

Description smidjar2.reg 2015-11-26 09:48:49 UTC
Created attachment 120131 [details]
No water for OpenGL

There is no water rendered for Champions of Regnum (aka Regnum Online). It affects radeon and intel GPUs (nouveau untested, but probably too).

When using proprietary fglrx, water is rendered correctly. In the past I used nvidia proprietary with my old GPU and water was there too. Water is also rendered correctly when running the game under gallium-nine enabled Wine, so I believe it is bug in OpenGL somewhere.

Also multitexturing doesn't seem to work for this game, this may be related to the issue.

I am attaching a screenshot showing no water is there and another one showing the water when running under wine.
Comment 1 smidjar2.reg 2015-11-26 09:49:50 UTC
Created attachment 120132 [details]
Water in gallium-nine enabled Wine
Comment 2 smidjar2.reg 2015-11-26 09:50:58 UTC
Created attachment 120133 [details]
No Water in OpenGL
Comment 3 smidjar2.reg 2015-11-26 09:51:47 UTC
Created attachment 120134 [details]
Water in gallium-nine enabled wine
Comment 4 smidjar2.reg 2015-11-26 09:56:37 UTC
Created attachment 120135 [details]
Shader dump

There is part of shader dump, that I think may be relevant. I don't know if the failure is for shader dump above or bellow the message, so I am keeping them both.
Comment 5 thedukesd 2015-11-26 13:58:46 UTC
Created attachment 120142 [details]
water missing in Linux while using Mesa but visible in Win7

I can replicate this problem on both my pc:

1) Athlon II x4 640, AMD HD 7750

Distributor ID:	LinuxMint
Description:	Linux Mint 17.2 Rafaela
Release:	17.2
Codename:	rafaela

Linux 3.16.0-53-generic #72~14.04.1-Ubuntu SMP Fri Nov 6 18:17:23 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD CAPE VERDE (DRM 2.39.0, LLVM 3.6.0)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.0.4
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 3.0 Mesa 11.0.4
OpenGL shading language version string: 1.30
OpenGL context flags: (none)

The problem is there with Mesa 10.1.3 and Mesa 11.0.4 . Mesa 11.0.4 is from xorg edgers ppa, Mesa 10.1.3 is the one that comes with the distro (I need at least 10.6 to be able to run Dota 2).

You can see how it supposed to actually look from the image took in Win 7.

2) Athlon 64 x2 4000+, ATI HD 4350

Distributor ID:	LinuxMint
Description:	Linux Mint 17.1 Rebecca
Release:	17.1
Codename:	rebecca

Linux 4.2.0-18-generic #22~14.04.1-Ubuntu SMP Fri Nov 6 22:20:11 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV710 (DRM 2.43.0, LLVM 3.6.0)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.0.4
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 11.0.4
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:

The situation is even worst with HD 4350, the water is not rendered, also there is the nude model bug.

In this case the problem happens in exactly same way (no water, nude model) with kernel 3.13.0-37 and kernel 4.2.0-18.
Comment 6 Jason Ekstrand 2015-11-26 20:32:13 UTC
Could you get an API trace and them verify that the trace renders correctly on fglrx.  That will a) verify that it's a driver bug and not a game bug and b) make it easier to debug for devs who don't play CoR.

https://github.com/apitrace/apitrace
Comment 7 Michel Dänzer 2015-11-27 00:52:50 UTC
BTW, how about Wine without nine?
Comment 8 smidjar2.reg 2015-11-27 13:16:46 UTC
Wine without nice renders the water correctly too. I am going to try apitrace. If I understand it right, you want me to use apitrace and run the game with mesa, then switch to fglrx and run the trace recording there?
Comment 9 Jason Ekstrand 2015-11-27 17:40:53 UTC
(In reply to smidjar2.reg from comment #8)
> Wine without nice renders the water correctly too. I am going to try
> apitrace. If I understand it right, you want me to use apitrace and run the
> game with mesa, then switch to fglrx and run the trace recording there?

Yes, that way we know the trace is rendering the water correctly and that the bug is the driver.  If the trace renders no water on fglrx then it's possible that some extension being exposed on fglrx is causing the engine to take a different rendering path that doesn't render the water correctly.  Since the trace is just a dumb stream of GL calls, it should render exactly on both drivers (assuming fglrx supports all the extensions the trace uses, which it probably does).  If the trace renders differently on the two drivers, then it's most likely a driver bug.
Comment 10 smidjar2.reg 2015-11-27 17:59:43 UTC
I have created the trace and I tried running it with fglrx. Result is that there is no water rendered with fglrx too.

apitrace found a bug in game's FXAA shader (preprocesor directive). I have 'fixed' it, but it had no effect on this issue.

I also made a trace with the fglrx driver. That can't be replayed with the opensource driver because of missing features (glNamedBufferDataEXT, GL_UNIFORM_BUFFER_EXT and more).

I can provide either of the traces. They are quite large, 130ish MB for opensource and 200 for fglrx trace, compressed by xz. Where would be the best place to upload them?
Comment 11 Kenneth Graunke 2015-11-28 03:20:54 UTC
Last I checked this was a very buggy GL application, so beware...
Comment 12 Jason Ekstrand 2015-11-28 06:16:57 UTC
(In reply to Kenneth Graunke from comment #11)
> Last I checked this was a very buggy GL application, so beware...

I think that just got justified...

Given that fglrx also renders the trace wrong, it sounds like a bug in the game. I'm closing this as NOTOURBUG.

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.