Closed sgh-msg closed 1 year ago
Hi @sgh-msg
Is it just one particular video you are seeing this with? What are the video specs?
Is it possible to to send over the video you are seeing this with? You can email it to unitysupport@renderheads.com. Thanks!
Side note. We are also following up on this issue via email with Michael.
Hi @sgh-msg,
This seems to be similar to an issue we encountered in another of our products linked to D3D12 and Unity 2022, which appears to have become stricter on certain texture setup.
Whilst we look into fixing this properly (which may involve speaking to Unity as there are some inconsistencies), we have had success with a simple workaround, which you could try as a temporary fix:
In 'WindowsMediaPlayer.cs', ~line 954 ('Texture2D.CreateExternalTexture'), try changing 'TextureFormat.BGRA32' to 'TextureFormat.ETC_RGB4' and see if that helps?
Cheers,
Hi @RichRH ,
This workaround seems to stop the crashing, however the texture only shows up in Editor and not builds. Is there a non-GLES format that would work with D3D12?
Thanks!
Hi @RichRH ,
This workaround seems to stop the crashing, however the texture only shows up in Editor and not builds. Is there a non-GLES format that would work with D3D12?
Thanks!
For example, RGB24 seems to work
Hi @sgh-msg,
Thanks for the updates - our other product is mainly editor-centric and the working theory was using an invalid format would bypass Unity's now seemingly explicit D3D12 SRV creation at this point and use defaults later. Good to know the RGB24 format works for you in builds too, will investigate.
A more robust fix should be in the next release, correctly matching the format to the native texture (where possible as there's at least one format that doesn't have a corresponding Unity version, as is).
Cheers,
The latest version has been released, please let us know if this issue has not been fixed for you.
Is this related to bug in AVPro Decklink? Unity 2022.2; DX11; Running into this with AVPro Decklink 1.9.5. Runs in Edtior, fails in builds with:
[AVProDeckLink] Changing device 'DeckLink 8K Pro (1)' input 1920x1080 (HD1080i 59.94 10-bit 4:2:2 YUV)Texture creation failed. 'ETC_RGB4' is not supported on this platform. Use 'SystemInfo.SupportsTextureFormat' C# API to check format support.
NullReferenceException
at (wrapper managed-to-native) UnityEngine.Texture.set_wrapMode(UnityEngine.Texture,UnityEngine.TextureWrapMode)
at RenderHeads.Media.AVProDeckLink.FormatConverter.CreateRawTexture () [0x0010c] in <e69ed9c0cab84e9891a0e0f3b09d885e>:0
at RenderHeads.Media.AVProDeckLink.FormatConverter.Build () [0x00008] in <e69ed9c0cab84e9891a0e0f3b09d885e>:0
at RenderHeads.Media.AVProDeckLink.FormatConverter.Build (System.Int32 deviceHandle, RenderHeads.Media.AVProDeckLink.DeviceMode mode, System.Boolean delayResourceCreationUntilFramesStart, System.Boolean useHdr) [0x00044] in <e69ed9c0cab84e9891a0e0f3b09d885e>:0
at RenderHeads.Media.AVProDeckLink.Device.ChangeInput (System.Int32 modeIndex, System.Boolean allowRetry) [0x000ae] in <e69ed9c0cab84e9891a0e0f3b09d885e>:0
at RenderHeads.Media.AVProDeckLink.Device.Update () [0x00097] in <e69ed9c0cab84e9891a0e0f3b09d885e>:0
at RenderHeads.Media.AVProDeckLink.DeckLink.Update () [0x0002e] in <e69ed9c0cab84e9891a0e0f3b09d885e>:0
Is this related to bug in AVPro Decklink? Unity 2022.2; DX11; Running into this with AVPro Decklink 1.9.5. Runs in Edtior, fails in builds with:
[AVProDeckLink] Changing device 'DeckLink 8K Pro (1)' input 1920x1080 (HD1080i 59.94 10-bit 4:2:2 YUV)Texture creation failed. 'ETC_RGB4' is not supported on this platform. Use 'SystemInfo.SupportsTextureFormat' C# API to check format support. NullReferenceException at (wrapper managed-to-native) UnityEngine.Texture.set_wrapMode(UnityEngine.Texture,UnityEngine.TextureWrapMode) at RenderHeads.Media.AVProDeckLink.FormatConverter.CreateRawTexture () [0x0010c] in <e69ed9c0cab84e9891a0e0f3b09d885e>:0 at RenderHeads.Media.AVProDeckLink.FormatConverter.Build () [0x00008] in <e69ed9c0cab84e9891a0e0f3b09d885e>:0 at RenderHeads.Media.AVProDeckLink.FormatConverter.Build (System.Int32 deviceHandle, RenderHeads.Media.AVProDeckLink.DeviceMode mode, System.Boolean delayResourceCreationUntilFramesStart, System.Boolean useHdr) [0x00044] in <e69ed9c0cab84e9891a0e0f3b09d885e>:0 at RenderHeads.Media.AVProDeckLink.Device.ChangeInput (System.Int32 modeIndex, System.Boolean allowRetry) [0x000ae] in <e69ed9c0cab84e9891a0e0f3b09d885e>:0 at RenderHeads.Media.AVProDeckLink.Device.Update () [0x00097] in <e69ed9c0cab84e9891a0e0f3b09d885e>:0 at RenderHeads.Media.AVProDeckLink.DeckLink.Update () [0x0002e] in <e69ed9c0cab84e9891a0e0f3b09d885e>:0
Yes, very much the same issue I believe - I'm replicating the above fix in AVPro DeckLink to hopefully resolve.
Cheers,
Environment
Unity: 2022.1.3f1 AVPro: v2.5.2, v2.5.7, v2.6.1 Graphics API: D3D12 OS: Windows 10/11 (22000.856) Graphics: Nvidia RTX8000
When loading a HAP or NotchLC file with the Custom MOV Parser, our application is "hard" crashing with the following output to the player log. Let us know if a crash dump file would be helpful