Blender V5.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
8
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 };
27
34 VkFormat vk_format;
35 VkImageAspectFlags vk_image_aspects;
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 arrayed == other.arrayed && vk_format == other.vk_format &&
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);
56
57 VkImageView vk_handle() const
58 {
59 BLI_assert(vk_image_view_ != VK_NULL_HANDLE);
60 return vk_image_view_;
61 }
62
63 VkFormat vk_format() const
64 {
65 return vk_format_;
66 }
67};
68
69} // namespace blender::gpu
NonCopyable(const NonCopyable &other)=delete
VkFormat vk_format() const
VKImageView(VKTexture &texture, const VKImageViewInfo &info, StringRefNull name)
const VKImageViewInfo info
VkImageView vk_handle() const
TEX_TEMPLATE DataVec texture(T, FltCoord, float=0.0f) RET
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
unsigned int uint32_t
Definition BKE_text.h:81
bool operator==(const VKImageViewInfo &other) const
VkImageAspectFlags vk_image_aspects