Bug 1629896 - Fix WebGPU vertex format values r=jgilbert

it wasn't matching webgpu-native or the WebIDL

Differential Revision: https://phabricator.services.mozilla.com/D70942

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dzmitry Malyshau 2020-04-14 21:21:21 +00:00
parent 51c6feba47
commit 97fcffa123
2 changed files with 60 additions and 60 deletions

View File

@ -252,36 +252,36 @@ typedef enum {
} WGPUTextureViewDimension;
typedef enum {
WGPUVertexFormat_Uchar2 = 1,
WGPUVertexFormat_Uchar4 = 3,
WGPUVertexFormat_Char2 = 5,
WGPUVertexFormat_Char4 = 7,
WGPUVertexFormat_Uchar2Norm = 9,
WGPUVertexFormat_Uchar4Norm = 11,
WGPUVertexFormat_Char2Norm = 14,
WGPUVertexFormat_Char4Norm = 16,
WGPUVertexFormat_Ushort2 = 18,
WGPUVertexFormat_Ushort4 = 20,
WGPUVertexFormat_Short2 = 22,
WGPUVertexFormat_Short4 = 24,
WGPUVertexFormat_Ushort2Norm = 26,
WGPUVertexFormat_Ushort4Norm = 28,
WGPUVertexFormat_Short2Norm = 30,
WGPUVertexFormat_Short4Norm = 32,
WGPUVertexFormat_Half2 = 34,
WGPUVertexFormat_Half4 = 36,
WGPUVertexFormat_Float = 37,
WGPUVertexFormat_Float2 = 38,
WGPUVertexFormat_Float3 = 39,
WGPUVertexFormat_Float4 = 40,
WGPUVertexFormat_Uint = 41,
WGPUVertexFormat_Uint2 = 42,
WGPUVertexFormat_Uint3 = 43,
WGPUVertexFormat_Uint4 = 44,
WGPUVertexFormat_Int = 45,
WGPUVertexFormat_Int2 = 46,
WGPUVertexFormat_Int3 = 47,
WGPUVertexFormat_Int4 = 48,
WGPUVertexFormat_Uchar2 = 0,
WGPUVertexFormat_Uchar4 = 1,
WGPUVertexFormat_Char2 = 2,
WGPUVertexFormat_Char4 = 3,
WGPUVertexFormat_Uchar2Norm = 4,
WGPUVertexFormat_Uchar4Norm = 5,
WGPUVertexFormat_Char2Norm = 6,
WGPUVertexFormat_Char4Norm = 7,
WGPUVertexFormat_Ushort2 = 8,
WGPUVertexFormat_Ushort4 = 9,
WGPUVertexFormat_Short2 = 10,
WGPUVertexFormat_Short4 = 11,
WGPUVertexFormat_Ushort2Norm = 12,
WGPUVertexFormat_Ushort4Norm = 13,
WGPUVertexFormat_Short2Norm = 14,
WGPUVertexFormat_Short4Norm = 15,
WGPUVertexFormat_Half2 = 16,
WGPUVertexFormat_Half4 = 17,
WGPUVertexFormat_Float = 18,
WGPUVertexFormat_Float2 = 19,
WGPUVertexFormat_Float3 = 20,
WGPUVertexFormat_Float4 = 21,
WGPUVertexFormat_Uint = 22,
WGPUVertexFormat_Uint2 = 23,
WGPUVertexFormat_Uint3 = 24,
WGPUVertexFormat_Uint4 = 25,
WGPUVertexFormat_Int = 26,
WGPUVertexFormat_Int2 = 27,
WGPUVertexFormat_Int3 = 28,
WGPUVertexFormat_Int4 = 29,
} WGPUVertexFormat;
typedef WGPUNonZeroU64 WGPUId_Adapter_Dummy;

View File

@ -478,36 +478,36 @@ pub struct VertexAttributeDescriptor {
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum VertexFormat {
Uchar2 = 1,
Uchar4 = 3,
Char2 = 5,
Char4 = 7,
Uchar2Norm = 9,
Uchar4Norm = 11,
Char2Norm = 14,
Char4Norm = 16,
Ushort2 = 18,
Ushort4 = 20,
Short2 = 22,
Short4 = 24,
Ushort2Norm = 26,
Ushort4Norm = 28,
Short2Norm = 30,
Short4Norm = 32,
Half2 = 34,
Half4 = 36,
Float = 37,
Float2 = 38,
Float3 = 39,
Float4 = 40,
Uint = 41,
Uint2 = 42,
Uint3 = 43,
Uint4 = 44,
Int = 45,
Int2 = 46,
Int3 = 47,
Int4 = 48,
Uchar2 = 0,
Uchar4 = 1,
Char2 = 2,
Char4 = 3,
Uchar2Norm = 4,
Uchar4Norm = 5,
Char2Norm = 6,
Char4Norm = 7,
Ushort2 = 8,
Ushort4 = 9,
Short2 = 10,
Short4 = 11,
Ushort2Norm = 12,
Ushort4Norm = 13,
Short2Norm = 14,
Short4Norm = 15,
Half2 = 16,
Half4 = 17,
Float = 18,
Float2 = 19,
Float3 = 20,
Float4 = 21,
Uint = 22,
Uint2 = 23,
Uint3 = 24,
Uint4 = 25,
Int = 26,
Int2 = 27,
Int3 = 28,
Int4 = 29,
}
bitflags::bitflags! {