@@ -100,7 +100,6 @@ impl std::hash::Hash for Temp {
100
100
/// An `Adapter` can be used to open a connection to the corresponding device on the host system,
101
101
/// yielding a [`Device`] object.
102
102
#[ derive( Debug , PartialEq , Eq ) ]
103
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
104
103
pub struct Adapter {
105
104
id : wgc:: id:: AdapterId ,
106
105
}
@@ -119,7 +118,6 @@ pub struct RequestAdapterOptions<'a> {
119
118
/// The `Device` is the responsible for the creation of most rendering and compute resources, as
120
119
/// well as exposing [`Queue`] objects.
121
120
#[ derive( Debug , PartialEq , Eq ) ]
122
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
123
121
pub struct Device {
124
122
id : wgc:: id:: DeviceId ,
125
123
temp : Temp ,
@@ -135,15 +133,13 @@ pub enum Maintain {
135
133
136
134
/// A handle to a GPU-accessible buffer.
137
135
#[ derive( Debug , PartialEq , Eq ) ]
138
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
139
136
pub struct Buffer {
140
137
id : wgc:: id:: BufferId ,
141
138
device_id : wgc:: id:: DeviceId ,
142
139
}
143
140
144
141
/// A handle to a texture on the GPU.
145
142
#[ derive( Debug , PartialEq , Eq ) ]
146
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
147
143
pub struct Texture {
148
144
id : wgc:: id:: TextureId ,
149
145
owned : bool ,
@@ -154,7 +150,6 @@ pub struct Texture {
154
150
/// A `TextureView` object describes a texture and associated metadata needed by a
155
151
/// [`RenderPipeline`] or [`BindGroup`].
156
152
#[ derive( Debug , PartialEq , Eq ) ]
157
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
158
153
pub struct TextureView {
159
154
id : wgc:: id:: TextureViewId ,
160
155
owned : bool ,
@@ -166,7 +161,6 @@ pub struct TextureView {
166
161
/// image filters (including anisotropy) and address (wrapping) modes, among other things. See
167
162
/// the documentation for [`SamplerDescriptor`] for more information.
168
163
#[ derive( Debug , PartialEq , Eq ) ]
169
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
170
164
pub struct Sampler {
171
165
id : wgc:: id:: SamplerId ,
172
166
}
@@ -176,7 +170,6 @@ pub struct Sampler {
176
170
/// A `Surface` represents a platform-specific surface (e.g. a window) to which rendered images may
177
171
/// be presented. A `Surface` may be created with [`Surface::create`].
178
172
#[ derive( Debug , PartialEq , Eq ) ]
179
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
180
173
pub struct Surface {
181
174
id : wgc:: id:: SurfaceId ,
182
175
}
@@ -186,7 +179,6 @@ pub struct Surface {
186
179
/// A `SwapChain` represents the image or series of images that will be presented to a [`Surface`].
187
180
/// A `SwapChain` may be created with [`Device::create_swap_chain`].
188
181
#[ derive( Debug , PartialEq , Eq ) ]
189
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
190
182
pub struct SwapChain {
191
183
id : wgc:: id:: SwapChainId ,
192
184
}
@@ -198,7 +190,6 @@ pub struct SwapChain {
198
190
/// object with [`Device::create_bind_group`]. A series of `BindGroupLayout`s can also be used to
199
191
/// create a [`PipelineLayoutDescriptor`], which can be used to create a [`PipelineLayout`].
200
192
#[ derive( Debug , PartialEq , Eq ) ]
201
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
202
193
pub struct BindGroupLayout {
203
194
id : wgc:: id:: BindGroupLayoutId ,
204
195
}
@@ -210,7 +201,6 @@ pub struct BindGroupLayout {
210
201
/// be bound to a particular [`RenderPass`] with [`RenderPass::set_bind_group`], or to a
211
202
/// [`ComputePass`] with [`ComputePass::set_bind_group`].
212
203
#[ derive( Debug , PartialEq , Eq ) ]
213
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
214
204
pub struct BindGroup {
215
205
id : wgc:: id:: BindGroupId ,
216
206
}
@@ -227,7 +217,6 @@ impl Drop for BindGroup {
227
217
/// valid SPIR-V source code to [`Device::create_shader_module`]. Shader modules are used to define
228
218
/// programmable stages of a pipeline.
229
219
#[ derive( Debug , PartialEq , Eq ) ]
230
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
231
220
pub struct ShaderModule {
232
221
id : wgc:: id:: ShaderModuleId ,
233
222
}
@@ -236,7 +225,6 @@ pub struct ShaderModule {
236
225
///
237
226
/// A `PipelineLayout` object describes the available binding groups of a pipeline.
238
227
#[ derive( Debug , PartialEq , Eq ) ]
239
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
240
228
pub struct PipelineLayout {
241
229
id : wgc:: id:: PipelineLayoutId ,
242
230
}
@@ -246,14 +234,12 @@ pub struct PipelineLayout {
246
234
/// A `RenderPipeline` object represents a graphics pipeline and its stages, bindings, vertex
247
235
/// buffers and targets. A `RenderPipeline` may be created with [`Device::create_render_pipeline`].
248
236
#[ derive( Debug , PartialEq , Eq ) ]
249
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
250
237
pub struct RenderPipeline {
251
238
id : wgc:: id:: RenderPipelineId ,
252
239
}
253
240
254
241
/// A handle to a compute pipeline.
255
242
#[ derive( Debug , PartialEq , Eq ) ]
256
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
257
243
pub struct ComputePipeline {
258
244
id : wgc:: id:: ComputePipelineId ,
259
245
}
@@ -264,7 +250,6 @@ pub struct ComputePipeline {
264
250
/// queue with [`Queue::submit`]. A `CommandBuffer` is obtained by recording a series of commands to
265
251
/// a [`CommandEncoder`] and then calling [`CommandEncoder::finish`].
266
252
#[ derive( Debug , PartialEq , Eq ) ]
267
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
268
253
pub struct CommandBuffer {
269
254
id : wgc:: id:: CommandBufferId ,
270
255
}
@@ -277,7 +262,6 @@ pub struct CommandBuffer {
277
262
/// When finished recording, call [`CommandEncoder::finish`] to obtain a [`CommandBuffer`] which may
278
263
/// be submitted for execution.
279
264
#[ derive( Debug , PartialEq , Eq ) ]
280
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
281
265
pub struct CommandEncoder {
282
266
id : wgc:: id:: CommandEncoderId ,
283
267
/// This type should be !Send !Sync, because it represents an allocation on this thread's
@@ -303,7 +287,6 @@ pub struct ComputePass<'a> {
303
287
///
304
288
/// A `Queue` executes recorded [`CommandBuffer`] objects.
305
289
#[ derive( Debug , PartialEq , Eq ) ]
306
- #[ cfg_attr( not( target_arch = "wasm32" ) , derive( Hash ) ) ]
307
290
pub struct Queue {
308
291
id : wgc:: id:: QueueId ,
309
292
}
0 commit comments