Skip to content

Commit 0c13dd6

Browse files
committed
[deno] Enable additional vertex formats
1 parent b500ca9 commit 0c13dd6

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

deno_webgpu/render_pipeline.rs

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -417,56 +417,56 @@ pub(crate) struct GPUVertexAttribute {
417417
#[derive(WebIDL)]
418418
#[webidl(enum)]
419419
pub(crate) enum GPUVertexFormat {
420-
// #[webidl(rename = "uint8")]
421-
// Uint8,
420+
#[webidl(rename = "uint8")]
421+
Uint8,
422422
#[webidl(rename = "uint8x2")]
423423
Uint8x2,
424424
#[webidl(rename = "uint8x4")]
425425
Uint8x4,
426-
// #[webidl(rename = "sint8")]
427-
// Sint8,
426+
#[webidl(rename = "sint8")]
427+
Sint8,
428428
#[webidl(rename = "sint8x2")]
429429
Sint8x2,
430430
#[webidl(rename = "sint8x4")]
431431
Sint8x4,
432-
// #[webidl(rename = "unorm8")]
433-
// Unorm8,
432+
#[webidl(rename = "unorm8")]
433+
Unorm8,
434434
#[webidl(rename = "unorm8x2")]
435435
Unorm8x2,
436436
#[webidl(rename = "unorm8x4")]
437437
Unorm8x4,
438-
// #[webidl(rename = "snorm8")]
439-
// Snorm8,
438+
#[webidl(rename = "snorm8")]
439+
Snorm8,
440440
#[webidl(rename = "snorm8x2")]
441441
Snorm8x2,
442442
#[webidl(rename = "snorm8x4")]
443443
Snorm8x4,
444-
// #[webidl(rename = "uint16")]
445-
// Uint16,
444+
#[webidl(rename = "uint16")]
445+
Uint16,
446446
#[webidl(rename = "uint16x2")]
447447
Uint16x2,
448448
#[webidl(rename = "uint16x4")]
449449
Uint16x4,
450-
// #[webidl(rename = "sint16")]
451-
// Sint16,
450+
#[webidl(rename = "sint16")]
451+
Sint16,
452452
#[webidl(rename = "sint16x2")]
453453
Sint16x2,
454454
#[webidl(rename = "sint16x4")]
455455
Sint16x4,
456-
// #[webidl(rename = "unorm16")]
457-
// Unorm16,
456+
#[webidl(rename = "unorm16")]
457+
Unorm16,
458458
#[webidl(rename = "unorm16x2")]
459459
Unorm16x2,
460460
#[webidl(rename = "unorm16x4")]
461461
Unorm16x4,
462-
// #[webidl(rename = "snorm16")]
463-
// Snorm16,
462+
#[webidl(rename = "snorm16")]
463+
Snorm16,
464464
#[webidl(rename = "snorm16x2")]
465465
Snorm16x2,
466466
#[webidl(rename = "snorm16x4")]
467467
Snorm16x4,
468-
// #[webidl(rename = "float16")]
469-
// Float16,
468+
#[webidl(rename = "float16")]
469+
Float16,
470470
#[webidl(rename = "float16x2")]
471471
Float16x2,
472472
#[webidl(rename = "float16x4")]
@@ -497,38 +497,38 @@ pub(crate) enum GPUVertexFormat {
497497
Sint32x4,
498498
#[webidl(rename = "unorm10-10-10-2")]
499499
Unorm1010102,
500-
// #[webidl(rename = "unorm8x4-bgra")]
501-
// Unorm8x4Bgra,
500+
#[webidl(rename = "unorm8x4-bgra")]
501+
Unorm8x4Bgra,
502502
}
503503

504504
impl From<GPUVertexFormat> for wgpu_types::VertexFormat {
505505
fn from(value: GPUVertexFormat) -> Self {
506506
match value {
507-
//GPUVertexFormat::Uint8 => Self::Uint8,
507+
GPUVertexFormat::Uint8 => Self::Uint8,
508508
GPUVertexFormat::Uint8x2 => Self::Uint8x2,
509509
GPUVertexFormat::Uint8x4 => Self::Uint8x4,
510-
//GPUVertexFormat::Sint8 => Self::Sint8,
510+
GPUVertexFormat::Sint8 => Self::Sint8,
511511
GPUVertexFormat::Sint8x2 => Self::Sint8x2,
512512
GPUVertexFormat::Sint8x4 => Self::Sint8x4,
513-
//GPUVertexFormat::Unorm8 => Self::Unorm8,
513+
GPUVertexFormat::Unorm8 => Self::Unorm8,
514514
GPUVertexFormat::Unorm8x2 => Self::Unorm8x2,
515515
GPUVertexFormat::Unorm8x4 => Self::Unorm8x4,
516-
//GPUVertexFormat::Snorm8 => Self::Snorm8,
516+
GPUVertexFormat::Snorm8 => Self::Snorm8,
517517
GPUVertexFormat::Snorm8x2 => Self::Snorm8x2,
518518
GPUVertexFormat::Snorm8x4 => Self::Snorm8x4,
519-
//GPUVertexFormat::Uint16 => Self::Uint16,
519+
GPUVertexFormat::Uint16 => Self::Uint16,
520520
GPUVertexFormat::Uint16x2 => Self::Uint16x2,
521521
GPUVertexFormat::Uint16x4 => Self::Uint16x4,
522-
//GPUVertexFormat::Sint16 => Self::Sint16,
522+
GPUVertexFormat::Sint16 => Self::Sint16,
523523
GPUVertexFormat::Sint16x2 => Self::Sint16x2,
524524
GPUVertexFormat::Sint16x4 => Self::Sint16x4,
525-
//GPUVertexFormat::Unorm16 => Self::Unorm16,
525+
GPUVertexFormat::Unorm16 => Self::Unorm16,
526526
GPUVertexFormat::Unorm16x2 => Self::Unorm16x2,
527527
GPUVertexFormat::Unorm16x4 => Self::Unorm16x4,
528-
//GPUVertexFormat::Snorm16 => Self::Snorm16,
528+
GPUVertexFormat::Snorm16 => Self::Snorm16,
529529
GPUVertexFormat::Snorm16x2 => Self::Snorm16x2,
530530
GPUVertexFormat::Snorm16x4 => Self::Snorm16x4,
531-
//GPUVertexFormat::Float16 => Self::Float16,
531+
GPUVertexFormat::Float16 => Self::Float16,
532532
GPUVertexFormat::Float16x2 => Self::Float16x2,
533533
GPUVertexFormat::Float16x4 => Self::Float16x4,
534534
GPUVertexFormat::Float32 => Self::Float32,
@@ -544,7 +544,7 @@ impl From<GPUVertexFormat> for wgpu_types::VertexFormat {
544544
GPUVertexFormat::Sint32x3 => Self::Sint32x3,
545545
GPUVertexFormat::Sint32x4 => Self::Sint32x4,
546546
GPUVertexFormat::Unorm1010102 => Self::Unorm10_10_10_2,
547-
//GPUVertexFormat::Unorm8x4Bgra => Self::Unorm8x4Bgra,
547+
GPUVertexFormat::Unorm8x4Bgra => Self::Unorm8x4Bgra,
548548
}
549549
}
550550
}

0 commit comments

Comments
 (0)