On Mon, Jun 6, 2016 at 2:59 PM, Henri Verbeet hverbeet@gmail.com wrote:
Is the "view_type" field needed? I seem to remember that the view type needs to match the resource type, so you shouldn't be able to e.g. create a texture view on a buffer resource. The main other reasons I can imagine for having the field are cube views, and perhaps shaders making a distinction between array textures with a single layer and non-array textures. The latter could easily be handled by setting "layer_count" to ~0u for non-array textures, but since we have a "flags" field with plenty of extra bits, I think we could just use that to mark both cube and array views.
Yes, this information can be encoded in the "flags" field. The main reasons for the "view_type" field are cube views and cube array views.