Search Unity

Chrome GL_INVALID_OPERATION: Internal D3D9 error: HRESULT: 0x8876086C: Failed to create image surfac

Discussion in 'Web' started by AlexHell, Oct 4, 2019.

  1. AlexHell

    AlexHell

    Joined:
    Oct 2, 2014
    Posts:
    167
    Since july 2019, we have trouble on some old intel CPU + integrated GPU (for example HD 2000 in Core-i3).

    The trouble is warning in JS console
    GL_INVALID_OPERATION: Internal D3D9 error: HRESULT: 0x8876086C: Failed to create image surface
    screenshot https://prnt.sc/pew5b6

    As a result our RenderTextures is not shown (transparent totally).

    The unity's built-in Texture2D on the Sprites on Canvas is rendered OK.
    The trouble in our's RT's attached to Material to output to RawImage.

    This bug is reproduced on my intel CPU G620 on Chrome only... since update of Chrome in july 2019.
    This bug does not exist on the Firefox on the same PC with CPU 620.
    This bug is dissapear when I (and our users) disable GPU acceleration on browser settings (with performance penalty, the game is not playable).

    ---------------
    Some other debug screenshots from our users

    chrome://gpu/ page screenshot https://prnt.sc/p2d7tm - some driver bug workarounds.

    \ webgl 1.0 is supported
    https://prnt.sc/p1d4rx
    https://prnt.sc/p1d4y0

    \ webgl 2.0 is Not supported
    https://prnt.sc/p1d6y6

    \ chrome version
    https://prnt.sc/p1bjkj

    \ some Problems Detected
    https://prnt.sc/p1cw8t - Old Intel drivers cannot reliably support D3D11: 363721
    https://prnt.sc/p1d61l - other ref to Old driver

    ---------------
    GPU drivers versions
    - 1st user
    http://prntscr.com/p2d4jh
    2011 year version, version number 8.882...

    - 2nd user
    http://prntscr.com/p2d51c
    version number 9.17.10.4229

    Our users have tried update GPU drivers (for example https://www.intel.com/content/www/us/en/support/detect.html ) with no changes in the bug.

    NOTE: on the page
    https://downloadcenter.intel.com/ru/download/24970/-HD-Intel-Windows-7-8-8-1-32-?product=53426
    >> 15.28.24.4229 (9.17.10.4229) для Windows * 7/8/8.1.

    i.e. users cant install the last drivers due to old GPU, as I understand.. or the driver installed is the last one.

    ---------------
    Cant see blacklisted GPUs in this lists
    https://www.khronos.org/webgl/wiki/BlacklistsAndWhitelists
    https://chromium.googlesource.com/chromium/src/gpu/+/master/config/software_rendering_list.json

    ---------------
    May be related Links

    exactly warning message (HRESULT: 0x8876086C)
    https://community.esri.com/thread/2...ng-just-blank-scene-and-passing-to-scene-view

    some facebook video trouble
    https://forums.opera.com/topic/28787/facebook-videos-issue/35

    ---------------
    ANGLE source with warning message
    https://github.com/google/angle/blob/master/src/libANGLE/renderer/d3d/d3d9/Image9.cpp#L278

    ---------------
    Webgl build with asm.js or webassembly with no difference.

    Build in Unity version Unity 2018.4.6f1 (stable for compare) and Unity 5.6.5 (we have developed on this) - with no difference.
     
    Last edited: Oct 4, 2019
  2. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    953
  3. AlexHell

    AlexHell

    Joined:
    Oct 2, 2014
    Posts:
    167
    I have found the workaround:
    Clear target texture data (all 4 channels) before copy to it

    RenderTexture.active = _reusableRtForUi;
    GL.Clear(true, true, new Color(0, 0, 0, 0));
    RenderTexture.active = null;

    Graphics.Blit(_reusableRtForRenderAsset, _reusableRtForUi);

    it potentially hurts performance due to additional Clear, pixels will be ignored when next Blit will copy from src to dest

    General question: Is it mandatory to Clear RT before Blit to It (as dest) with copy shader? If yes - it's strange, because RT content will be replaced after copy (via Blit). If no - then it's chromium bug
    .. or misunderstanding between unity and browser protocol

    ------
    also I have Editor warning (in unity 2018.4.6)
    Tiled GPU perf. warning: RenderTexture color surface (256x256) was not cleared/discarded. See TiledGPUPerformanceWarning.ColorSurface label in Profiler for info
    UnityEngine.Graphics:Blit(Texture, RenderTexture)

    when GL ES Emulation is enabled for android in editor test
    only when I have clear RT before Blit to it (as dest)
    and it's not changes - error still exist - when I clear After Blit i.e. say the Tiled Gpu to discard and not restore
    and not have this warn (Tiled GPU perf.) when not clear RT before Blit

    this bug report for example states what it's a bug
    https://issuetracker.unity3d.com/is...-doing-graphics-dot-blit-on-emulated-graphics

    it.s reproduces very simple