diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/VertexArray9.h | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/VertexArray9.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/VertexArray9.h b/gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/VertexArray9.h new file mode 100644 index 0000000000..a9c1ee7d4b --- /dev/null +++ b/gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d9/VertexArray9.h @@ -0,0 +1,57 @@ +// +// Copyright 2014 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. +// + +// VertexArray9.h: Defines the rx::VertexArray9 class which implements rx::VertexArrayImpl. + +#ifndef LIBANGLE_RENDERER_D3D_D3D9_VERTEXARRAY9_H_ +#define LIBANGLE_RENDERER_D3D_D3D9_VERTEXARRAY9_H_ + +#include "libANGLE/Context.h" +#include "libANGLE/renderer/VertexArrayImpl.h" +#include "libANGLE/renderer/d3d/d3d9/Context9.h" +#include "libANGLE/renderer/d3d/d3d9/Renderer9.h" + +namespace rx +{ +class Renderer9; + +class VertexArray9 : public VertexArrayImpl +{ + public: + VertexArray9(const gl::VertexArrayState &data) : VertexArrayImpl(data) {} + + angle::Result syncState(const gl::Context *context, + const gl::VertexArray::DirtyBits &dirtyBits, + gl::VertexArray::DirtyAttribBitsArray *attribBits, + gl::VertexArray::DirtyBindingBitsArray *bindingBits) override; + + ~VertexArray9() override {} + + Serial getCurrentStateSerial() const { return mCurrentStateSerial; } + + private: + Serial mCurrentStateSerial; +}; + +inline angle::Result VertexArray9::syncState(const gl::Context *context, + const gl::VertexArray::DirtyBits &dirtyBits, + gl::VertexArray::DirtyAttribBitsArray *attribBits, + gl::VertexArray::DirtyBindingBitsArray *bindingBits) +{ + + ASSERT(dirtyBits.any()); + Renderer9 *renderer = GetImplAs<Context9>(context)->getRenderer(); + mCurrentStateSerial = renderer->generateSerial(); + + // Clear the dirty bits in the back-end here. + memset(attribBits, 0, sizeof(gl::VertexArray::DirtyAttribBitsArray)); + memset(bindingBits, 0, sizeof(gl::VertexArray::DirtyBindingBitsArray)); + + return angle::Result::Continue; +} +} // namespace rx + +#endif // LIBANGLE_RENDERER_D3D_D3D9_VERTEXARRAY9_H_ |