diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /src/3rdparty/angle/src/libANGLE/renderer/d3d/ShaderD3D.h | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'src/3rdparty/angle/src/libANGLE/renderer/d3d/ShaderD3D.h')
-rw-r--r-- | src/3rdparty/angle/src/libANGLE/renderer/d3d/ShaderD3D.h | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/ShaderD3D.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/ShaderD3D.h index 47a73dc27b..f7b0b20db4 100644 --- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/ShaderD3D.h +++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/ShaderD3D.h @@ -13,31 +13,50 @@ #include <map> +namespace angle +{ +struct CompilerWorkaroundsD3D; +struct WorkaroundsD3D; +} + +namespace gl +{ +struct Extensions; +} + namespace rx { class DynamicHLSL; class RendererD3D; -struct D3DCompilerWorkarounds; +struct D3DUniform; class ShaderD3D : public ShaderImpl { public: - ShaderD3D(const gl::Shader::Data &data); - virtual ~ShaderD3D(); + ShaderD3D(const gl::ShaderState &data, + const angle::WorkaroundsD3D &workarounds, + const gl::Extensions &extensions); + ~ShaderD3D() override; // ShaderImpl implementation - int prepareSourceAndReturnOptions(std::stringstream *sourceStream, - std::string *sourcePath) override; + ShCompileOptions prepareSourceAndReturnOptions(std::stringstream *sourceStream, + std::string *sourcePath) override; bool postTranslateCompile(gl::Compiler *compiler, std::string *infoLog) override; std::string getDebugInfo() const override; // D3D-specific methods void uncompile(); + + bool hasUniform(const std::string &name) const; + + // Query regular uniforms with their name. Query sampler fields of structs with field selection + // using dot (.) operator. unsigned int getUniformRegister(const std::string &uniformName) const; - unsigned int getInterfaceBlockRegister(const std::string &blockName) const; + + unsigned int getUniformBlockRegister(const std::string &blockName) const; void appendDebugInfo(const std::string &info) const { mDebugInfo += info; } - void generateWorkarounds(D3DCompilerWorkarounds *workarounds) const; + void generateWorkarounds(angle::CompilerWorkaroundsD3D *workarounds) const; bool usesMultipleRenderTargets() const { return mUsesMultipleRenderTargets; } bool usesFragColor() const { return mUsesFragColor; } @@ -48,7 +67,8 @@ class ShaderD3D : public ShaderImpl bool usesPointCoord() const { return mUsesPointCoord; } bool usesDepthRange() const { return mUsesDepthRange; } bool usesFragDepth() const { return mUsesFragDepth; } - bool usesDeferredInit() const { return mUsesDeferredInit; } + bool usesViewID() const { return mUsesViewID; } + bool hasANGLEMultiviewEnabled() const { return mHasANGLEMultiviewEnabled; } ShShaderOutput getCompilerOutputType() const; @@ -62,16 +82,18 @@ class ShaderD3D : public ShaderImpl bool mUsesPointCoord; bool mUsesDepthRange; bool mUsesFragDepth; + bool mHasANGLEMultiviewEnabled; + bool mUsesViewID; bool mUsesDiscardRewriting; bool mUsesNestedBreak; - bool mUsesDeferredInit; bool mRequiresIEEEStrictCompiling; ShShaderOutput mCompilerOutputType; mutable std::string mDebugInfo; std::map<std::string, unsigned int> mUniformRegisterMap; - std::map<std::string, unsigned int> mInterfaceBlockRegisterMap; + std::map<std::string, unsigned int> mUniformBlockRegisterMap; + ShCompileOptions mAdditionalOptions; }; -} +} // namespace rx #endif // LIBANGLE_RENDERER_D3D_SHADERD3D_H_ |