grvk icon indicating copy to clipboard operation
grvk copied to clipboard

Battlefield Hardline

Open libcg opened this issue 4 years ago • 31 comments

Meta-issue for Battlefield Hardline.

  • [ ] Working?
  • [ ] ???

libcg avatar Dec 10 '21 02:12 libcg

Does not work.

Got this error message when trying to start a match:

Microsoft Visual C++ Runtime Library

Assertion failed!

Program: D:\Origin Games\BFH\bfh.exe File: ../src/amdilc/amdilc_compiler.c Line: 1979

Expression: false

For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts

Press Retry to debug the application - JIT must be enabled

grvk.log

bazookaben avatar Dec 11 '21 19:12 bazookaben

Can you dump the shader binaries?

Cherser-s avatar May 12 '22 20:05 Cherser-s

How would I do that?

bazookaben avatar May 13 '22 01:05 bazookaben

Set the GRVK_DUMP_SHADERS=1 environment variable.

niobium93 avatar May 13 '22 05:05 niobium93

Yup, then the game will probably dump it in "current" directory (which will be probably the game directory). There will be three files per each shader: AMD IL binary, AMD IL text and the resulting SPIRV code.

Cherser-s avatar May 13 '22 17:05 Cherser-s

OK I brought up the Environment Variable window in Windows, so what do I put in "variable" and what do I put in "value"? Or am I in the wrong place

bazookaben avatar May 17 '22 03:05 bazookaben

well, in the snippet above, "1" is the value, while "GRVK_DUMP_SHADERS" is the key/name (or "variable").

Cherser-s avatar May 17 '22 05:05 Cherser-s

Actually, if you are using Steam, you can set an environment variable there as in GRVK_DUMP_SHADERS=1 %command%.

Cherser-s avatar May 17 '22 05:05 Cherser-s

Ok, I tried the setting that environment variable both in the user and system categories, and in the "launch options" in the Origin launcher. No new files appeared in the game directory

bazookaben avatar May 17 '22 23:05 bazookaben

idk about windows, maybe you need to reboot your pc and check that env var is set through echoing inside cmd.exe. You can set GRVK_LOG_LEVEL variable to debug, so you get more data in logs (will be easier to find failing shaders). Also download newer grvk libraries, since I've implemented one of the instructions that are being used by the game and weren't implemented (maybe this will compile the shader correctly when you are joining the match, though tess shaders are still not implemented in the moment).

Cherser-s avatar May 18 '22 05:05 Cherser-s

Yeah restarting my PC was the key

I used build #39, which didn’t crash but just basically ran as a background process I could see in task manager

GitHub won’t let me post a Zip for some reason, so here’s a drive link, includes the log : https://drive.google.com/file/d/1ugKijTgFRIan3xxf-FvaLpIF8WdkcqjC/view?usp=drivesdk

bazookaben avatar May 21 '22 21:05 bazookaben

Unfortunately I can't test the game because Battlelog doesn't work on Linux...

libcg avatar May 22 '22 02:05 libcg

Ok, looks like your shaders get compiled properly with the exception of tessellation shaders, which aren't implemented. try compiling my branch: https://github.com/Cherser-s/grvk/tree/tessellation-new

Cherser-s avatar May 22 '22 07:05 Cherser-s

Got an error when I tried to compile: meson-log.txt

Followed the instructions on the main page. pretty sure I installed all the necessary stuff on my Ubuntu laptop.

bazookaben avatar May 24 '22 02:05 bazookaben

Hmmmm it looks like it doesn't like the compiler you have installed considering how init tests fail

Cherser-s avatar May 24 '22 19:05 Cherser-s

Do you use something other than meson?

bazookaben avatar May 25 '22 00:05 bazookaben

Nope, why would it compare sizeof(void*) to 15?? it isn't 128bit. Are you sure, that you configured it correctly?

Cherser-s avatar Jun 02 '22 21:06 Cherser-s

I didn't do any configuration, just ran the commands on the main page here. Then downloaded a package that meson said I was missing. I wouldn't know where to begin trouble shooting something like this. I have zero programming experience, I'm only really helpful because I have four of the supported Frostbite games in my Origin library haha.

bazookaben avatar Jun 02 '22 23:06 bazookaben

I just tried Battlefield Hardline and it runs fine. As long as Fullscreen Mode is set to Borderless and Terrain Quality to Medium. Here's the log: grvk.log

niobium93 avatar Jul 12 '22 14:07 niobium93

Here's a screenshot: 2022-07-12-17:49:44-screenshot

niobium93 avatar Jul 12 '22 14:07 niobium93

This same scene with the same settings on DXVK reaches 130-150 fps, so GRVK is a lot slower.

niobium93 avatar Jul 12 '22 15:07 niobium93

@Cherser-s I tried your tessellation-new branch and it indeed lets me run the game with max settings. Log: grvk.log Screenshot: 2022-07-12-18:19:15-screenshot It runs exactly as fast as regular GRVK and I can't really see any difference visually. Oh and the game always crashes when quitting. On either branch.

niobium93 avatar Jul 12 '22 15:07 niobium93

Do you guys need a shader dump or something before I uninstall this game?

niobium93 avatar Jul 12 '22 15:07 niobium93

Do you guys need a shader dump

yes, it would be great

I can't really see any difference visually.

not a surprise, considering the game only uses the tessellation for terrain calculation

idk if there is a perf graph in this game, but can you also check the CPU overhead between grvk and dxvk?

Cherser-s avatar Jul 12 '22 16:07 Cherser-s

@Cherser-s Here are the shaders

Log files with GRVK_LOG_LEVEL=trace: grvk_axl.log.zst grvk.log.zst

Is this enough info about the CPU overhead difference?: comparison

niobium93 avatar Jul 12 '22 17:07 niobium93

No, it just shows the frametime, unfortunately mangohud can't show this. Open the in-game console and try the commands like PerfOverlay.DrawGraph 1 (idk how it looks in hardline, I've just written here the one from bf4).

Cherser-s avatar Jul 12 '22 19:07 Cherser-s

GRVK: 2022-07-12-22:40:25-screenshot grvk

DXVK: 2022-07-12-22:42:56-screenshot dxvk

niobium93 avatar Jul 12 '22 19:07 niobium93

@Cherser-s is that enough?

niobium93 avatar Jul 12 '22 19:07 niobium93

yes, thank you

Cherser-s avatar Jul 12 '22 19:07 Cherser-s

You're welcome :smile:

niobium93 avatar Jul 12 '22 20:07 niobium93