This is a fairly invasive refactor, so I'm doing this as a separate PR.
The goal here is to unify all the different ways in which we compute the size of a subresource to make it a) more consistent and b) correct w.r.t. subsampled planes. Currently it's all over the place and largely broken.
Another change is that we now store the aspect flag that is used to create a view in the view info. This is important in cases where we need to reconstruct the exact subresource of the image that the view covers, since it can be something like PLANE_1_BIT even if the format's aspect mask is COLOR_BIT.
This is a fairly invasive refactor, so I'm doing this as a separate PR.
The goal here is to unify all the different ways in which we compute the size of a subresource to make it a) more consistent and b) correct w.r.t. subsampled planes. Currently it's all over the place and largely broken.
Another change is that we now store the aspect flag that is used to create a view in the view info. This is important in cases where we need to reconstruct the exact subresource of the image that the view covers, since it can be something like
PLANE_1_BIT
even if the format's aspect mask isCOLOR_BIT
.