diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-01-25 11:39:07 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-01-25 15:20:42 +0000 |
commit | 6c91641271e536ffaa88a1dff5127e42ee99a91e (patch) | |
tree | 703d9dd49602377ddc90cbf886aad37913f2496b /chromium/third_party/angle/src/libANGLE/renderer/d3d/RendererD3D.h | |
parent | b145b7fafd36f0c260d6a768c81fc14e32578099 (diff) | |
download | qtwebengine-chromium-6c91641271e536ffaa88a1dff5127e42ee99a91e.tar.gz |
BASELINE: Update Chromium to 49.0.2623.23
Also adds missing printing sources.
Change-Id: I3726b8f0c7d6751c9fc846096c571fadca7108cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'chromium/third_party/angle/src/libANGLE/renderer/d3d/RendererD3D.h')
-rw-r--r-- | chromium/third_party/angle/src/libANGLE/renderer/d3d/RendererD3D.h | 83 |
1 files changed, 44 insertions, 39 deletions
diff --git a/chromium/third_party/angle/src/libANGLE/renderer/d3d/RendererD3D.h b/chromium/third_party/angle/src/libANGLE/renderer/d3d/RendererD3D.h index b6c29b934b9..4a90fd12d94 100644 --- a/chromium/third_party/angle/src/libANGLE/renderer/d3d/RendererD3D.h +++ b/chromium/third_party/angle/src/libANGLE/renderer/d3d/RendererD3D.h @@ -12,7 +12,8 @@ #include "common/debug.h" #include "common/MemoryBuffer.h" #include "libANGLE/Data.h" -#include "libANGLe/formatutils.h" +#include "libANGLE/Device.h" +#include "libANGLE/formatutils.h" #include "libANGLE/renderer/Renderer.h" #include "libANGLE/renderer/d3d/VertexDataManager.h" #include "libANGLE/renderer/d3d/formatutilsD3D.h" @@ -29,15 +30,17 @@ class ConfigSet; namespace gl { +class DebugAnnotator; class InfoLog; -struct LinkedVarying; class Texture; -class DebugAnnotator; +struct LinkedVarying; } namespace rx { struct D3DUniform; +struct D3DVarying; +class DeviceD3D; class EGLImageD3D; class ImageD3D; class IndexBuffer; @@ -53,7 +56,8 @@ enum ShaderType { SHADER_VERTEX, SHADER_PIXEL, - SHADER_GEOMETRY + SHADER_GEOMETRY, + SHADER_TYPE_MAX }; struct DeviceIdentifier @@ -139,7 +143,11 @@ class RendererD3D : public Renderer, public BufferFactoryD3D // Direct3D Specific methods virtual DeviceIdentifier getAdapterIdentifier() const = 0; - virtual SwapChainD3D *createSwapChain(NativeWindow nativeWindow, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat) = 0; + virtual SwapChainD3D *createSwapChain(NativeWindow nativeWindow, + HANDLE shareHandle, + GLenum backBufferFormat, + GLenum depthBufferFormat, + EGLint orientation) = 0; virtual gl::Error generateSwizzle(gl::Texture *texture) = 0; virtual gl::Error setSamplerState(gl::SamplerType type, int index, gl::Texture *texture, const gl::SamplerState &sampler) = 0; @@ -149,26 +157,21 @@ class RendererD3D : public Renderer, public BufferFactoryD3D const std::vector<GLint> &vertexUniformBuffers, const std::vector<GLint> &fragmentUniformBuffers) = 0; - virtual gl::Error setRasterizerState(const gl::RasterizerState &rasterState) = 0; - virtual gl::Error setBlendState(const gl::Framebuffer *framebuffer, const gl::BlendState &blendState, const gl::ColorF &blendColor, - unsigned int sampleMask) = 0; - virtual gl::Error setDepthStencilState(const gl::DepthStencilState &depthStencilState, int stencilRef, - int stencilBackRef, bool frontFaceCCW) = 0; - - virtual void setScissorRectangle(const gl::Rectangle &scissor, bool enabled) = 0; - virtual void setViewport(const gl::Rectangle &viewport, float zNear, float zFar, GLenum drawMode, GLenum frontFace, - bool ignoreViewport) = 0; + virtual gl::Error updateState(const gl::Data &data, GLenum drawMode) = 0; virtual gl::Error applyRenderTarget(const gl::Framebuffer *frameBuffer) = 0; - virtual gl::Error applyShaders(gl::Program *program, - const gl::Framebuffer *framebuffer, - bool rasterizerDiscard, - bool transformFeedbackActive) = 0; virtual gl::Error applyUniforms(const ProgramD3D &programD3D, + GLenum drawMode, const std::vector<D3DUniform *> &uniformArray) = 0; virtual bool applyPrimitiveType(GLenum primitiveType, GLsizei elementCount, bool usesPointSize) = 0; virtual gl::Error applyVertexBuffer(const gl::State &state, GLenum mode, GLint first, GLsizei count, GLsizei instances, SourceIndexData *sourceIndexInfo) = 0; - virtual gl::Error applyIndexBuffer(const GLvoid *indices, gl::Buffer *elementArrayBuffer, GLsizei count, GLenum mode, GLenum type, TranslatedIndexData *indexInfo, SourceIndexData *sourceIndexInfo) = 0; + virtual gl::Error applyIndexBuffer(const gl::Data &data, + const GLvoid *indices, + GLsizei count, + GLenum mode, + GLenum type, + TranslatedIndexData *indexInfo, + SourceIndexData *sourceIndexInfo) = 0; virtual void applyTransformFeedbackBuffers(const gl::State& state) = 0; virtual void markAllStateDirty() = 0; @@ -197,12 +200,18 @@ class RendererD3D : public Renderer, public BufferFactoryD3D virtual gl::Error createRenderTargetCopy(RenderTargetD3D *source, RenderTargetD3D **outRT) = 0; // Shader operations - virtual gl::Error loadExecutable(const void *function, size_t length, ShaderType type, - const std::vector<gl::LinkedVarying> &transformFeedbackVaryings, - bool separatedOutputBuffers, ShaderExecutableD3D **outExecutable) = 0; - virtual gl::Error compileToExecutable(gl::InfoLog &infoLog, const std::string &shaderHLSL, ShaderType type, - const std::vector<gl::LinkedVarying> &transformFeedbackVaryings, - bool separatedOutputBuffers, const D3DCompilerWorkarounds &workarounds, + virtual gl::Error loadExecutable(const void *function, + size_t length, + ShaderType type, + const std::vector<D3DVarying> &streamOutVaryings, + bool separatedOutputBuffers, + ShaderExecutableD3D **outExecutable) = 0; + virtual gl::Error compileToExecutable(gl::InfoLog &infoLog, + const std::string &shaderHLSL, + ShaderType type, + const std::vector<D3DVarying> &streamOutVaryings, + bool separatedOutputBuffers, + const D3DCompilerWorkarounds &workarounds, ShaderExecutableD3D **outExectuable) = 0; virtual UniformStorageD3D *createUniformStorage(size_t storageSize) = 0; @@ -223,11 +232,6 @@ class RendererD3D : public Renderer, public BufferFactoryD3D virtual gl::Error fastCopyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTargetD3D *destRenderTarget, GLenum destinationFormat, GLenum sourcePixelsType, const gl::Box &destArea) = 0; - void syncState(const gl::State & /*state*/, const gl::State::DirtyBits &bitmask) override - { - // TODO(jmadill): implement state sync for D3D renderers; - } - // Device lost void notifyDeviceLost() override; virtual bool resetDevice() = 0; @@ -244,13 +248,17 @@ class RendererD3D : public Renderer, public BufferFactoryD3D // In D3D11, faster than calling setTexture a jillion times virtual gl::Error clearTextures(gl::SamplerType samplerType, size_t rangeStart, size_t rangeEnd) = 0; + virtual egl::Error getEGLDevice(DeviceImpl **device) = 0; + protected: virtual bool getLUID(LUID *adapterLuid) const = 0; + virtual gl::Error applyShadersImpl(const gl::Data &data, GLenum drawMode) = 0; void cleanup(); virtual void createAnnotator() = 0; + static unsigned int GetBlendSampleMask(const gl::Data &data, int samples); // dirtyPointer is a special value that will make the comparison with any valid pointer fail and force the renderer to re-apply the state. static const uintptr_t DirtyPointer; @@ -280,16 +288,14 @@ class RendererD3D : public Renderer, public BufferFactoryD3D virtual gl::Error drawArraysImpl(const gl::Data &data, GLenum mode, GLsizei count, - GLsizei instances, - bool usesPointSize) = 0; - virtual gl::Error drawElementsImpl(GLenum mode, + GLsizei instances) = 0; + virtual gl::Error drawElementsImpl(const gl::Data &data, + const TranslatedIndexData &indexInfo, + GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, - gl::Buffer *elementArrayBuffer, - const TranslatedIndexData &indexInfo, - GLsizei instances, - bool usesPointSize) = 0; + GLsizei instances) = 0; //FIXME(jmadill): std::array is currently prohibited by Chromium style guide typedef std::array<gl::Texture*, gl::IMPLEMENTATION_MAX_FRAMEBUFFER_ATTACHMENTS> FramebufferTextureArray; @@ -297,9 +303,8 @@ class RendererD3D : public Renderer, public BufferFactoryD3D gl::Error generateSwizzles(const gl::Data &data, gl::SamplerType type); gl::Error generateSwizzles(const gl::Data &data); - gl::Error applyRenderTarget(const gl::Data &data, GLenum drawMode, bool ignoreViewport); gl::Error applyState(const gl::Data &data, GLenum drawMode); - gl::Error applyShaders(const gl::Data &data); + gl::Error applyShaders(const gl::Data &data, GLenum drawMode); gl::Error applyTextures(const gl::Data &data, gl::SamplerType shaderType, const FramebufferTextureArray &framebufferTextures, size_t framebufferTextureCount); gl::Error applyTextures(const gl::Data &data); |