Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Error GLSL link error: The number of vertex shader storage blocks

Discussion in 'Android' started by IndieFist, Apr 23, 2019.

  1. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    518
    GLSL link error: The number of vertex shader storage blocks (1) is greater than the maximum number allowed (0). The number of fragment shader storage blocks (1) is greater than the maximum number allowed (0).

    Hi, i think this error is related about to use post-processing in Android devices.
    Someone crashed for using eye adaptation- others for using bloom effect..
    So, is there anyway to safe use with post-processing efects? also, this devices are crashing before to load the game or any scene with post-processing enabled.
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    The device you're running on doesn't support SSBO. You have to disable the effects that use SSBO.
     
    IndieFist likes this.
  3. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    518
    Thank you for support, i like to use it post-processing effects under mobile devices, how can i check what effects are using SSBO? Eye adaptation? Bloom effect? Grain? Vignette?
    --
    Also, this problem i have it before to load any screen using postprocessing profile.
    Is there any way to check if my device support post-processing and activate it? instead of break my app?
     
  4. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    It actually shouldn't break anything (e.g. it shouldn't crash). If it does, can you please post the logcat output here?
    I guess you can try checking if the post-processing Uber-shader is supported or not, and deactivate post processing if not.
    From the list you supplied, I guess the only one that needs SSBO is Eye adaptation.
     
    sunwangshuSLC and IndieFist like this.
  5. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    518
    Thank you for support
    GLSL link error: The number of vertex shader storage blocks (1) is greater than the maximum number allowed (0). The number of fragment shader storage blocks (1) is greater than the maximum number allowed (0).
    This the only i can see in unity crashed, because in no one of my devices i get this error.
     
  6. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Do you know, on which device models the crash occurs?
     
    IndieFist likes this.
  7. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    518
    Eyeadaptation on HUAWEI/MYA-L22/HWMYA-L6737, but i do not work mor ewith eye adaptation.
    About
    libGLES_mali.so : ARMv7 VFPv3 NEON;Samsung GrandPrimePlus LTE CIS rev04 board based on MT6737T -- ARMv7 VFPv3 NEON;MT6750 -- ARMv7 VFPv3 NEON;MT6737T -- ARMv7 VFPv3 NEON;MT6797M --ARMv7 VFPv3 NEON -- ARMv7 VFPv3 NEON;SAMSUNG Exynos7580
    all of this cpu show
    0 libGLES_mali.so 0x00000000e800a964 <symbols missing for uuid: ef0cf3efa444976aa0d064e275f27699>
     
  8. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Well, you can try and make a bug report. There's not enough information to figure out, what exactly is happening :)
     
  9. marcozakaria

    marcozakaria

    Joined:
    Sep 17, 2017
    Posts:
    23
    I have this same error on build on my android device, the project was on Unity 2019.2 and it was working perfectly but when i upgraded to 2019.3 it began to happen , curntly i am using Unity 2019.3.0f6

    glsl link error the number of vertex shader storage blocks (1) is greater than the maximum number allowed (0)
     
  10. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    This is... weird :)
    This error is reported by the GPU driver. This basically means you haven't used RWTexture in a vertex shader before the upgrade and started using it after upgrade.
     
    navids and marcozakaria like this.
  11. marcozakaria

    marcozakaria

    Joined:
    Sep 17, 2017
    Posts:
    23
    I didnt change any thing in code , i updated unity to version 2019.3.3f1 and still gives this error
    I tried to debug function "SystemInfo.maxComputeBufferInputsVertex" and it returns zero and "maxComputeBufferInputsFragment" return 24
    my device is Honor Play & CPU is "Kirin 970"
     
  12. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Yes, this is going to happen on all Mali GPUs.
    What packages are you using in your project?
    You can try switching to Vulkan - Mali has read support for compute buffers in all shader stages there.
     
    Silvedko and marcozakaria like this.
  13. marcozakaria

    marcozakaria

    Joined:
    Sep 17, 2017
    Posts:
    23
    I tried To switch to vulkan and still gives the same error on android.
    the packages that i used are standard that nothing special.

    24694 25155 E Unity : -------- GLSL link error: The number of vertex shader storage blocks (1) is greater than the maximum number allowed (0).
     

    Attached Files:

  14. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    This means it's not running Vulkan :)
    What Android device are you trying this on?
    And what standard packages are there, just to be sure? :)
     
  15. marcozakaria

    marcozakaria

    Joined:
    Sep 17, 2017
    Posts:
    23
    I tried to buid with vulkan only it didnt generate the error and debugs "maxComputeBufferInputsVertex : 35 ,maxComputeBufferInputsFragment : 35" , but the effect still not working , it was working perefectly on 2019.2
    this is screenshot of my packages. thanks
     

    Attached Files:

  16. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    What effect?
     
  17. marcozakaria

    marcozakaria

    Joined:
    Sep 17, 2017
    Posts:
    23
    a
    Bloom effect
     
  18. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Is it a custom effect or a built-in effect in PP stack?
    Does it use compute?
     
  19. marcozakaria

    marcozakaria

    Joined:
    Sep 17, 2017
    Posts:
    23
  20. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    It doesn't look like it's using a compute shader.
     
    marcozakaria likes this.
  21. marcozakaria

    marcozakaria

    Joined:
    Sep 17, 2017
    Posts:
    23
    Sorry for that i got confused with other asset.
    i used this asset fastmobilebloom and it was working with 2019.2 i dont know what happened with 2019.3
     
  22. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    OK. This means there is a shader somewhere in your project that tries to read from a compute buffer from vertex shader.

    As for the effect not working, I'd suggest contacting the effect author :)
     
  23. FrostweepGames

    FrostweepGames

    Joined:
    Jan 2, 2015
    Posts:
    264
    Hi guys.
    have similar things on my Galasxy s10e device

    AndroidPlayer(samsung_SM-G970F@192.168.1.88) -------- GLSL link error: The number of vertex shader storage blocks (1) is greater than the maximum number allowed (0)


    We dont have any custom shaders or packages imported to project.
    It work fine if we install LWRP render pipeline but it doesnt work for bundles we load at runtime.
    I have no idea whats wrong in Unity 2019.2.21f1..

    any help will be very helpful

    Thanks
     
  24. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    @FrostweepGames I can only give you the same answer - this means those bundles contain shaders that try to read from Compute buffers from a shader stage that is not compute or fragment.
     
  25. FrostweepGames

    FrostweepGames

    Joined:
    Jan 2, 2015
    Posts:
    264
    Hello.

    interesting thing that I fixed it yesterday.. I dont know how exactly it was but I just added default skybox to Lighting settings, changed camera parameters in scene and it works again.. Its very interesting what could be there.. because I've also tried different versions of Unity even 2020.1b to check where it could work but it didnt work there...

    So, perhpas it will help someone what I wrote above about how I fixed it in my project.

    Thanks guys!

    Best
     
    mgear likes this.
  26. cgascons

    cgascons

    Joined:
    Feb 22, 2016
    Posts:
    25
    Hi guys, we are experiencing the exact same issue (we are using Universal Render Pipeline here), we are trying to isolate the error by removing one by one the shaders we use on our game but no luck so far. Is there anyway @aleksandrk we can check which shader is the one causing this?

    In addition, does @FrostweepGames's solution make sense? We have checked every camera and we are not using any Skyboxes (just solid color environment), also the Skybox settings is showing the Default-Skybox material, not sure how this affects this issue.

    Thanks beforehand
     
  27. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    @cgascons depends on the Unity version :)
    There's a checkbox ("Log shader compilation" in Graphics settings) that will tell, which variant is being compiled at runtime (requires development build).
     
    forestrf likes this.
  28. cgascons

    cgascons

    Joined:
    Feb 22, 2016
    Posts:
    25
    Thanks for the support so far @aleksandrk , after building on my device with the option you mention checked I extracted this from the log:
    Code (Boo):
    1. 06-11 16:03:59.231 12682 12743 E Unity   : -------- GLSL link error:  The number of vertex shader storage blocks (1) is greater than the maximum number allowed (0).
    2. 06-11 16:03:59.231 12682 12743 E Unity   :
    3. 06-11 16:03:59.231 12682 12743 E Unity   :
    4. 06-11 16:03:59.231 12682 12743 E Unity   :
    5. 06-11 16:03:59.231 12682 12743 E Unity   : (Filename: ./Runtime/GfxDevice/opengles/ApiGLES.cpp Line: 645)
    6. 06-11 16:03:59.231 12682 12743 E Unity   :
    7. 06-11 16:03:59.231 12682 12743 D Unity   : Note: Creation of internal variant of shader 'Particles/Standard Unlit' failed.
    8. 06-11 16:03:59.231 12682 12743 D Unity   : Compiled shader: Particles/Standard Unlit, pass: ShadowCaster, stage: all, keywords PROCEDURAL_INSTANCING_ON SHADOWS_CUBE _ALPHABLEND_ON
    9. 06-11 16:03:59.231 12682 12743 D Unity   : Compiled shader: Particles/Standard Unlit, pass: ShadowCaster, stage: all, keywords PROCEDURAL_INSTANCING_ON SHADOWS_CUBE _ALPHABLEND_ON
    The thing is, I don't get that this is actually failing, as far as I understand the
    Particles/Standard Unlit
    comes within Unity, right?
     
  29. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Ah, that's true :)
    Looks like this is used when you use procedural instancing with particles.
    This is worth a bug report imo :)
     
    richardkettlewell likes this.
  30. cgascons

    cgascons

    Joined:
    Feb 22, 2016
    Posts:
    25
    I see, thanks for your time, just posted the bug report. Will reply here in case I have relevant info about this.
     
  31. cgascons

    cgascons

    Joined:
    Feb 22, 2016
    Posts:
    25
    By the way, I've been searching for a while and can't seem to find a way to search all the prefabs in a scene that are making use of a specific Shader, not in the hierarchy nor the project explorer. Do you by any chance know a way of doing that? I need to find every reference to the
    Particles/Standard Unlit
    shader

    Edit: Nevermind, I found this link with a quite useful script for this, the bad news is: it doesn't seem to find anything using that particular shader, weird.
     
    Last edited: Jun 12, 2020
  32. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Please post the bug number here as well :)
     
    richardkettlewell likes this.
  33. cgascons

    cgascons

    Joined:
    Feb 22, 2016
    Posts:
    25
    Hi, I actually reported if via the Unity-Help-Report a bug feature which sent me an e-mail back as soon as I posted it precisely stating not to share the bug url with noone. Perhaps I should've posted it elsewhere? If so, please let me know where and I will do it.
     
  34. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,281
    Just share the case number with us, not the full url :)
     
  35. cgascons

    cgascons

    Joined:
    Feb 22, 2016
    Posts:
    25
    Sure, here it is: 1255008. Hope this helps!
     
    aleksandrk and richardkettlewell like this.
  36. zyz2014

    zyz2014

    Joined:
    Nov 24, 2014
    Posts:
    1
    @aleksandrk we are experiencing the exact same issue unity 2018 3.14f1 I can't find a checkbox ("Log shader compilation" in Graphics settings)
     
  37. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,281
    FYI's we are testing a fix for this :)
     
  38. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    @zyz2014 that's because it's not in 2018.x :)
     
  39. c1pr1an

    c1pr1an

    Joined:
    Jul 4, 2014
    Posts:
    6
    Hey guys! I have the same error, but with a different shader that's failing.

    upload_2020-6-16_18-58-8.png

    I'm using Unity 2019.2.18
     
  40. Czajnikus

    Czajnikus

    Joined:
    Aug 15, 2019
    Posts:
    1
    Hi all, I got same Error but do NOT use any post processing, instead error ocurres ONLY on Debug Build, same code without debug runs fine. I;m on 2019.4.1f1 LTS.
     
  41. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,281
    Thanks for the bug report - I'm sorry QA have sent you additional questions, and tried to close the case without a fix. I'm trying my best from this side to get them to process the bug properly - I'm not really sure why they are struggling to reproduce it. The repro steps are trivial. :rolleyes:

    But, that aside, we think we know what the fix needs to be, and as such, have landed it in 2020.2.a16. If it isn't much of an inconvenience, if you were able to let us know if it is indeed fixed in that version, that should give me enough evidence to get it backported to our various non-alpha/beta releases.

    It's the same issue - it affects both the surface and unlit particle shaders.

    Later in the thread folks realized it's caused by Unity's standard particle shaders - it's nothing to do with post-processing.
     
    dominators_crew likes this.
  42. wangtianyu

    wangtianyu

    Joined:
    Jul 29, 2020
    Posts:
    15
    I still have this problem in 2019.4.7, and I verify the patch(1255008) be applied.
    This is the error log.
    upload_2020-8-18_15-18-6.png
    The project use SRP so standard particle not be use.
     
  43. wangtianyu

    wangtianyu

    Joined:
    Jul 29, 2020
    Posts:
    15
    And we found the error shader,it's the standard particle unlit right...now i sure the bug not fix by this patch.
     
  44. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,281
    @cgascons did our fix resolve your issue?
     
  45. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
  46. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,281
    Please submit a new bug report if possible.
     
  47. prawinb

    prawinb

    Joined:
    Aug 4, 2020
    Posts:
    10
    Hi,
    I am getting the same following error,

    GLSL link error: The number of vertex shader storage blocks (1) is greater than the maximum number allowed (0).

    I am using 2019.4.8f1 and I am not getting due to which asset I am getting this problem.
     
  48. prawinb

    prawinb

    Joined:
    Aug 4, 2020
    Posts:
    10
    @aleksandrk Thanks for helping. We are able to find which variant is causing the error. The error report is given below.

    10-06 15:51:05.754 20522 20537 E Unity : -------- GLSL link failed, no info log provided.
    10-06 15:51:05.754 20522 20537 E Unity : UFE : reloadBattle(Single)
    10-06 15:51:05.754 20522 20537 E Unity : UFE : reloadBattle()
    10-06 15:51:05.754 20522 20537 E Unity : FluxCapacitor:ExecuteLocalDelayedActions()
    10-06 15:51:05.754 20522 20537 E Unity : FluxCapacitor:ApplyInputs(Int64)
    10-06 15:51:05.754 20522 20537 E Unity : FluxCapacitor : DoFixedUpdate()
    10-06 15:51:05.754 20522 20537 E Unity : UFE:FixedUpdate()
    10-06 15:51:05.754 20522 20537 E Unity :
    10-06 15:51:05.754 20522 20537 E Unity : [./Runtime/GfxDevice/opengles/ApiGLES.cpp line 648]
    10-06 15:51:05.754 20522 20537 E Unity : (Filename: ./Runtime/GfxDevice/opengles/ApiGLES.cpp Line: 648)
    10-06 15:51:05.754 20522 20537 E Unity :
    10-06 15:51:05.754 20522 20537 D Unity : Note: Creation of internal variant of shader 'Hidden/TerrainEngine/Splatmap/Standard-AddPass' failed.
    10-06 15:51:05.755 20522 20537 D Unity : Compiled shader: Hidden/TerrainEngine/Splatmap/Standard-AddPass, pass: FORWARD, stage: all, keywords DIRECTIONAL INSTANCING_ON SHADOWS_SCREEN _NORMALMAP

    But we are not able to find "Hidden/TerrainEngine/Splatmap/Standard-AddPass" in our project. Could you please help us.
     
  49. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Do you use terrain?
     
  50. prawinb

    prawinb

    Joined:
    Aug 4, 2020
    Posts:
    10
    @aleksandrk Thank you for the reply. And yes we are using terrain in our project.