1

I'm trying to use Unity3d in Ubuntu 22.10, more specifically some terrain-generating assets. These assets use compute shaders for their calculation of the terrain generation. And it doesn't work on my system.

I have been doing some testing with GeeXLabs and compute shaders work in that environment. And Unity claims the compute shaders work when in 20.04.

So there seems to be some incompatibility between Ubuntu 22.10 and Unity3d (tested both 2021.3.17f1, 2022.2.3f1 as well as 2023.1.0b2) when it comes to compute shaders. Since it should work in Ubuntu 20.04 (which I have not been able to test myself, it's claimed by Unity) then there must be a change in Ubuntu that causes it.

What has happened between Ubuntu 20.04 and 22.10 when it comes to compute shaders that might have caused it to cease working for Unity3d?

FYI I'm using an nVidia RTX-4080 card and the 525 versions of all nVidia packages.


Update: Some very simple compute shader seems to work fine in Unity3d, possibly pointing back to Unity3d, and it might be their problem after all.

Perhaps an issue with DX HLSL to OpenGL GLSL translation issue?

I'm not working directly with compute shaders myself, but there are assets and tools in the Unity3d environment that use them extensively, and if they don't work that makes it very hard to use those tools in Linux, which holds Linux developers back quite a lot.

By now I don't really expect a solution, but if someone have the ability to debug such issues and could give me at least some hints about how to debug it myself, that would be enough for now.


Another update, I managed to get the Unity people to test it with 22.04 (officially not supported, but at least it's an LTS so should hopefully be coming soon), and they claim it works.

So that changes a few things. The problem is either

  • Differences between 22.04 and 22.10; Or
  • Differences in driver version; Or
  • Differences in my installation

I did manage to get a Docker image to work with Unity3d and 20.04, but it had the same problem. I did put the same 525 driver as I'm using into the Docker image, so I'll start with experimenting with driver version first and see if it changes anything.

I will also see if I can get more logs out of either Unity3d, Ubuntu and the nvidia drivers to see if it tells me anything.

1 Answer 1

0

The solution, it turns out, is to switch to Vulkan instead of OpenGL.

I had some troubles, but it was mostly my experimenting with getting Vulkan to work that caused the problem. I had some confusion avoud Prime, Optimus and Bumblebee that in turn confused my system.

Once all those parts disappeared and I now run directly using the nVidia drivers it all works fine.

As a bonus I can now create and work with HDRP scenes in Unity3d.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .