Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Bug Strange Exception when loading a Subscene

Discussion in 'Graphics for ECS' started by StefanWo, Sep 7, 2023.

  1. StefanWo

    StefanWo

    Joined:
    May 24, 2015
    Posts:
    132
    One of my Players got an Exception when loading a SubScene. I have no idea what i can do against it. I can't reproduce it on my machine. Any ideas?

    Code (CSharp):
    1. RenderTexture.Create failed: format unsupported for random writes - R32 SFloat (49).
    2.             at UnityEngine.RenderTexture.Create (UnityEngine.RenderTexture ) [0x00000] in <3b8612fb27654522b26040b8324dc42e>:0
    3.             at UnityEngine.Rendering.RTHandleSystem.Alloc (System.Int32 width, System.Int32 height, UnityEngine.TextureWrapMode wrapModeU, UnityEngine.TextureWrapMode wrapModeV, UnityEngine.TextureWrapMode wrapModeW, System.Int32 slices, UnityEngine.Rendering.DepthBits depthBufferBits, UnityEngine.Experimental.Rendering.GraphicsFormat colorFormat, UnityEngine.FilterMode filterMode, UnityEngine.Rendering.TextureDimension dimension, System.Boolean enableRandomWrite, System.Boolean useMipMap, System.Boolean autoGenerateMips, System.Boolean isShadowMap, System.Int32 anisoLevel, System.Single mipMapBias, UnityEngine.Rendering.MSAASamples msaaSamples, System.Boolean bindTextureMS, System.Boolean useDynamicScale, UnityEngine.RenderTextureMemoryless memoryless, UnityEngine.VRTextureUsage vrUsage, System.String name) [0x00000] in <1f89843707684a1d9ada2c53141d2444>:0
    4.             at UnityEngine.Rendering.RTHandleSystem.Alloc (System.Int32 width, System.Int32 height, System.Int32 slices, UnityEngine.Rendering.DepthBits depthBufferBits, UnityEngine.Experimental.Rendering.GraphicsFormat colorFormat, UnityEngine.FilterMode filterMode, UnityEngine.TextureWrapMode wrapMode, UnityEngine.Rendering.TextureDimension dimension, System.Boolean enableRandomWrite, System.Boolean useMipMap, System.Boolean autoGenerateMips, System.Boolean isShadowMap, System.Int32 anisoLevel, System.Single mipMapBias, UnityEngine.Rendering.MSAASamples msaaSamples, System.Boolean bindTextureMS, System.Boolean useDynamicScale, UnityEngine.RenderTextureMemoryless memoryless, UnityEngine.VRTextureUsage vrUsage, System.String name) [0x00000] in <1f89843707684a1d9ada2c53141d2444>:0
    5.             at UnityEngine.Rendering.RTHandles.Alloc (System.Int32 width, System.Int32 height, System.Int32 slices, UnityEngine.Rendering.DepthBits depthBufferBits, UnityEngine.Experimental.Rendering.GraphicsFormat colorFormat, UnityEngine.FilterMode filterMode, UnityEngine.TextureWrapMode wrapMode, UnityEngine.Rendering.TextureDimension dimension, System.Boolean enableRandomWrite, System.Boolean useMipMap, System.Boolean autoGenerateMips, System.Boolean isShadowMap, System.Int32 anisoLevel, System.Single mipMapBias, UnityEngine.Rendering.MSAASamples msaaSamples, System.Boolean bindTextureMS, System.Boolean useDynamicScale, UnityEngine.RenderTextureMemoryless memoryless, UnityEngine.VRTextureUsage vrUsage, System.String name) [0x00000] in <1f89843707684a1d9ada2c53141d2444>:0
    6.             at UnityEngine.Rendering.LensFlareCommonSRP.Initialize () [0x00000] in <1f89843707684a1d9ada2c53141d2444>:0
    7.             at UnityEngine.Rendering.Universal.UniversalRenderer..ctor (UnityEngine.Rendering.Universal.UniversalRendererData data) [0x00000] in <27c07bc0d8684b8fb121f3842c882eac>:0
    8.             at UnityEngine.Rendering.Universal.UniversalRendererData.Create () [0x00000] in <27c07bc0d8684b8fb121f3842c882eac>:0
    9.             at UnityEngine.Rendering.Universal.ScriptableRendererData.InternalCreateRenderer () [0x00000] in <27c07bc0d8684b8fb121f3842c882eac>:0
    10. .
    Here more Details to the players Hardware:
    platform: WindowsPlayer
    gpu.name: Intel(R) HD Graphics
    gpu.type: Direct3D11
    gpu.vram: 128MB
    gpu.maxTextureSize: 8192px
    gpu.shaderLevel: 45
    gpu.graphicsApi: Direct3D 11.0 [level 10.1]

    (Maybe related exception, that was raised afterwards:


    Code (CSharp):
    1. Platform does not support compute shaders
    2.             at UnityEngine.Object.Internal_CloneSingle (UnityEngine.Object ) [0x00000] in <3b8612fb27654522b26040b8324dc42e>:0
    3.             at UnityEngine.Object.Instantiate[T] (T original) [0x00000] in <3b8612fb27654522b26040b8324dc42e>:0
    4.             at Unity.Scenes.SerializeUtilityHybrid.DeserializeObjectReferences (Unity.Scenes.ReferencedUnityObjects objRefs, UnityEngine.Object[]& objectReferences) [0x00000] in <4a91adf767574546bb9e94bfce77f2c4>:0
    5.             at Unity.Scenes.AsyncLoadSceneOperation.ScheduleSceneRead () [0x00000] in <4a91adf767574546bb9e94bfce77f2c4>:0
    6.             at Unity.Scenes.AsyncLoadSceneOperation.UpdateBlocking () [0x00000] in <4a91adf767574546bb9e94bfce77f2c4>:0
    7.             at Unity.Scenes.AsyncLoadSceneOperation.Update () [0x00000] in <4a91adf767574546bb9e94bfce77f2c4>:0
    8.             at Unity.Scenes.SceneSectionStreamingSystem.UpdateLoadOperation (Unity.Entities.SystemState& systemState, Unity.Scenes.AsyncLoadSceneOperation operation, Unity.Entities.World streamingWorld, Unity.Entities.Entity sectionEntity, System.Boolean moveEntities) [0x00000] in <4a91adf767574546bb9e94bfce77f2c4>:0
    9.             at Unity.Scenes.SceneSectionStreamingSystem.LoadSectionSynchronously (Unity.Entities.Entity entity, Unity.Entities.SystemState& systemState) [0x00000] in <4a91adf767574546bb9e94bfce77f2c4>:0
     
  2. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    352
    Neither of these errors look like they are subscene related. Instead, I would guess what is happening that both of these errors happen because for some reason Unity thinks that compute is not supported ("random write" in the first message is also compute related).

    This is a bit surprising, since D3D11 should always support compute shaders, as far as I know.
     
  3. StefanWo

    StefanWo

    Joined:
    May 24, 2015
    Posts:
    132
    Thanks for the fast answer!
    He has an 12 Year old integrated GPU with Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz.
    Maybe compute shaders are just not supported on that old hardware.

    I'll add a check at the very first startup to check for that requirement. As far as i read, all modern computers should support that, so i guess its fine :)