mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
vulkan/image: Make MSVC C++ compiler happy
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>
This commit is contained in:
parent
0312ca0175
commit
bb1fb07ecd
1 changed files with 3 additions and 1 deletions
|
|
@ -227,13 +227,15 @@ void vk_image_view_destroy(struct vk_device *device,
|
|||
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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue