Search Issue Tracker

Fixed

Votes

1

Found in

Issue ID

798292

Regression

Yes

Metal crashes in multithreaded mode when changing resolution.

Mobile Rendering

-

Metal throws assert if you change resolution from script using Screen.SetResolution(400, 300, false, 0);. This happens both on iOS and tvOS. It doesn't crash if you pass "-force-gfx-direct" arg.

/BuildRoot/Library/Caches/com.apple.xbs/Sources/Metal/Metal-56.7/Framework/MTLRenderPipeline.mm:1061: failed assertion `No valid pixelFormats set.'

#4 0x000000018409734c in MTLReportFailure ()
#5 0x0000000184096940 in -[MTLRenderPipelineDescriptorInternal validateWithDevice:] ()
#6 0x0000000107508be0 in ___lldb_unnamed_function458$$AGXMetalG4P ()
#7 0x00000001017c282c in metal::InitializeBlitFramebuffer(metal::BlitFramebufferDrawQuad&, RenderSurfaceMetal*) at /Users/Smilediver/Projects/Unity/unity/Runtime/GfxDevice/metal/BlitFramebufferMetal.mm:97
#8 0x00000001015c49d4 in UnityBlitToBackbuffer at /Users/Smilediver/Projects/Unity/unity/PlatformDependent/iPhonePlayer/LibEntryPoint.mm:540
#9 0x000000010004f58c in PreparePresentMTL at /Users/Smilediver/Projects/UnityProjects/MetalNoValidPixelFormatCrash/Build/Classes/Unity/MetalHelper.mm:181
#10 0x000000010004e07c in PreparePresent(UnityDisplaySurfaceBase*) at /Users/Smilediver/Projects/UnityProjects/MetalNoValidPixelFormatCrash/Build/Classes/Unity/UnityRendering.h:206
#11 0x000000010004c3fc in -[DisplayConnection present] at /Users/Smilediver/Projects/UnityProjects/MetalNoValidPixelFormatCrash/Build/Classes/Unity/DisplayManager.mm:221
#12 0x000000010004d610 in __25-[DisplayManager present]_block_invoke at /Users/Smilediver/Projects/UnityProjects/MetalNoValidPixelFormatCrash/Build/Classes/Unity/DisplayManager.mm:340
#13 0x000000010004d2bc in -[DisplayManager enumerateDisplaysWithBlock:] at /Users/Smilediver/Projects/UnityProjects/MetalNoValidPixelFormatCrash/Build/Classes/Unity/DisplayManager.mm:321
#14 0x000000010004d5c4 in -[DisplayManager present] at /Users/Smilediver/Projects/UnityProjects/MetalNoValidPixelFormatCrash/Build/Classes/Unity/DisplayManager.mm:339
#15 0x0000000100044e48 in -[UnityAppController(Rendering) callbackPresent:] at /Users/Smilediver/Projects/UnityProjects/MetalNoValidPixelFormatCrash/Build/Classes/UnityAppController+Rendering.mm:81
#16 0x0000000100045460 in UnityPresentContextCallback at /Users/Smilediver/Projects/UnityProjects/MetalNoValidPixelFormatCrash/Build/Classes/UnityAppController+Rendering.mm:119
#17 0x00000001017cd434 in GfxDeviceMetal::PresentFrame() at /Users/Smilediver/Projects/Unity/unity/Runtime/GfxDevice/metal/GfxDeviceMetal.mm:1612
#18 0x000000010178dc04 in GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&) at /Users/Smilediver/Projects/Unity/unity/Runtime/GfxDevice/threaded/GfxDeviceWorker.cpp:1009
#19 0x00000001017cded8 in GfxDeviceWorkerAutoreleasePoolProxy at /Users/Smilediver/Projects/Unity/unity/Runtime/GfxDevice/metal/GfxDeviceMetal.mm:1781
#20 0x00000001017b0a88 in GfxDeviceWorker::Run() at /Users/Smilediver/Projects/Unity/unity/Runtime/GfxDevice/threaded/GfxDeviceWorker.cpp:331
#21 0x0000000101772d40 in GfxDeviceWorker::RunGfxDeviceWorker(void*) at /Users/Smilediver/Projects/Unity/unity/Runtime/GfxDevice/threaded/GfxDeviceWorker.cpp:306
#22 0x000000010104ac80 in Thread::RunThreadWrapper(void*) at /Users/Smilediver/Projects/Unity/unity/Runtime/Threads/Thread.cpp:44

Comments (10)

  1. 2ebd3734157ff49a3123eea67735c492?d=mm

    quitebuttery

    Jul 01, 2018 04:01

    I'm getting this error in MacOS on 2018.1.6f

  2. 7a4d9959983e05121f70df4a648d1de1?d=mm

    Rich0

    Jun 21, 2018 03:32

    I think this might be a regression in 2018.1.5f1 - getting same issue.

  3. D4c7e690216118b138c2ee3411cb610e?d=mm

    udede

    Jun 03, 2018 11:48

    [MTLRenderPipelineDescriptorInternal validateWithDevice:], line 2400: error 'No valid pixelFormats set.'
    -[MTLRenderPipelineDescriptorInternal validateWithDevice:]:2400: failed assertion `No valid pixelFormats set.'

    2018.1 version

    bug fixed?

  4. C3071caa05d1a2a7e83dbcf766410aec?d=mm

    JanQGames

    Oct 17, 2017 08:51

    We still have this issue right now

    [MTLRenderPipelineDescriptorInternal validateWithDevice:], line 2400: error 'No valid pixelFormats set.'
    -[MTLRenderPipelineDescriptorInternal validateWithDevice:]:2400: failed assertion `No valid pixelFormats set.'

    Any ETA for the fix?

    Thanks

  5. F083037bb4af972f45d782b80ce8ddcd?d=mm

    billy-kahong-chan

    Sep 14, 2016 08:21

    It's still occur in my iPhone6 after update to 5.4.1

  6. 5f65279675900076b2808b8df09d53f0?d=mm

    douke_akira

    Aug 25, 2016 01:48

    Error in iphone 6 / 6S has occurred.
    The iphone 5 / 5S has started.
    However error elsewhere occurs.

  7. B26f9d6ff7b93d7963a0157247b81785?d=mm

    ranguera

    Aug 23, 2016 22:46

    Same here.. i had no issues with 5.3 but crashing now with that error on 5.4

  8. D5fb0d6df069b0870ab3090486c5f93e?d=mm

    mcmorry

    Aug 23, 2016 16:21

    Up... I need a fix too. Release notes from 5.4.0f3 on don't report anything about this.
    So looks like is a regression of a regression...

  9. 7655e7b2b25e5db0d076ba020b4b3d9a?d=mm

    kenblaue

    Aug 11, 2016 18:16

    I updated to unity ver 5.4.0f3 today, and bug still exists...

  10. Dfcc2bf8375d09c132bac994cd7ee789?d=mm

    flashmandv

    Jul 28, 2016 08:45

    Which version is this bug fixed in ?

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.