mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 15:16:16 +00:00
Construct VertexInputDescriptor, in order to match web idl
BUG=dawn:107 Change-Id: Ic219fb98a88a7ac597fbdc592f604f27b76d756b Reviewed-on: https://dawn-review.googlesource.com/c/4721 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Yunchao He <yunchao.he@intel.com>
This commit is contained in:
committed by
Commit Bot service account
parent
e7bb3fd119
commit
4dec7371a2
@@ -168,10 +168,15 @@ void init() {
|
||||
attribute2.offset = 3 * sizeof(float);
|
||||
attribute2.format = dawn::VertexFormat::FloatR32G32B32;
|
||||
|
||||
dawn::VertexInputDescriptor input;
|
||||
input.inputSlot = 0;
|
||||
input.stride = 6 * sizeof(float);
|
||||
input.stepMode = dawn::InputStepMode::Vertex;
|
||||
|
||||
auto inputState = device.CreateInputStateBuilder()
|
||||
.SetAttribute(&attribute1)
|
||||
.SetAttribute(&attribute2)
|
||||
.SetInput(0, 6 * sizeof(float), dawn::InputStepMode::Vertex)
|
||||
.SetInput(&input)
|
||||
.GetResult();
|
||||
|
||||
auto bgl = utils::MakeBindGroupLayout(
|
||||
|
||||
Reference in New Issue
Block a user