tor-browser

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

ShaderExecutableD3D.h (1289B)


      1 //
      2 // Copyright 2012 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 // ShaderExecutable.h: Defines a class to contain D3D shader executable
      8 // implementation details.
      9 
     10 #ifndef LIBANGLE_RENDERER_D3D_SHADEREXECUTABLED3D_H_
     11 #define LIBANGLE_RENDERER_D3D_SHADEREXECUTABLED3D_H_
     12 
     13 #include "common/MemoryBuffer.h"
     14 #include "common/debug.h"
     15 
     16 #include <cstdint>
     17 #include <vector>
     18 
     19 namespace rx
     20 {
     21 
     22 class ShaderExecutableD3D : angle::NonCopyable
     23 {
     24  public:
     25    ShaderExecutableD3D(const void *function, size_t length);
     26    virtual ~ShaderExecutableD3D();
     27 
     28    const uint8_t *getFunction() const;
     29 
     30    size_t getLength() const;
     31 
     32    const std::string &getDebugInfo() const;
     33 
     34    void appendDebugInfo(const std::string &info);
     35 
     36  private:
     37    std::vector<uint8_t> mFunctionBuffer;
     38    std::string mDebugInfo;
     39 };
     40 
     41 class UniformStorageD3D : angle::NonCopyable
     42 {
     43  public:
     44    UniformStorageD3D(size_t initialSize);
     45    virtual ~UniformStorageD3D();
     46 
     47    size_t size() const;
     48 
     49    uint8_t *getDataPointer(unsigned int registerIndex, unsigned int registerElement);
     50 
     51  private:
     52    angle::MemoryBuffer mUniformData;
     53 };
     54 
     55 }  // namespace rx
     56 
     57 #endif  // LIBANGLE_RENDERER_D3D_SHADEREXECUTABLED3D_H_