When would I need FormatUsage.LoadStore?

There isn’t much information about this in the documentation.

If I need a texture format from SystemInfo.GetCompatibleFormat for a compute shader, would LoadStore be a flag I need?

I can only guess.

I think, LoadStore means that you intend to read from and write to the texture. So if you intend to bind the texture as a RWTexture, then yes. If you intend to bind it as a read-only texture, then no.

Reason is probably that you can’t write to a compressed texture format, for example. So in that case the function would have to return an uncompressed format, if you specified LoadStore.

By the way, LoadStore is also a concept that is used when setting render targets. There the flag is used for optimizations. There is some documentation for that here: Unity - Scripting API: RenderBufferStoreAction and here Unity - Scripting API: RenderBufferLoadAction

Thank you. That makes sense.

I am using the texture for RWTexture. I’ll use LoadStore to get the format closer to a compatible one (user configurable option).

Although, LoadStore does not mean a texture supports random writes (UAVs) according to Unity. There is SystemInfo.SupportsRandomWriteOnRenderTextureFormat to check if it does support random writes. It’s a shame FormatUsage cannot specify random write. I will just have to fallback to one of the safer formats if it also fails that check like R16G16B16A16_FLOAT: