Post

Replies

Boosts

Views

Activity

Reply to MetalFX FrameInterpolator assertion: `Color texture width mismatch from descriptor` even when all texture sizes match
and the output log is below: [2026-01-22 12:42:00] Compiled shader: Hidden/PostProcessing/ExtractUIHint, subShaderLOD:0, pass: <Unnamed Pass 0>, stage: fragment, codeSize: 1059, keywords OSLOG-8E9458FC-7294-45FC-B2B2-10E6E69096A7 7 80 L 72 {t:1769056920.688173,tid:0xfd221e,offset:0x4a67d0c} ERR mtlTexColor gfxFormat: 70, size: 1024 x 512 ~ 1024 x 512 OSLOG-8E9458FC-7294-45FC-B2B2-10E6E69096A7 7 80 L 73 {t:1769056920.688209,offset:0x4a67d7c} ERR mtlTexPrevColor gfxFormat: 70, size: 1024 x 512 ~ 1024 x 512 OSLOG-8E9458FC-7294-45FC-B2B2-10E6E69096A7 7 80 L 74 {t:1769056920.688219,offset:0x4a67dec} ERR mtlTexMotion gfxFormat: 65, size: 1024 x 512 ~ 1024 x 512 OSLOG-8E9458FC-7294-45FC-B2B2-10E6E69096A7 7 80 L 75 {t:1769056920.688224,offset:0x4a67e5c} ERR mtlTexDepth gfxFormat: 55, size: 1024 x 512 ~ 1024 x 512 OSLOG-8E9458FC-7294-45FC-B2B2-10E6E69096A7 7 80 L 76 {t:1769056920.688230,offset:0x4a67ecc} ERR mtlTexUI gfxFormat: 70, size: 2048 x 1024 ~ 2048 x 1024 OSLOG-8E9458FC-7294-45FC-B2B2-10E6E69096A7 7 80 L 77 {t:1769056920.688235,offset:0x4a67f3c} ERR mtlTexOutput gfxFormat: 80, size: 2048 x 1024 ~ 2048 x 1024 OSLOG-8E9458FC-7294-45FC-B2B2-10E6E69096A7 7 80 L 78 {t:1769056920.688245,offset:0x4a67f98} ERR m_MTLFXTemporalScaler inputSize: 1024 x 512 outputSize: 2048 x 1024 OSLOG-8E9458FC-7294-45FC-B2B2-10E6E69096A7 7 80 L 79 {t:1769056920.688252,offset:0x4a67ff4} ERR m_MTLFXTemporalScaler colorFormat- 70 depthFormat- 55 motionFormat- 65 outputFormat- 80 OSLOG-8E9458FC-7294-45FC-B2B2-10E6E69096A7 7 80 L 7a {t:1769056920.688259,offset:0x4a68064} ERR FrameInterpolator colorFormat- 70 depthFormat- 55 motionFormat- 65 outputFormat- 80 uiFormat- 70 /AppleInternal/Library/BuildRoots/4~CB3qugCnkOnvt3utP5EjRtMy8k8SCYMtZU_Tyn4/Library/Caches/com.apple.xbs/Sources/MetalFX/Framework/MetalFXDebugError.h:29: failed assertion `Color texture width mismatch from descriptor'
Topic: Graphics & Games SubTopic: Metal Tags:
2w
Reply to MetalFX FrameInterpolator assertion: `Color texture width mismatch from descriptor` even when all texture sizes match
hear add some debug code, MetalFX FrameInterpolator calling code like this: void MetalFXFrameInterpolator::MTLFXInterpolateFrame(const FrameInterpolatorRenderContextInternal& context, id frameInterpolator, id cmdBuffer) { id mtlTexOutput = context.idOutputTexture.IsValid() ? QueryMTLTexturePointer(context.idOutputTexture) : GetBackBufferColorMTLTexture(); id mtlTexPrevColor = QueryMTLTexturePointer(context.idPrevColorTexture); id mtlTexMotion = QueryMTLTexturePointer(context.idMotionTexture); id mtlTexColor = QueryMTLTexturePointer(context.idColorTexture); id mtlTexDepth = QueryMTLTexturePointer(context.idDepthTexture); id mtlTexUI = QueryMTLTexturePointer(context.idUiTexture); if (mtlTexColor.width != frameInterpolator.inputWidth || mtlTexColor.height != frameInterpolator.inputHeight || mtlTexPrevColor.width != frameInterpolator.inputWidth || mtlTexPrevColor.height != frameInterpolator.inputHeight || mtlTexOutput.width != frameInterpolator.outputWidth || mtlTexOutput.height != frameInterpolator.outputHeight || mtlTexUI.width != frameInterpolator.outputWidth || mtlTexUI.height != frameInterpolator.outputHeight) { NSLog(@"ERR tex width mismatch: %lu x %lu ~ %lu x %lu ", (unsigned long)mtlTexColor.width , (unsigned long)mtlTexColor.height, (unsigned long)frameInterpolator.inputWidth, (unsigned long)frameInterpolator.inputHeight); // return; } if (mtlTexColor.parentTexture != nil) { NSLog(@"mtlTexColor parentTex %lu x %lu", mtlTexColor.parentTexture.width, mtlTexColor.parentTexture.height); } if (mtlTexPrevColor.parentTexture != nil) { NSLog(@"mtlTexPrevColor parentTex %lu x %lu", mtlTexPrevColor.parentTexture.width, mtlTexPrevColor.parentTexture.height); } if (mtlTexUI.parentTexture != nil) { NSLog(@"mtlTexUI parentTex %lu x %lu", mtlTexUI.parentTexture.width, mtlTexUI.parentTexture.height); } if (mtlTexOutput.parentTexture != nil) { NSLog(@"mtlTexUI parentTex %lu x %lu", mtlTexOutput.parentTexture.width, mtlTexOutput.parentTexture.height); } NSLog(@"ERR mtlTexColor gfxFormat: %lu, size: %lu x %lu ~ %lu x %lu ", (unsigned long)mtlTexColor.pixelFormat , (unsigned long)mtlTexColor.width , (unsigned long)mtlTexColor.height, (unsigned long)frameInterpolator.inputWidth, (unsigned long)frameInterpolator.inputHeight); NSLog(@"ERR mtlTexPrevColor gfxFormat: %lu, size: %lu x %lu ~ %lu x %lu ", (unsigned long)mtlTexPrevColor.pixelFormat , (unsigned long)mtlTexPrevColor.width , (unsigned long)mtlTexPrevColor.height, (unsigned long)frameInterpolator.inputWidth, (unsigned long)frameInterpolator.inputHeight); NSLog(@"ERR mtlTexMotion gfxFormat: %lu, size: %lu x %lu ~ %lu x %lu ", (unsigned long)mtlTexMotion.pixelFormat , (unsigned long)mtlTexMotion.width , (unsigned long)mtlTexMotion.height, (unsigned long)frameInterpolator.inputWidth, (unsigned long)frameInterpolator.inputHeight); NSLog(@"ERR mtlTexDepth gfxFormat: %lu, size: %lu x %lu ~ %lu x %lu ", (unsigned long)mtlTexDepth.pixelFormat , (unsigned long)mtlTexDepth.width , (unsigned long)mtlTexDepth.height, (unsigned long)frameInterpolator.inputWidth, (unsigned long)frameInterpolator.inputHeight); NSLog(@"ERR mtlTexUI gfxFormat: %lu, size: %lu x %lu ~ %lu x %lu ", (unsigned long)mtlTexUI.pixelFormat , (unsigned long)mtlTexUI.width , (unsigned long)mtlTexUI.height, (unsigned long)frameInterpolator.outputWidth, (unsigned long)frameInterpolator.outputHeight); NSLog(@"ERR mtlTexOutput gfxFormat: %lu, size: %lu x %lu ~ %lu x %lu ", (unsigned long)mtlTexOutput.pixelFormat , (unsigned long)mtlTexOutput.width , (unsigned long)mtlTexOutput.height, (unsigned long)frameInterpolator.outputWidth, (unsigned long)frameInterpolator.outputHeight); NSLog(@"ERR m_MTLFXTemporalScaler inputSize: %lu x %lu outputSize: %lu x %lu ", (unsigned long) m_MTLFXTemporalScaler.inputWidth , (unsigned long)m_MTLFXTemporalScaler.inputHeight, (unsigned long) m_MTLFXTemporalScaler.outputWidth , (unsigned long)m_MTLFXTemporalScaler.outputHeight); NSLog(@"ERR m_MTLFXTemporalScaler colorFormat- %lu depthFormat- %lu motionFormat- %lu outputFormat- %lu ", m_MTLFXTemporalScaler.colorTextureFormat , m_MTLFXTemporalScaler.depthTextureFormat, m_MTLFXTemporalScaler.motionTextureFormat , m_MTLFXTemporalScaler.outputTextureFormat); NSLog(@"ERR FrameInterpolator colorFormat- %lu depthFormat- %lu motionFormat- %lu outputFormat- %lu uiFormat- %lu", frameInterpolator.colorTextureFormat , frameInterpolator.depthTextureFormat, frameInterpolator.motionTextureFormat , frameInterpolator.outputTextureFormat, frameInterpolator.uiTextureFormat); frameInterpolator.uiTexture = mtlTexUI; frameInterpolator.colorTexture = mtlTexColor; frameInterpolator.depthTexture = mtlTexDepth; frameInterpolator.motionTexture = mtlTexMotion; frameInterpolator.outputTexture = mtlTexOutput; frameInterpolator.prevColorTexture = mtlTexPrevColor; frameInterpolator.deltaTime = context.deltaTime; frameInterpolator.nearPlane = context.nearPlane; frameInterpolator.farPlane = context.farPlane; frameInterpolator.fieldOfView = context.fieldOfView; frameInterpolator.aspectRatio = context.aspectRatio; frameInterpolator.jitterOffsetX = context.jitterOffsetX; frameInterpolator.jitterOffsetY = context.jitterOffsetY; frameInterpolator.motionVectorScaleX = context.motionVectorScaleX; frameInterpolator.motionVectorScaleY = context.motionVectorScaleY; frameInterpolator.depthReversed = context.depthReversed; frameInterpolator.shouldResetHistory = context.shouldResetHistory; frameInterpolator.uiTextureComposited = context.uiTextureComposited; m_MTLFXTemporalScaler.reset = context.shouldResetHistory; m_MTLFXTemporalScaler.colorTexture = mtlTexColor; m_MTLFXTemporalScaler.outputTexture = m_ScalerOutputTexture; m_MTLFXTemporalScaler.motionTexture = mtlTexMotion; m_MTLFXTemporalScaler.depthTexture = mtlTexDepth; m_MTLFXTemporalScaler.depthReversed = context.depthReversed; m_MTLFXTemporalScaler.jitterOffsetX = context.jitterOffsetX; m_MTLFXTemporalScaler.jitterOffsetY = context.jitterOffsetY; m_MTLFXTemporalScaler.inputContentWidth = mtlTexColor.width; m_MTLFXTemporalScaler.inputContentHeight = mtlTexColor.height; m_MTLFXTemporalScaler.motionVectorScaleX = context.motionVectorScaleX; m_MTLFXTemporalScaler.motionVectorScaleY = context.motionVectorScaleY; [frameInterpolator encodeToCommandBuffer: cmdBuffer]; frameInterpolator.colorTexture = nil; frameInterpolator.depthTexture = nil; frameInterpolator.motionTexture = nil; frameInterpolator.outputTexture = nil; frameInterpolator.prevColorTexture = nil; }
Topic: Graphics & Games SubTopic: Metal Tags:
2w