(desc: &ArrayDescriptor)
| 266 | |
| 267 | impl ResourceViewDescriptor { |
| 268 | pub fn from_array_desc(desc: &ArrayDescriptor) -> Self { |
| 269 | Self { |
| 270 | format: ResourceViewFormat::from_array_format(desc.format(), desc.num_channels()), |
| 271 | width: desc.width(), |
| 272 | height: desc.height(), |
| 273 | depth: desc.depth(), |
| 274 | first_mipmap_level: 0, |
| 275 | last_mipmap_level: 0, |
| 276 | first_layer: 0, |
| 277 | last_layer: 0, |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | pub fn to_raw(self) -> CUDA_RESOURCE_VIEW_DESC { |
| 282 | let ResourceViewDescriptor { |
nothing calls this directly
no test coverage detected