mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
Update VertexInput (InputState) to match the spec - Part 3
Rename num{Attribute|Buffer}s to {Attribute|Buffer}Count for VertexInput
BUG=dawn:80, dawn:107
Change-Id: I7ad62f28449e6283d5c5788dfbd5df1d1e9c813e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7861
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
67ab1ea8c7
commit
2d4b529443
@@ -120,17 +120,17 @@ void initRender() {
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
|
||||
descriptor.cVertexInput.numBuffers = 2;
|
||||
descriptor.cVertexInput.bufferCount = 2;
|
||||
descriptor.cVertexInput.cBuffers[0].stride = sizeof(Particle);
|
||||
descriptor.cVertexInput.cBuffers[0].stepMode = dawn::InputStepMode::Instance;
|
||||
descriptor.cVertexInput.cBuffers[0].numAttributes = 2;
|
||||
descriptor.cVertexInput.cBuffers[0].attributeCount = 2;
|
||||
descriptor.cVertexInput.cAttributes[0].offset = offsetof(Particle, pos);
|
||||
descriptor.cVertexInput.cAttributes[0].format = dawn::VertexFormat::Float2;
|
||||
descriptor.cVertexInput.cAttributes[1].shaderLocation = 1;
|
||||
descriptor.cVertexInput.cAttributes[1].offset = offsetof(Particle, vel);
|
||||
descriptor.cVertexInput.cAttributes[1].format = dawn::VertexFormat::Float2;
|
||||
descriptor.cVertexInput.cBuffers[1].stride = sizeof(glm::vec2);
|
||||
descriptor.cVertexInput.cBuffers[1].numAttributes = 1;
|
||||
descriptor.cVertexInput.cBuffers[1].attributeCount = 1;
|
||||
descriptor.cVertexInput.cBuffers[1].attributes = &descriptor.cVertexInput.cAttributes[2];
|
||||
descriptor.cVertexInput.cAttributes[2].shaderLocation = 2;
|
||||
descriptor.cVertexInput.cAttributes[2].format = dawn::VertexFormat::Float2;
|
||||
|
||||
Reference in New Issue
Block a user