Blender V4.3
vk_image_view.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "vk_common.hh"
12
13#include "BLI_string_ref.hh"
14#include "BLI_utility_mixins.hh"
15
16namespace blender::gpu {
17class VKTexture;
18
23 union {
24 char swizzle[4];
26 };
36
37 bool operator==(const VKImageViewInfo &other) const
38 {
39 return usage == other.usage && layer_range == other.layer_range &&
40 mip_range == other.mip_range && swizzle_data == other.swizzle_data &&
41 use_stencil == other.use_stencil && use_srgb == other.use_srgb &&
42 arrayed == other.arrayed;
43 }
44};
45
47 VkImageView vk_image_view_ = VK_NULL_HANDLE;
48 VkFormat vk_format_ = VK_FORMAT_UNDEFINED;
49
50 public:
52
54
55 VKImageView(VKImageView &&other);
57
58 VkImageView vk_handle() const
59 {
60 BLI_assert(vk_image_view_ != VK_NULL_HANDLE);
61 return vk_image_view_;
62 }
63
64 VkFormat vk_format() const
65 {
66 return vk_format_;
67 }
68};
69
70} // namespace blender::gpu
#define BLI_assert(a)
Definition BLI_assert.h:50
VkFormat vk_format() const
VKImageView(VKTexture &texture, const VKImageViewInfo &info, StringRefNull name)
const VKImageViewInfo info
VkImageView vk_handle() const
unsigned int uint32_t
Definition stdint.h:80
bool operator==(const VKImageViewInfo &other) const