[PATCH vkd3d 01/10] vkd3d: Introduce vkd3d_texture_view_desc structure.

Henri Verbeet hverbeet at gmail.com
Mon Aug 27 12:07:48 CDT 2018


On 27 August 2018 at 19:57, Józef Kucia <joseph.kucia at 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().



More information about the wine-devel mailing list