Skip to main content
dkt0
Inspiring
December 14, 2025
Answered

GPU API

  • December 14, 2025
  • 1 reply
  • 817 views

Quick question about the GPU API. Does AE force CPU rendering if buffer expansion happens? Done some testing with debugging and it seems like SmartRenderGPU never gets called when expansion happens. Do I have to do something specific or anything, or is it not possible?

Correct answer dkt0

So uh, any ideas as to why the input/output mismatch happens in the first place? If I can't fix that, my effects wont work with first-party effects.


https://drive.google.com/file/d/1zIFDmQlOC2zQuwCkYI6ZTnAbIsDDR49N/view?usp=sharing

I finally fixed the issue so I decided to share one of my old plugins which I just modified to handle buffer expansion on both the CPU and the GPU. Everything you need to see is in that project. Just make sure to set PF_RenderOutputFlag_RETURNS_EXTRA_PIXELS with "|=" NOT "=". If you set it with just "=", the plugin will just automatically render on the CPU if expansion is happening.

1 reply

dkt0
dkt0Author
Inspiring
December 14, 2025

Also a quick note. It seems to have something to do with this flag PF_RenderOutputFlag_RETURNS_EXTRA_PIXELS.

If you set it like this "|=" expansion happens on GPU as well, but it completely corrupts the image for non-transform effects, like blurs.

If you set it like this "=" expansion forces CPU rendering.

James Whiffin
Legend
December 19, 2025

Sorry I don't have an answer to your question, but in the following case:

If you set it like this "|=" expansion happens on GPU as well, but it completely corrupts the image for non-transform effects, like blurs.

Is it corrupting the input buffer, or is it the case it's junk memory in the output buffer?

dkt0
dkt0Author
Inspiring
December 19, 2025

I am not sure what it corrupts but it looks like this:

 

Screenshot 2025-07-10 174929.png

 

But I am clearly doing something wrong because there are built-in effects in AE that are GPU Accelerated and also have expansion that happens on the GPU, not on the CPU. Effects like Directional Blur, Gaussian Blur, Transform.

 

Some extra info I can give about this is that that corruption you see in the image happens when I apply my DBlur effect above my Exposure effect, otherwise if I apply it alone or with other effects, it does not happen. This kinda proves that I am doing something wrong, not that it's not possible. Also sad that no one really got experience with the GPU API.