summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/libANGLE/renderer/d3d/ShaderD3D.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/libANGLE/renderer/d3d/ShaderD3D.h')
-rw-r--r--src/3rdparty/angle/src/libANGLE/renderer/d3d/ShaderD3D.h50
1 files changed, 19 insertions, 31 deletions
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/ShaderD3D.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/ShaderD3D.h
index d0237b5985..47a73dc27b 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/ShaderD3D.h
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/ShaderD3D.h
@@ -10,8 +10,6 @@
#define LIBANGLE_RENDERER_D3D_SHADERD3D_H_
#include "libANGLE/renderer/ShaderImpl.h"
-#include "libANGLE/renderer/Workarounds.h"
-#include "libANGLE/Shader.h"
#include <map>
@@ -19,51 +17,42 @@ namespace rx
{
class DynamicHLSL;
class RendererD3D;
+struct D3DCompilerWorkarounds;
class ShaderD3D : public ShaderImpl
{
- friend class DynamicHLSL;
-
public:
- ShaderD3D(GLenum type);
+ ShaderD3D(const gl::Shader::Data &data);
virtual ~ShaderD3D();
- static ShaderD3D *makeShaderD3D(ShaderImpl *impl);
- static const ShaderD3D *makeShaderD3D(const ShaderImpl *impl);
-
// ShaderImpl implementation
- virtual std::string getDebugInfo() const;
+ int 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
- virtual void uncompile();
- void resetVaryingsRegisterAssignment();
+ void uncompile();
unsigned int getUniformRegister(const std::string &uniformName) const;
unsigned int getInterfaceBlockRegister(const std::string &blockName) const;
- void appendDebugInfo(const std::string &info) { mDebugInfo += info; }
+ void appendDebugInfo(const std::string &info) const { mDebugInfo += info; }
void generateWorkarounds(D3DCompilerWorkarounds *workarounds) const;
- int getShaderVersion() const { return mShaderVersion; }
- bool usesDepthRange() const { return mUsesDepthRange; }
+
+ bool usesMultipleRenderTargets() const { return mUsesMultipleRenderTargets; }
+ bool usesFragColor() const { return mUsesFragColor; }
+ bool usesFragData() const { return mUsesFragData; }
+ bool usesFragCoord() const { return mUsesFragCoord; }
+ bool usesFrontFacing() const { return mUsesFrontFacing; }
bool usesPointSize() const { return mUsesPointSize; }
+ bool usesPointCoord() const { return mUsesPointCoord; }
+ bool usesDepthRange() const { return mUsesDepthRange; }
+ bool usesFragDepth() const { return mUsesFragDepth; }
bool usesDeferredInit() const { return mUsesDeferredInit; }
- GLenum getShaderType() const;
ShShaderOutput getCompilerOutputType() const;
- virtual bool compile(gl::Compiler *compiler, const std::string &source);
-
private:
- void compileToHLSL(ShHandle compiler, const std::string &source);
- void parseVaryings(ShHandle compiler);
-
- void parseAttributes(ShHandle compiler);
-
- static bool compareVarying(const gl::PackedVarying &x, const gl::PackedVarying &y);
-
- GLenum mShaderType;
-
- int mShaderVersion;
-
bool mUsesMultipleRenderTargets;
bool mUsesFragColor;
bool mUsesFragData;
@@ -79,11 +68,10 @@ class ShaderD3D : public ShaderImpl
bool mRequiresIEEEStrictCompiling;
ShShaderOutput mCompilerOutputType;
- std::string mDebugInfo;
+ mutable std::string mDebugInfo;
std::map<std::string, unsigned int> mUniformRegisterMap;
std::map<std::string, unsigned int> mInterfaceBlockRegisterMap;
};
-
}
-#endif // LIBANGLE_RENDERER_D3D_SHADERD3D_H_
+#endif // LIBANGLE_RENDERER_D3D_SHADERD3D_H_