Reliable way to wait for texture.Apply to finish GPU upload

Hey fellow devs,

banging my head against a problem and i can’t seem to find a good solution.
I’m updating an RGBAFloat Texture2D using GetRawTextureData + Apply, then pass it to a shader which is used to blit one rendertexture to another.

My problem is that not enough time passes between texture.Apply and doing the blit, so that in the fragment shader the Texture2D has not been uploaded to the GPU yet. Moving a long enough CPU operation in that place fixes the problem, but i can’t rely on that since it might take less time on beefier machines.

I can’t seem to find any way around this.
Is there a reliable way to wait for texture.Apply finish GPU upload?

Sounds like maybe the CPU didn’t flush its cache… not sure that’s intended for that use. Have you tried the second example in here that uses the .LoadRawTextureData() method?

That might be the reference way to inform the system that you have fresh data in the buffer.