Construct VertexAttributeDescriptor, in order to match web idl

The parameters about vertex attribute were encapsulated in
VertexAttributeDescriptor in web idl. This change construct
this descriptor accordingly.

BUG=dawn:107

Change-Id: Ia1c6e53af951d8f2a0c0b69bdca09291c2661e50
Reviewed-on: https://dawn-review.googlesource.com/c/4620
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:
Yunchao He
2019-02-14 00:35:39 +00:00
committed by Commit Bot service account
parent 445869d2b0
commit b2207737ab
18 changed files with 207 additions and 73 deletions

View File

@@ -29,8 +29,8 @@ namespace dawn_native { namespace opengl {
auto attribute = GetAttribute(location);
glEnableVertexAttribArray(location);
attributesUsingInput[attribute.bindingSlot][location] = true;
auto input = GetInput(attribute.bindingSlot);
attributesUsingInput[attribute.inputSlot][location] = true;
auto input = GetInput(attribute.inputSlot);
if (input.stride == 0) {
// Emulate a stride of zero (constant vertex attribute) by