``` + BOOL is_subresource:1; + BOOL is_buffer:1; ```
BOOL is a signed type; you don't want to use it in bitfields. Since there's only two members I'd use "bool" instead. Moreover, though, both of these members seem redundant? is_subresource is equivalent to !!parent_resource, and is_buffer can be retrieved from wined3d_resource_get_desc().
The idea of keeping this struct as "dxgi_resource" while using it for non-resources seems dubious to me. I don't know that it's worth using a separate structure either, but if we don't, we should probably rename to dxgi_surface.
``` + wined3d_resource_get_desc(resource->wined3d_resource, &desc); + subresource_count = wined3d_resource_get_sub_resource_count(resource->wined3d_resource); ```
I guess this is fine but I may send a patch later to just move layer_count and level_count to wined3d_resource_desc...