Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Creating Texture2DArray on headless server

Discussion in 'General Graphics' started by Alloc, Aug 21, 2018.

  1. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    230
    Hi,

    we just noticed that creating an Texture2DArray on our headless buildserver fails because the Texture2DArray constructor already requires having that GPU capability.
    So is there no way to even have a buildserver create a Texture2DArray asset at build time (as that's already not possible during runtime because of no serialisation function for those arrays)? Or is there some kind of magic trick to get building T2DArrays work on such setups?

    Regards,
    Chris
     
  2. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    230
    Actually it seems even worse than that ... Looks like the issue isn't even about if/what kind of GPU is there but it's rather just plain Unity's NULL Gfx Device when running with -nographics, which seems to be required for any automated building.
    So, can we get Texture2DArray suport in that fake device or alternatively get Texture2DArray support for building without it relying on a (virtual) GPU but CPU code only?
     
  3. Hagn

    Hagn

    Joined:
    Apr 1, 2013
    Posts:
    8
    You might have luck with the DirectX 11 software renderer.
    The command line has the "-force-driver-type-warp" option which might also work for the editor: https://docs.unity3d.com/Manual/CommandLineArguments.html
    You may also have to omit the "-nographics" option to get it running.
     
  4. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    230
    Yeah, not using -nographics is the key here. Still I don't see a reason why T2DArray should not work when T2D does. Good thing this VM for the buildserver has a (virtual) GPU ...