Hash :
84492ff3
Author :
Date :
2024-09-10T13:11:07
Sync vertex attributs in VertexArrayWgpu. This change only sets vertex attributes within VertexArrayWgpu and sets them in the render pipeline description owned by the context. It does not yet set attributes in the output pipeline created in CreatePipeline, as vertex buffers are also not set yet. Bug: angleproject:359823692 Change-Id: I1c3848e15d790026d53d4ab5614b1125f773e06a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5781788 Commit-Queue: Liza Burakova <liza@chromium.org> Reviewed-by: Matthew Denton <mpdenton@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
//
// Copyright 2024 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// VertexArrayWgpu.h:
// Defines the class interface for VertexArrayWgpu, implementing VertexArrayImpl.
//
#ifndef LIBANGLE_RENDERER_WGPU_VERTEXARRAYWGPU_H_
#define LIBANGLE_RENDERER_WGPU_VERTEXARRAYWGPU_H_
#include "libANGLE/renderer/VertexArrayImpl.h"
#include "libANGLE/renderer/wgpu/wgpu_pipeline_state.h"
namespace rx
{
class VertexArrayWgpu : public VertexArrayImpl
{
public:
VertexArrayWgpu(const gl::VertexArrayState &data);
angle::Result syncState(const gl::Context *context,
const gl::VertexArray::DirtyBits &dirtyBits,
gl::VertexArray::DirtyAttribBitsArray *attribBits,
gl::VertexArray::DirtyBindingBitsArray *bindingBits) override;
private:
angle::Result syncDirtyAttrib(ContextWgpu *contextWgpu,
const gl::VertexAttribute &attrib,
const gl::VertexBinding &binding,
size_t attribIndex);
gl::AttribArray<webgpu::PackedVertexAttribute> mCurrentAttribs;
};
} // namespace rx
#endif // LIBANGLE_RENDERER_WGPU_VERTEXARRAYWGPU_H_