wine-nine-standalone icon indicating copy to clipboard operation
wine-nine-standalone copied to clipboard

Secret World Legends crash with Mesa 21.1.0 stable

Open JonesGreen opened this issue 3 years ago • 13 comments

Hi, I'm not sure if I should post that here or on the mesa bug tracker.

On Archlinux I got mesa 21.1.0 stable and with that Secret World Legends crashes as soon as it tries to load the 3D Character Screen after the login. I compared the Wine Log with that of the working one with Mesa 21.0.3 and noticed that it prints out:

unknown TGSI tex op 182

when it crashes.

I'm using v0.8.0.385-release of nine. AMD Vega 56 as graphic card. What other additional information would be helpful?

JonesGreen avatar May 13 '21 10:05 JonesGreen

Quick question:

Before running the game, have you run wine with export MESA_GL_VERSION_OVERRIDE=4.5 wine , or added it to PlayOnLinux / Steam as run configuration?

(it did solve crashing issues with me)

stradicat avatar May 25 '21 19:05 stradicat

Also affects Alien Swarm on Steam.

I'm not sure what's changed here. TGSI tex op 182 is TG4. It's falling through the switch in ttn_tex() in tgsi_to_nir.c. From what I can tell, it used to be handled in radeonsi when it consumed tgsi directly, and is still in other drivers, but presumably should be handled now by tgsi_to_nir?

Has this been working until tgsi support was dropped by radeonsi, and has just fallen through the gaps as it isn't that common? Maybe Alien Swarm was updated to use it where it didn't previously?

@dennismayr, why or how could MESA_GL_VERSION_OVERRIDE help with gallium-nine? You're probably using wined3d.

sjnewbury avatar Jun 07 '21 13:06 sjnewbury

Also affects Alien Swarm on Steam.

I'm not sure what's changed here. TGSI tex op 182 is TG4. It's falling through the switch in ttn_tex() in tgsi_to_nir.c. From what I can tell, it used to be handled in radeonsi when it consumed tgsi directly, and is still in other drivers, but presumably should be handled now by tgsi_to_nir?

Has this been working until tgsi support was dropped by radeonsi, and has just fallen through the gaps as it isn't that common? Maybe Alien Swarm was updated to use it where it didn't previously?

@dennismayr, why or how could MESA_GL_VERSION_OVERRIDE help with gallium-nine? You're probably using wined3d.

I'd suggest you to try it first.

stradicat avatar Jun 07 '21 13:06 stradicat

@dennismayr I tried it. It made no difference.

sjnewbury avatar Jun 07 '21 14:06 sjnewbury

@dennismayr Hi, thanks for your advice. Unfortunately this does not help on my end.

JonesGreen avatar Jun 07 '21 17:06 JonesGreen

I've fixed it in mesa:


--- ./src/gallium/auxiliary/nir/tgsi_to_nir.c~	2021-06-07 17:20:33.000000000 +0100
+++ ./src/gallium/auxiliary/nir/tgsi_to_nir.c	2021-06-07 17:22:02.296935345 +0100
@@ -1397,6 +1397,11 @@
       op = nir_texop_lod;
       num_srcs = 1;
       break;
+   case TGSI_OPCODE_TG4:
+     op = nir_texop_tg4;
+     num_srcs = 1;
+     samp = 2;
+     break;

    default:
       fprintf(stderr, "unknown TGSI tex op %d\n", tgsi_inst->Instruction.Opcode);

sjnewbury avatar Jun 07 '21 17:06 sjnewbury

@sjnewbury Your patch fixes my issue. I just compiled mesa-git with your patch and it works again. Thanks mate!

JonesGreen avatar Jun 07 '21 19:06 JonesGreen

@dhewg, can you take a look at this?

sjnewbury avatar Jun 07 '21 21:06 sjnewbury

Oh, sorry for the late reply, I missed this! That's mesa code, which definitely is a job for @axeldavy :)

dhewg avatar Jun 12 '21 17:06 dhewg

@Venemo That's for you I think. We discussed that issue some time ago.

axeldavy avatar Jun 15 '21 21:06 axeldavy

@sjnewbury Can you submit a merge request with that patch to mesa? If you don't want to, is it okay if I submit the patch?

Venemo avatar Jun 16 '21 05:06 Venemo

@Venemo, feel free to submit it. I probably won't be able to get around to it for a few days.

sjnewbury avatar Jun 16 '21 15:06 sjnewbury

For the record, - the mentioned Mesa MR has finally been submitted by Filip Gawin in !15883 "ttn: add missing opcode TG4".

lorn10 avatar Apr 12 '22 11:04 lorn10

A new addition. As of 2024 it looks that Mesa MR 28349 will implement this TG4 opcode topic in a proper way. :wink:

lorn10 avatar Mar 24 '24 09:03 lorn10