tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

TransformFeedback11.h (1848B)


      1 //
      2 // Copyright 2014 The ANGLE Project Authors. All rights reserved.
      3 // Use of this source code is governed by a BSD-style license that can be
      4 // found in the LICENSE file.
      5 //
      6 
      7 // TransformFeedback11.h: Implements the abstract rx::TransformFeedbackImpl class.
      8 
      9 #ifndef LIBANGLE_RENDERER_D3D_D3D11_TRANSFORMFEEDBACK11_H_
     10 #define LIBANGLE_RENDERER_D3D_D3D11_TRANSFORMFEEDBACK11_H_
     11 
     12 #include "common/platform.h"
     13 
     14 #include "libANGLE/Error.h"
     15 #include "libANGLE/angletypes.h"
     16 #include "libANGLE/renderer/TransformFeedbackImpl.h"
     17 #include "libANGLE/renderer/serial_utils.h"
     18 
     19 namespace rx
     20 {
     21 
     22 class Renderer11;
     23 
     24 class TransformFeedback11 : public TransformFeedbackImpl
     25 {
     26  public:
     27    TransformFeedback11(const gl::TransformFeedbackState &state, Renderer11 *renderer);
     28    ~TransformFeedback11() override;
     29 
     30    angle::Result begin(const gl::Context *context, gl::PrimitiveMode primitiveMode) override;
     31    angle::Result end(const gl::Context *context) override;
     32    angle::Result pause(const gl::Context *context) override;
     33    angle::Result resume(const gl::Context *context) override;
     34 
     35    angle::Result bindIndexedBuffer(const gl::Context *context,
     36                                    size_t index,
     37                                    const gl::OffsetBindingPointer<gl::Buffer> &binding) override;
     38 
     39    void onApply();
     40 
     41    bool isDirty() const;
     42 
     43    UINT getNumSOBuffers() const;
     44    angle::Result getSOBuffers(const gl::Context *context,
     45                               const std::vector<ID3D11Buffer *> **buffersOut);
     46    const std::vector<UINT> &getSOBufferOffsets() const;
     47 
     48    Serial getSerial() const;
     49 
     50  private:
     51    Renderer11 *mRenderer;
     52 
     53    bool mIsDirty;
     54    std::vector<ID3D11Buffer *> mBuffers;
     55    std::vector<UINT> mBufferOffsets;
     56 
     57    Serial mSerial;
     58 };
     59 }  // namespace rx
     60 
     61 #endif  // LIBANGLE_RENDERER_D3D_D3D11_TRANSFORMFEEDBACK11_H_