Search Issue Tracker

Fixed

Fixed in 2021.3.29f1, 2022.2.18f1, 2023.1.0b15, 2023.2.0a10

Votes

1

Found in

2021.3.13f1

2022.1.22f1

2022.2.0b14

2023.1.0a18

2023.2.0a1

Issue ID

UUM-19666

Regression

Yes

[TextureCompression] Multiple errors appear in the Console window when reimporting a .scenetemplate asset that contains a texture with width/height not divisible by 4

--

-

Steps to reproduce:
1. Open the user's attached project
2. Reimport the “Assets/Minimal/Minimal Template.scenetemplate“ asset
3. Observe the Console window

Expected result: The asset is reimported without any errors
Actual result: Multiple errors appear in the Console window

Reproducible with: 2021.2.0a18, 2021.2.19f1, 2021.3.13f1, 2022.1.22f1, 2022.2.0b14, 2023.1.0a18
Not reproducible with: 2020.3.41f1, 2021.2.0a17

Reproducible on: Windows 10

Notes:
1. Only the first 3 errors appear when the Graphics API for Windows is set to Direct3D12
2. Look at the attached video (“Repro.mp4“) for clarity

Errors:
Assertion failed on expression: 'GPUWidth == m_DataWidth'
Assertion failed on expression: 'GPUHeight == m_DataHeight'
Assertion failed on expression: 'isTexDataAllowed'
d3d11: failed to create 2D texture id=1623 width=322 height=281 mips=1 dxgifmt=71 [D3D error was 80070057]
d3d11: failed to create 2D texture shader resource view id=1623 [D3D error was 80070057]
d3d11: Failed to create 2D texture in GfxDeviceD3D11

  1. Resolution Note (fix version 2023.2.0a10):

    This stems from the fact that support for DXT/BC textures with dimensions that are not divisible by 4 was dropped in 2021.2 (see https://unity.com/releases/editor/whats-new/2021.2.0 "Graphics: Restricted DXT/BCn texture compression to textures with multiple-of-four width and height. This ensures the same behavior as the Texture Importer and requires multiple-of-four dimensions when compressing.")

    However, it is indeed possible to still have serialized Texture data where these non-divisible-by-4 dimensions are used (for instance, after upgrading to a newer Unity version). The issue has been fixed by decompressing the erroneous Texture. Note that this behaves similarly to before the restriction; even then, the Texture was uploaded to GPU in uncompressed form. The only difference is that, now, the Texture is also kept in memory in uncompressed form (whereas before, it was only decompressed before uploading). A warning will indicate that this happened; ideally the erroneous Textures get fixed (by rescaling/padding if applicable, or storing them in a supported format)

  2. Resolution Note (fix version 2021.3.29f1):

    This stems from the fact that support for DXT/BC textures with dimensions that are not divisible by 4 was dropped in 2021.2 (see https://unity.com/releases/editor/whats-new/2021.2.0 "Graphics: Restricted DXT/BCn texture compression to textures with multiple-of-four width and height. This ensures the same behavior as the Texture Importer and requires multiple-of-four dimensions when compressing.")

    However, it is indeed possible to still have serialized Texture data where these non-divisible-by-4 dimensions are used (for instance, after upgrading to a newer Unity version). The issue has been fixed by decompressing the erroneous Texture. Note that this behaves similarly to before the restriction; even then, the Texture was uploaded to GPU in uncompressed form. The only difference is that, now, the Texture is also kept in memory in uncompressed form (whereas before, it was only decompressed before uploading). A warning will indicate that this happened; ideally the erroneous Textures get fixed (by rescaling/padding if applicable, or storing them in a supported format)

Comments (1)

  1. Concresence

    Nov 27, 2022 00:06

    2021.3.12f also

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.