[RESOLVED] ComputeShader Android Errors

Hi everyone,

Wondered if anyone was a shader genius and could maybe help me work out what on earth is happening here…

I’ve been building VR for the Quest 2 with DK content in Unity using URP and the Shader Graph with the Unity Video Player (not AV Pro). At some point I was getting dynamic and/or static batching issues when multiples clips were shown, so I started messing around trying to fix that, but ultimately I’ve ended up with all Depthkit content (even in different apps/Unity projec/tests) becoming invisible and not being rendered. I can see other objects in the scene just not the DK stuff. Doesn’t seem to work n SRP either.

Examining the Android logs - it’s repeating this error stream a lot. Any idea what it is about?

This is from one URP project…

06:54:30.436UnityDepthkitCoreMeshSource.compute: Kernel at index (9) is invalid
06:54:30.436UnityDepthkit.Util:DispatchGroups(ComputeShader, Int32, Int32, Int32, Int32)
06:54:30.436UnityDepthkit.CoreMeshSource:OnGenerate()
06:54:30.436UnityDepthkit.DataSource:Generate()
06:54:30.436UnityDepthkit.Clip:DoGenerate()
06:54:30.436UnityDepthkit.Clip:LateUpdate()
06:54:30.436Unity
06:54:30.436Unity[./Runtime/Shaders/ComputeShader.cpp line 1091798952]

And this is the same message from a second app (using the DK Core Unity Phase 9 package)…

06:57:46.653UnityDepthkitCoreMeshSource.compute: Kernel at index (9) is invalid
06:57:46.653UnityDepthkit.Util:DispatchGroups(ComputeShader, Int32, Int32, Int32, Int32)
06:57:46.653UnityDepthkit.CoreMeshSource:OnGenerate()
06:57:46.653UnityDepthkit.DataSource:Generate()
06:57:46.653UnityDepthkit.Clip:DoGenerate()
06:57:46.653UnityDepthkit.Clip:LateUpdate()
06:57:46.653Unity
06:57:46.653Unity[ line 1164117352]

Have I somehow broken the shaders or something?
Is there a way to clear the shader cache (is that even a thing?)
This was working fin until a few days ago, is it a Quest update that’s broken it?
What’s going on?
I’m running out of ideas on how to fix it…

I should point out - I had this happen on one Quest, used a different Quest and it was fine. But now both of them have the problem and I’ve run out of Quests to test with atm.

Thanks,

Ben

Found this thread https://discussions.unity.com/t/gpu-ray-tracing-kernel-at-index-0-is-invalid/247022/2 which seems to have a similar error but disabling “Caching Preprocessor” and deleting ScriptAssemblies and ShaderCache did not work :frowning:

@Psicon_Lab I have just sent you an email with the pre-release build of our Depthkit Expansion Phase 9.2 packages, which may address the issue if it was introduced with a Quest system update. Please update the packages in your project, and if that doesn’t resolve the issue, let us know so that we can try other fixes.

Hey thanks Cory, that’s super appreciated!

After almost running out of ideas completely, I set-up a totally fresh project in Unity 2021, added DK, Oculus XR package and added the latest Oculus Integration Asset.

The new Oculus Integration package adds an “Oculus” section to the Project Settings where there’s a number of auto-fix options that I set. I noticed some changes to the Player settings in Unity that Auto-fixing seemed to set. Vulkan was set as the Graphics API and the first change I noticed that I don’t remember seeing before was that Normal Map Encoding was set to DXT5nm-style. There were one or two other minor differences in my project but after Updating Oculus Integration, auto-fixing everything and then setting this Normal Map Encoding - I can now see Depthclips again… Honestly I’ve been slaving over this for days and days, so thank God I finally got somewhere.

I’m still working through it to try and get the project working again, but at least I’ve made a bit of progress now…

Setting Normal Map Encoding to DXT5nm-style plays havoc with the Depthclips though - even in the Editor…

@Psicon_Lab Glad to hear you’ve made some progress. Just wanted to call out that the Phase 9 and 9.2 packages are only tested in Unity version 2020.3.x (LTS), and you may run into some unexpected behaviors in 2021. Our next release will include support for more recent Unity versions.

Ok thanks for the heads-up.

Also - as I suspect it was Oculus Integration that’s caused the issue, Oculus Integration latest update says it only supports Unity 2021.3.6 or higher. :melting_face:

I’m finding that I can see the clips now when I use Vulkan but they are not rendered using OpenGLES3. So maybe it’s linked to OpenGLES3…

Found the problem… Quest update stopped Depthkit rendering properly.

The project worked fine with this environment installed on the Quest.

(Didn’t write down all the number for the versions just the start … and the end.)

Software system version
501. 150

Version
50.0.0…341

Runtime version
50.0.0.195…482

OS version
User-501633…150

UPDATED THE QUEST TO THIS AND DEPTHKIT NO LONGER RENDERS.

Updated to this:

Software system version
506…150

Version
57…457

Runtime version
57.0.0…474

OS
SQ3A.22…A1

Good news! The update Cory sent over works :blue_heart:

1 Like