27 Aug
2018
27 Aug
'18
6:07 p.m.
On 27 August 2018 at 19:57, Józef Kucia <joseph.kucia(a)gmail.com> wrote:
+enum vkd3d_view_kind +{ + VKD3D_VIEW_TYPE_DSV, + VKD3D_VIEW_TYPE_RTV, + VKD3D_VIEW_TYPE_SRV, + VKD3D_VIEW_TYPE_UAV, +}; + +struct vkd3d_texture_view_desc +{ + enum vkd3d_view_kind view_kind; + VkImageViewType view_type;
I don't think this is great. view_kind and view_type seem like synonyms at first sight, and I think it's good practice for enum element names to match the enum name. I.e., if we really need vkd3d_view_kind, the enum elements should probably be called VKD3D_VIEW_KIND_*. Is "view_kind" really needed though? At first sight, it looks like we only really care about "is_srv", and we could just handle that in d3d12_desc_create_srv().