On Tue Jul 23 23:18:49 2024 +0000, Connor McAdams wrote:
Well, in a way we already have to fight it a bit due to the potential for skipping mip levels, which is possible in d3dx10/11 as well. In theory I guess we could get the address of the first mip level for each layer, then do the dimension calculations/image pointer offsetting ourselves in the loop. For d3dx10/11 we do have to calculate the mip level sizes ourselves since d3d10/d3d11 has no equivalent to `GetLevelDesc()`. I feel like the way it is now is visually cleaner, but probably less performant. If you'd prefer it to be closer to the way we'll end up doing it in d3dx10/d3dx11 I can do that.
I'm not super worried about performance. It's just that, to me, looping by layer first looks more natural. Bonus points if that makes it more similar to what you end up doing for d3dx10/11 anyway.
It might very well be subjective though and ultimately it doesn't seem important.