44#if RGL_VK_AVAILABLE || RGL_DX12_AVAILABLE
57 constexpr static decltype(mip) ALL_MIPS = std::numeric_limits<
decltype(mip)>::max();
58 bool representsBindless =
false;
61#if RGL_WEBGPU_AVAILABLE
67 constexpr static uint32_t unallocated = std::numeric_limits<uint32_t>::max();
74 bool representsBindless =
false;
76 bool dsvAllocated()
const {
77 return dsvIDX != unallocated;
79 bool rtvAllocated()
const {
80 return rtvIDX != unallocated;
82 bool srvAllocated()
const {
83 return srvIDX != unallocated;
85 bool uavAllocated()
const {
86 return uavIDX != unallocated;
89 covered_mips_t coveredMips = 0;
90 covered_layers_t coveredLayers = 0;
96 VkImageView view = VK_NULL_HANDLE;
97 covered_mips_t coveredMips = 0;
98 covered_layers_t coveredLayers = 0;
100 VkDescriptorSet bindlessSet = NULL;
105 NativeHandles(
decltype(vk.view) view,
decltype(vk.coveredMips) mips,
decltype(vk.coveredLayers) layers) : vk{ view, mips, layers } {}
106 NativeHandles(
decltype(vk.bindlessInfo) set) : vk{ .bindlessInfo = set } {}
115 TextureView(
decltype(parent) parent, VkImageView in_img, covered_mips_t mips, covered_layers_t layers,
Dimension dim) : parent(parent), viewSize(dim), texture(in_img, mips, layers) {}
116 TextureView(
decltype(texture.vk.bindlessInfo) bindless) : texture(bindless) {}
119#if RGL_DX12_AVAILABLE
120 TextureView(
decltype(texture.dx) dx) : texture(dx) {}
123#if RGL_WEBGPU_AVAILABLE
124 TextureView(
decltype(texture.wg) wg) : texture(wg) {}
128 TextureView(
const decltype(texture.mtl)& inTexture) {
129 texture.mtl = inTexture;
134 uint32_t GetReadonlyBindlessTextureHandle();
141 uint32_t width = 0, height = 0, depth = 1, mipLevels = 1, arrayLayers = 1;
142 std::array<float, 4> optimizedClearValue{ 0,0,0,0 };
143 TextureType imageType =
decltype(imageType)::T2D;
144 TextureFormat format;
145 TilingMode mode =
decltype(mode)::Optimal;
146 ResourceLayout initialLayout = ResourceLayout::Undefined;
147 bool isCubemap =
false;
148 bool readbackEnabled =
false;
149 std::string_view debugName;
Definition Texture.hpp:152
Definition Texture.hpp:168
Definition Texture.hpp:157
Definition TextureFormat.hpp:99
Definition Texture.hpp:138
Definition D3D12Texture.hpp:17
Definition MTLTexture.hpp:12
Definition Texture.hpp:162
Definition TextureFormat.hpp:88
Definition Texture.hpp:43
Definition Texture.hpp:52