Fix 'error C4576: a parenthesized type followed by an initializer
list is a non-standard explicit type conversion syntax' errors by
declaring an actual variable and returning it in
vk_image_view_subresource_range().
All those MSVC/c++ related-constraints are quite annoying to be honest,
but it looks like the D3D12 headers have been updated to plain C
recently, which will allow us to write the driver in C, and hopefully
get all this sort of issues behind us.
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14766>
static inline VkImageSubresourceRange
vk_image_view_subresource_range(const struct vk_image_view *view)
{
- return (VkImageSubresourceRange) {
+ VkImageSubresourceRange range = {
.aspectMask = view->aspects,
.baseMipLevel = view->base_mip_level,
.levelCount = view->level_count,
.baseArrayLayer = view->base_array_layer,
.layerCount = view->layer_count,
};
+
+ return range;
}
bool vk_image_layout_is_read_only(VkImageLayout layout,