Bug 100387 - War Thunder game has visual errors, missing textures
Summary: War Thunder game has visual errors, missing textures
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: 17.1
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-25 14:20 UTC by aceman
Modified: 2019-09-18 19:23 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
War Thunder on Radeon HD 8470D with Mesa 17.1.0rc2 (689.38 KB, image/png)
2017-05-06 00:52 UTC, russianneuromancer
Details
screenshot - War Thunder, Radeon HD 6850 (350.35 KB, image/png)
2017-09-07 04:40 UTC, Peter
Details
X.org log file (22.62 KB, text/x-log)
2017-09-08 18:22 UTC, Peter
Details

Description aceman 2017-03-25 14:20:40 UTC
Using the War Thunder game on Slackware, Mesa git custom compiled, LLVM 4.0 and on a RV710 card (512MB video RAM) always produces visual errors. The errors are not the same at all runs but vary between these problems, e.g. sky being black, clouds being any color, water is some color without reflections, trees being blue.
Plane/ground target models are mostly correct, but sometimes they are also white.

The errors can be seen right in the hangar, but also when playing the game (in a mission).

I have set the "Old videocard support" in the graphics options in the game. This has improved things to the state I describe. The game client shows "ultra low quality" in the right hand corner. I am using the low-res client (HD textures not downloaded) and the client often prompts to download hi-res textures which I decline.

Other than this, the game runs correctly, albeit slow on this GPU (5-15FPS).

In the console where I start the game (updater binary) there is a ton of output like:
EE r600_shader.c:183 r600_pipe_shader_create - translation from TGSI failed !
EE r600_state_common.c:803 r600_shader_select - Failed to build shader variant (type=1) -1

The line numbers 183 and 803 are always the same.
Comment 1 aceman 2017-03-25 17:07:27 UTC
I now noticed the same console errors are output when running the latest Firefox nightly with "webrender" force-enabled (in about:config). Maybe that helps and is easier to debug than a big game.
Comment 2 aceman 2017-04-04 21:53:07 UTC
I can test patches if you have any ideas. Thanks.
Comment 3 russianneuromancer 2017-05-06 00:52:33 UTC
Created attachment 131233 [details]
War Thunder on Radeon HD 8470D with Mesa 17.1.0rc2

Same issue on Radeon 8470D.

Software:
Kubuntu 17.0 x86_64
Linux 4.10
Mesa: 17.1.0rc2
libdrm: 2.4.80
xserver-xorg-video-radeon: 7.9.0
xserver-xorg-core: 1.19.3

Hardware: 
AMD A6-6400K with Radeon HD 8470D (ARUBA)
Comment 4 Hi-Angel 2017-06-19 21:00:29 UTC
From a quick debugging session the error is coming from here https://github.com/mesa3d/mesa/blob/a5e1c9f1d5b6063f0a92634967475a05362c0d31/src/gallium/drivers/r600/r600_asm.c#L603

Don't have time ATM to look closer, but commenting here in case anybody have ideas, including what to look at.
Comment 5 Hi-Angel 2017-07-16 21:42:26 UTC
Sorry for long time not answering. The error is because one instruction is using more than 2 cfiles which check_and_set_bank_swizzle() doesn't allow, though acc. to docs it can handle up to 4 distinct cfiles in a group.

I was trying to fix it be rewriting the bank_swizzle scheduler into smarter version, but had to abandon it because it turned out to be pointless (the effeciency is about the same, but more importantly, for some reason r600g have 2 schedulers, and this one simply does validation). FTR, unfinished code is here https://github.com/Hi-Angel/mesa/tree/wip-bank_swizzle-scheduler

I am not sure if I'll have a motivation to look into modifying the current scheduler, the more that there's some oddness in documentation (you can say "pun intended" because it is that docs don't allow odd number of distinct cfiles in a group, however a group with 1 cfile works just fine).

But fixing this bug won't help to the game anyway, because the next problem it runs into is a very old one of requiring too many GPRs https://bugs.freedesktop.org/buglist.cgi?quicksearch=Shader%20GPR%20limit%20exceeded&list_id=619399
Comment 6 aceman 2017-07-30 20:55:14 UTC
Are those problems solved in radeonsi?
Comment 7 Peter 2017-09-07 04:34:29 UTC
I see very similar problem with Radeon HD 6850.

OTOH, I must say that with AMD A8-7600 onchip Radeon R7 everything seems OK.
Comment 8 Peter 2017-09-07 04:40:52 UTC
Created attachment 134034 [details]
screenshot - War Thunder, Radeon HD 6850

MESA 17.1.5
Comment 9 Peter 2017-09-07 04:45:57 UTC
(In reply to Hi-Angel from comment #5)

> But fixing this bug won't help to the game anyway, because the next problem
> it runs into is a very old one of requiring too many GPRs

Are You sure? I don't know the exact background here, but on Radeon R7 it runs seamlessly...
Comment 10 aceman 2017-09-07 21:03:02 UTC
I'd assume "AMD A8-7600 with onchip Radeon R7" uses the separate radeonSI mesa driver and may not have this problem reported in this bug. Notice the bug is against R600 driver.

I asked about the radeonSI drive in comment 6 but didn't get a reply. If you could find out if you are running with it and rendering is fine, I would like to know.
Comment 11 Peter 2017-09-08 09:45:57 UTC
Well, no problem, just please give me a reliable way to get this info. Listing the X.org.log, I'm a bit confused.
Comment 12 aceman 2017-09-08 17:32:54 UTC
Try looking for DRI driver name or VDPAU driver name in Xorg.log.
Comment 13 Peter 2017-09-08 18:22:18 UTC
Created attachment 134095 [details]
X.org log file

please, see attachment...
Comment 14 aceman 2017-09-08 20:45:14 UTC
The attached log seems to imply R600 driver is used.
It also lists the GPU as:
Chipset: "AMD Radeon HD 6800 Series" (ChipID = 0x6739)

Is this really from the A8-7600 machine?
Comment 15 Peter 2017-09-09 04:03:03 UTC
No, the log is from LTSP thin/fat client. Terefore CPU is of LTSP server.
GPU is correct though.
Comment 16 Maksim 2017-09-17 16:34:29 UTC
Same problem on Radeon HD 6470M

mesa-17.0.6/17.1.9
llvm-3.9.1-r1/4.0.1
xf86-video-ati-7.9.0
xorg-server-1.19.3
kernel-4.12.12-gentoo
Comment 17 Maksim 2017-09-17 16:55:09 UTC
(In reply to aceman from comment #6)
> Are those problems solved in radeonsi?

(In reply to aceman from comment #10)
> I asked about the radeonSI drive in comment 6 but didn't get a reply. If you
> could find out if you are running with it and rendering is fine, I would
> like to know.

On my other machine amdgpu+radeonsi it is working OK.
Comment 18 russianneuromancer 2017-11-25 07:43:33 UTC
Issue is still reproducible in Mesa 17.2. With Mesa 17.3 I get GPU lockup at War Thunder launch: bug 103900
Comment 19 Agatha_Luni 2017-11-25 08:00:26 UTC
I have same issue on my AMD A6-6400K with Radeon HD 8470D (ARUBA)
Kubuntu 17.10 x86_64 with Linux 4.13.0 and Mesa 17.2.2
Comment 20 russianneuromancer 2017-11-27 18:52:31 UTC
Possibly this bug is duplicate of bug 99349
Comment 21 aceman 2018-02-17 13:14:38 UTC
Yes, with amdgpu+radeonsi (on RX560) there are no issues. It runs at 40-60fps on Medium details.
Comment 22 russianneuromancer 2018-02-23 06:13:16 UTC
Looks similar: bug 105213
Comment 23 GitLab Migration User 2019-09-18 19:23:01 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/599.


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.