GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT with jit.fx.delay

JMB_13's icon

Hello,

I use the same patch on bith my Mc Intel Desktop (Sequoia 15.7.5) and my Mb Pro M3 pro (Tahoe 26.7) and the [jit.fx.delay] gives no error on the Desktop and gives this GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT error on the MacBook pro. It is the same patch on both computers.

The help patch of [jit.fx.delay] on the MacBook pro doesn't give this error. I already tried to recreate the [jit.fx.delay] object, no change.

What can I do ?

Rei Kurosawa's icon

Could you post a minimal patch that still produces the error on the MacBook Pro? Include the exact Max and Jitter FX package versions on both computers. Please leave the working desktop patch unchanged.

Rob Ramirez's icon

9.2.1 on both? otherwise yes please send a patch here or to support

JMB_13's icon

I installed 9.2.1 on the laptop, same issue, the desktop is still on 9.0.9 and can't be updated for now. It is a quite complex patch, If I just use a movie player and [jit.fx.delay] and [jit.co.average] connected to a [jit.gl.videoplane] there is no issue. My animated images comes from a picture distorsed by a [jit.gl.bfg] himself driven by a [peakamp~] reading the amplitude of a soundfile... It wil take a while to reconstruct a single patch with that architecture to show the issue. I'm working on it.

In the mean time could you tell me what this message means ? Maybe I could see if there is a order issue (lots of inlets, outlets...).

The entire error message (that stops when I disable [jit.fx.delay]) is :

......................
could not allocate matrix

could not allocate matrix

jit.world: jit.gl.texture: update_teximage_state: GL Error: Invalid value

GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT

GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT

GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT

GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT

GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT

......................

Rei Kurosawa's icon

That status means an image attached to the OpenGL framebuffer fails its completeness checks. Your log also shows matrix allocation failures and an invalid texture value before the framebuffer messages. Those messages alone do not identify which part of your patch caused the problem.

JMB_13's icon

I went a bit ahead and found out that the error message happens if a 4K or 2K image is loaded, doesn't happen with a FHD image.


Here is a patch where this happens :

framebuffer.maxpat
Max Patch
JMB_13's icon

If I redim the texture to 1920 1080 max before [jit.fx.delay] and redim it to the image size after then no issue.

My question is why does it creates an issue on my MbPro m3 pro and doesn't create an issue on my mac Intel ? Mac Ram size ? I have 64 Go on the Intel and 48 Go on the M3 pro.

Rob Ramirez's icon

ok I see why this is happening. jit.fx.delay utilizes a 3D texture for the delay. I can see in the OpenGL Status window on my M5 that the max 3d texture size is 2048. I'm assuming the desktop has different limitations. We should probably handle this better both in the engine and in the jit.fx.delay. Thanks for bringing this to our attention.

Fortunately there's a fairly easy fix, to swap this out with a jit.gl.textureset @insert 0

Max Patch
Copy patch and select New From Clipboard in Max.