Render target not updating size

Hi there, so I have this very strange issue. I have two render targets both of witch I populate from a custom compute shader. I first fill one in and then in the second one I get the first one and blur it. The thing is that the size of the render target can vary every time so before executing any compute shader, I set the sizes of the render target as follow:

RenderTarget1->SizeX = RenderTarget2->SizeX  = valueX;
RenderTarget1->SizeY = RenderTarget2->SizeY = valueY;

RenderTarget1->UpdateResourceImmediate(true);
RenderTarget2->UpdateResourceImmediate(true);

From the engine inspector I can clearly see how both render targets have changed to the new size. The problem comes when I want to populate the second render target based on the first one. When executing the second compute shader the first render target still has the default size and not the new one but if I check the render target from the engine it did change to the new size. It’s like if it’s getting cached in some place but I have 0 clues where.

Anyone knows the answer or anything that can help?
Thanks in advance :slight_smile:

Update, found a solution. I was using UpdateResourceImmediate but it looks like that does not clean the cache, for that I had to use UpdateResource and that worked