@@ -47,6 +47,47 @@ namespace commandbuffers
4747 using GPUBindGroupIndex = uint32_t ;
4848 constexpr GPUBindGroupIndex kMaxBindGroupsTyped = GPUBindGroupIndex(gpu_constants::kMaxBindGroups );
4949
50+ struct GPUExtent2D
51+ {
52+ uint32_t width;
53+ uint32_t height;
54+
55+ // Equality operators, mostly for testing. Note that this tests
56+ // strict pointer-pointer equality if the struct contains member pointers.
57+ bool operator ==(const GPUExtent2D &rhs) const ;
58+ };
59+
60+ struct GPUExtent3D
61+ {
62+ uint32_t width;
63+ uint32_t height = 1 ;
64+ uint32_t depthOrArrayLayers = 1 ;
65+
66+ // Equality operators, mostly for testing. Note that this tests
67+ // strict pointer-pointer equality if the struct contains member pointers.
68+ bool operator ==(const GPUExtent3D &rhs) const ;
69+ };
70+
71+ enum class GPUComponentSwizzle : uint32_t
72+ {
73+ kUndefined ,
74+ kZero ,
75+ kOne ,
76+ kR ,
77+ kG ,
78+ kB ,
79+ kA ,
80+ };
81+
82+ enum class GPUCompositeAlphaMode : uint32_t
83+ {
84+ kAuto ,
85+ kOpaque ,
86+ kPremultiplied ,
87+ kUnpremultiplied ,
88+ kInherit ,
89+ };
90+
5091 enum class GPUHandleType : uint32_t
5192 {
5293 kAdapter ,
@@ -135,6 +176,29 @@ namespace commandbuffers
135176 kComparison ,
136177 };
137178
179+ enum class GPUTextureAspect : uint32_t
180+ {
181+ kUndefined ,
182+ kAll ,
183+ kStencilOnly ,
184+ kDepthOnly ,
185+ kPlane0Only ,
186+ kPlane1Only ,
187+ kPlane2Only ,
188+ };
189+
190+ enum class GPUTextureUsage : uint64_t
191+ {
192+ kNone ,
193+ kCopySrc ,
194+ kCopyDst ,
195+ kTextureBinding ,
196+ kStorageBinding ,
197+ kRenderAttachment ,
198+ kTransientAttachment ,
199+ kStorageAttachment ,
200+ };
201+
138202 enum class GPUTextureSampleType : uint32_t
139203 {
140204 kBindingNotUsed ,
@@ -146,6 +210,14 @@ namespace commandbuffers
146210 kUint ,
147211 };
148212
213+ enum class GPUTextureDimension : uint32_t
214+ {
215+ kUndefined ,
216+ k1D,
217+ k2D,
218+ k3D,
219+ };
220+
149221 enum class GPUTextureViewDimension : uint32_t
150222 {
151223 kUndefined ,
@@ -277,6 +349,14 @@ namespace commandbuffers
277349 kExternal ,
278350 };
279351
352+ struct GPUTextureComponentSwizzle
353+ {
354+ GPUComponentSwizzle r = GPUComponentSwizzle::kUndefined ;
355+ GPUComponentSwizzle g = GPUComponentSwizzle::kUndefined ;
356+ GPUComponentSwizzle b = GPUComponentSwizzle::kUndefined ;
357+ GPUComponentSwizzle a = GPUComponentSwizzle::kUndefined ;
358+ };
359+
280360 enum class GPUStorageTextureAccess : uint32_t
281361 {
282362 kBindingNotUsed ,
@@ -435,8 +515,10 @@ namespace commandbuffers
435515 void setLabel (std::string label);
436516 const std::string &getLabel () const ;
437517
518+ public:
519+ const GPUIdentifier id;
520+
438521 private:
439522 std::string label_ = " " ;
440- const GPUIdentifier id_;
441523 };
442524}
0 commit comments