Search Issue Tracker

By Design

Votes

8

Found in

2017.4.0f1

2018.4.0f1

2019.1.0a1

2019.1.11f1

2019.2.0a1

2019.3.0a1

Issue ID

1172610

Regression

No

CopyTexture() throws an error when copying compressed Texture

Texture

-

How to reproduce:
1. Open the "SampleScene" in the attached project "case_1172610-Graphics_Bug"
2. Make sure that "copyTextureFailure" Texture in the project Assets folder is compressed
3. Press "Play"

Expected results: CopyTexture() will replace goblin's torso texture with compressed texture
Actual results: An error is thrown

Reproducible with: 2017.4.31f1, 2018.4.5f1, 2019.1.13f1, 2019.2.0f1, 2019.3.0a11

Additional notes:
1. It was tested using different graphics APIs. Here are the errors received:
Windows:
DX11/DX12: "Graphics.CopyTexture can only copy between same texture format groups (d3d11/d3d12 base formats: src=76 dst=27)"
OpenGLCore: "Graphics.CopyTexture can only copy between same texture format groups (OpenGL internal formats: src=33779, blockSize=16 ; dst=32856,
blockSize=4)"

Mac:
Metal: Crash
OpenGLCore: Does not reproduce, works as expected without any errors
2. Compression quality does not affect the outcome

  1. Response avatar

    Resolution Note:

    GPUs can only copy texture within the same format groups. As a result, we throw an error if the user tries to use CopyTexture between textures which can't be copied to each other.

Comments (3)

  1. B36530eff44c377898b7fd8309cb6b05?d=mm

    GXMark

    Jan 10, 2020 01:59

    Yes I can confirm the same issue. Created two textures with exactly same format through Texture2D.CreateExternalTexture and I get DX11/DX12: "Graphics.CopyTexture can only copy between same texture format groups (d3d11/d3d12 base formats: src=76 dst=27)"

    Unity please look into this because the base formats its complaining are incompatible is incorrect.

    Version 2019.3.0f3

  2. C1add2ff230213b25de9d56e8f77b97b?d=mm

    Aggressor

    Sep 07, 2019 15:13

    Ignore my previous comment, it was an asset bundle caching bug.

  3. C1add2ff230213b25de9d56e8f77b97b?d=mm

    Aggressor

    Sep 07, 2019 15:09

    I've done some research and this happens even if the target and source texture share the same format group (even literally the exact same format).

    However, I noticed a different bug with certain textures. Setting the import property to readable did not matter. It would always appear as FALSE even if the read/write import property was set to true.

    Im wondering if this error message is "wrong" because there might be an underlying issue with the read/write property on certain textures? (This is pure speculation as I cannot step through the code but I can verify that the read/write property is false on textures I explicitly set to true).

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.