4#include "TextureData.h"
9 enum class BindingResourceType : uint8_t
20 enum BindingVisibilityFlags : uint32_t
22 BindingVisibilityNone = 0,
23 BindingVisibilityVertex = 1u << 0,
24 BindingVisibilityFragment = 1u << 1,
25 BindingVisibilityCompute = 1u << 2,
28 enum class BindingTextureSampleType : uint8_t
38 enum class BindingSamplerBindingType : uint8_t
46 enum class BindingStorageTextureAccess : uint8_t
59 BindingResourceType resourceType = BindingResourceType::UniformBuffer;
60 uint32_t visibility = BindingVisibilityNone;
61 uint32_t arrayCount = 1;
62 ResourceDimensions textureDimension = ResourceDimensions::Unknown;
63 BindingTextureSampleType textureSampleType = BindingTextureSampleType::Unknown;
64 BindingSamplerBindingType samplerBindingType = BindingSamplerBindingType::Unknown;
65 Format format = Format::Unknown;
66 BindingStorageTextureAccess storageTextureAccess = BindingStorageTextureAccess::WriteOnly;
67 bool isDepthTexture =
false;
68 bool multisampled =
false;
69 bool hasDynamicOffset =
false;
74 hashValue =
Cogs::hash(resourceType, hashValue);
77 hashValue =
Cogs::hash(textureDimension, hashValue);
78 hashValue =
Cogs::hash(textureSampleType, hashValue);
79 hashValue =
Cogs::hash(samplerBindingType, hashValue);
81 hashValue =
Cogs::hash(storageTextureAccess, hashValue);
82 hashValue =
Cogs::hash(isDepthTexture, hashValue);
83 hashValue =
Cogs::hash(multisampled, hashValue);
84 hashValue =
Cogs::hash(hasDynamicOffset, hashValue);
90 const uint16_t MaxBindGroupEntries = 32;
94 uint16_t numEntries = 0;
98 for (uint16_t i = 0; i < numEntries; ++i) {
99 hashValue = entries[i].hash(hashValue);
106 const size_t MaxBindGroups = 4;
110 uint16_t numGroups = 0;
Provides a weakly referenced view over the contents of a string.
Contains all Cogs related functionality.
constexpr size_t hash() noexcept
Simple getter function that returns the initial value for fnv1a hashing.
Provides bind group management functionality.
virtual void annotate(BindGroupHandle handle, const StringView &name)
Associate a name with an object for use in graphics debugging.