Skip to content

Commit

Permalink
Vertex inputs: push-model with sparse arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
kainino0x committed Mar 25, 2019
1 parent 678d728 commit b66b4be
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions design/sketch.webidl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
typedef long i32;
typedef unsigned long u32;
typedef unsigned long long u64;
typedef u32 GPUShaderAttributeLocation;

dictionary GPUColor {
float r;
Expand Down Expand Up @@ -404,7 +405,7 @@ dictionary GPUDepthStencilStateDescriptor {
u32 stencilWriteMask;
};

// InputState
// Vertex Input

enum GPUIndexFormat {
"uint16",
Expand Down Expand Up @@ -484,23 +485,20 @@ enum GPUInputStepMode {
};

dictionary GPUVertexAttributeDescriptor {
u32 shaderLocation;
u32 inputSlot;
u64 offset;
GPUVertexFormat format;
GPUShaderAttributeLocation shaderLocation;
};

dictionary GPUVertexInputDescriptor {
u32 inputSlot;
dictionary GPUVertexBufferDescriptor {
u64 stride;
GPUInputStepMode stepMode;
sequence<GPUVertexAttributeDescriptor> attributes;
};

dictionary GPUInputStateDescriptor {
dictionary GPUVertexInputDescriptor {
GPUIndexFormat indexFormat;

sequence<GPUVertexAttributeDescriptor> attributes;
sequence<GPUVertexInputDescriptor> inputs;
sequence<GPUVertexBufferDescriptor?> vertexBuffers;
};

// ShaderModule
Expand Down Expand Up @@ -552,7 +550,7 @@ dictionary GPURenderPipelineDescriptor : GPUPipelineDescriptorBase {
GPURasterizationStateDescriptor rasterizationState;
sequence<GPUColorStateDescriptor> colorStates;
GPUDepthStencilStateDescriptor? depthStencilState;
GPUInputStateDescriptor inputState;
GPUVertexInputDescriptor vertexInput;

// Number of MSAA samples
u32 sampleCount;
Expand Down

0 comments on commit b66b4be

Please sign in to comment.