diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-07-25 15:09:57 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-07-25 15:09:57 +0000 |
| commit | 404459e2cb9a17e94ee7d26c22fbe2485828b496 (patch) | |
| tree | 7b81d6ed6fa0612a35443b91e7b7948c51d824c5 /Graphics/GraphicsEngineOpenGL | |
| parent | Few improvements to RefCntAutoPtr & DeviceContextBase::SetPipelineState (diff) | |
| download | DiligentCore-404459e2cb9a17e94ee7d26c22fbe2485828b496.tar.gz DiligentCore-404459e2cb9a17e94ee7d26c22fbe2485828b496.zip | |
Improved performance of DeviceObjectBase::Release()
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
12 files changed, 40 insertions, 35 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.h index eb3b2de5..69b6d7f9 100644 --- a/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.h +++ b/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.h @@ -29,7 +29,7 @@ #include "AsyncWritableResource.h" #include "BaseInterfacesGL.h" #include "BufferViewGLImpl.h" - +#include "RenderDeviceGLImpl.h" namespace Diligent { @@ -37,14 +37,14 @@ namespace Diligent class FixedBlockMemoryAllocator; /// Implementation of the Diligent::IBufferGL interface -class BufferGLImpl : public BufferBase<IBufferGL, BufferViewGLImpl, FixedBlockMemoryAllocator>, public AsyncWritableResource +class BufferGLImpl : public BufferBase<IBufferGL, RenderDeviceGLImpl, BufferViewGLImpl, FixedBlockMemoryAllocator>, public AsyncWritableResource { public: - using TBufferBase = BufferBase<IBufferGL, BufferViewGLImpl, FixedBlockMemoryAllocator>; + using TBufferBase = BufferBase<IBufferGL, RenderDeviceGLImpl, BufferViewGLImpl, FixedBlockMemoryAllocator>; BufferGLImpl(IReferenceCounters *pRefCounters, FixedBlockMemoryAllocator &BuffViewObjMemAllocator, - class RenderDeviceGLImpl *pDeviceGL, + RenderDeviceGLImpl *pDeviceGL, const BufferDesc& BuffDesc, const BufferData& BuffData, bool bIsDeviceInternal); diff --git a/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.h index 28cca382..f30e44b7 100644 --- a/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.h +++ b/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.h @@ -28,6 +28,7 @@ #include "BufferViewBase.h" #include "RenderDevice.h" #include "GLObjectWrapper.h" +#include "RenderDeviceGLImpl.h" namespace Diligent { @@ -39,13 +40,13 @@ class BufferGLImpl; struct BufferViewDesc; /// Implementation of the Diligent::IBufferViewGL interface -class BufferViewGLImpl : public BufferViewBase<IBufferViewGL> +class BufferViewGLImpl : public BufferViewBase<IBufferViewGL, RenderDeviceGLImpl> { public: - using TBuffViewBase = BufferViewBase<IBufferViewGL>; + using TBuffViewBase = BufferViewBase<IBufferViewGL, RenderDeviceGLImpl>; BufferViewGLImpl( IReferenceCounters *pRefCounters, - IRenderDevice *pDevice, + RenderDeviceGLImpl *pDevice, IDeviceContext *pContext, const BufferViewDesc& ViewDesc, BufferGLImpl *pBuffer, diff --git a/Graphics/GraphicsEngineOpenGL/include/FenceGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/FenceGLImpl.h index e62a2a5c..a87e8eb1 100644 --- a/Graphics/GraphicsEngineOpenGL/include/FenceGLImpl.h +++ b/Graphics/GraphicsEngineOpenGL/include/FenceGLImpl.h @@ -31,6 +31,7 @@ #include "RenderDeviceGL.h" #include "FenceBase.h" #include "GLObjectWrapper.h" +#include "RenderDeviceGLImpl.h" namespace Diligent { @@ -38,13 +39,13 @@ namespace Diligent class FixedBlockMemoryAllocator; /// Implementation of the Diligent::IFenceGL interface -class FenceGLImpl : public FenceBase<IFenceGL> +class FenceGLImpl : public FenceBase<IFenceGL, RenderDeviceGLImpl> { public: - using TFenceBase = FenceBase<IFenceGL>; + using TFenceBase = FenceBase<IFenceGL, RenderDeviceGLImpl>; FenceGLImpl(IReferenceCounters* pRefCounters, - IRenderDevice* pDevice, + RenderDeviceGLImpl* pDevice, const FenceDesc& Desc); ~FenceGLImpl(); diff --git a/Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.h index 6e48b7b8..6730e89e 100644 --- a/Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.h +++ b/Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.h @@ -29,6 +29,7 @@ #include "GLProgram.h" #include "GLObjectWrapper.h" #include "GLContext.h" +#include "RenderDeviceGLImpl.h" namespace Diligent { @@ -36,12 +37,12 @@ namespace Diligent class FixedBlockMemoryAllocator; /// Implementation of the Diligent::IPipelineStateGL interface -class PipelineStateGLImpl : public PipelineStateBase<IPipelineStateGL, IGLDeviceBaseInterface> +class PipelineStateGLImpl : public PipelineStateBase<IPipelineStateGL, RenderDeviceGLImpl> { public: - using TPipelineStateBase = PipelineStateBase<IPipelineStateGL, IGLDeviceBaseInterface>; + using TPipelineStateBase = PipelineStateBase<IPipelineStateGL, RenderDeviceGLImpl>; - PipelineStateGLImpl(IReferenceCounters *pRefCounters, class RenderDeviceGLImpl *pDeviceGL, const PipelineStateDesc& PipelineDesc, bool IsDeviceInternal = false); + PipelineStateGLImpl(IReferenceCounters *pRefCounters, RenderDeviceGLImpl *pDeviceGL, const PipelineStateDesc& PipelineDesc, bool IsDeviceInternal = false); ~PipelineStateGLImpl(); /// Queries the specific interface, see IObject::QueryInterface() for details diff --git a/Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.h index 19e3a480..b2b33392 100644 --- a/Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.h +++ b/Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.h @@ -28,18 +28,19 @@ #include "SamplerBase.h" #include "RenderDevice.h" #include "GLObjectWrapper.h" +#include "RenderDeviceGLImpl.h" namespace Diligent { class FixedBlockMemoryAllocator; /// Implementation of the Diligent::ISamplerGL interface -class SamplerGLImpl : public SamplerBase<ISamplerGL, IGLDeviceBaseInterface> +class SamplerGLImpl : public SamplerBase<ISamplerGL, RenderDeviceGLImpl> { public: - using TSamplerBase = SamplerBase<ISamplerGL, IGLDeviceBaseInterface>; + using TSamplerBase = SamplerBase<ISamplerGL, RenderDeviceGLImpl>; - SamplerGLImpl( IReferenceCounters *pRefCounters, class RenderDeviceGLImpl *pDeviceGL, const SamplerDesc& SamplerDesc, bool bIsDeviceInternal = false ); + SamplerGLImpl( IReferenceCounters *pRefCounters, RenderDeviceGLImpl *pDeviceGL, const SamplerDesc& SamplerDesc, bool bIsDeviceInternal = false ); ~SamplerGLImpl(); virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface ); diff --git a/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h index cf0116c5..cfdad4fd 100644 --- a/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h +++ b/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h @@ -29,6 +29,7 @@ #include "RenderDevice.h" #include "GLObjectWrapper.h" #include "GLProgram.h" +#include "RenderDeviceGLImpl.h" namespace Diligent { @@ -64,12 +65,12 @@ inline GLenum ShaderTypeToGLShaderBit(SHADER_TYPE ShaderType) } /// Implementation of the Diligent::IShaderGL interface -class ShaderGLImpl : public ShaderBase<IShaderGL, IGLDeviceBaseInterface> +class ShaderGLImpl : public ShaderBase<IShaderGL, RenderDeviceGLImpl> { public: - using TShaderBase = ShaderBase<IShaderGL, IGLDeviceBaseInterface>; + using TShaderBase = ShaderBase<IShaderGL, RenderDeviceGLImpl>; - ShaderGLImpl( IReferenceCounters *pRefCounters, class RenderDeviceGLImpl *pDeviceGL, const ShaderCreationAttribs &ShaderCreationAttribs, bool bIsDeviceInternal = false ); + ShaderGLImpl( IReferenceCounters *pRefCounters, RenderDeviceGLImpl *pDeviceGL, const ShaderCreationAttribs &ShaderCreationAttribs, bool bIsDeviceInternal = false ); ~ShaderGLImpl(); virtual void BindResources( IResourceMapping* pResourceMapping, Uint32 Flags )override; diff --git a/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h b/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h index f8be69c2..1af707a0 100644 --- a/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h +++ b/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h @@ -30,7 +30,7 @@ #include "GLObjectWrapper.h" #include "TextureViewGLImpl.h" #include "AsyncWritableResource.h" - +#include "RenderDeviceGLImpl.h" namespace Diligent { @@ -38,14 +38,14 @@ namespace Diligent class FixedBlockMemoryAllocator; /// Base implementation of the Diligent::ITextureGL interface -class TextureBaseGL : public TextureBase<ITextureGL, TextureViewGLImpl, FixedBlockMemoryAllocator>, public AsyncWritableResource +class TextureBaseGL : public TextureBase<ITextureGL, RenderDeviceGLImpl, TextureViewGLImpl, FixedBlockMemoryAllocator>, public AsyncWritableResource { public: - using TTextureBase = TextureBase<ITextureGL, TextureViewGLImpl, FixedBlockMemoryAllocator>; + using TTextureBase = TextureBase<ITextureGL, RenderDeviceGLImpl, TextureViewGLImpl, FixedBlockMemoryAllocator>; TextureBaseGL(IReferenceCounters *pRefCounters, FixedBlockMemoryAllocator& TexViewObjAllocator, - class RenderDeviceGLImpl *pDeviceGL, + RenderDeviceGLImpl *pDeviceGL, const TextureDesc &TexDesc, GLenum BindTarget, const TextureData &InitData = TextureData(), diff --git a/Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.h index 8675a86c..3bff9a36 100644 --- a/Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.h +++ b/Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.h @@ -28,23 +28,24 @@ #include "TextureViewBase.h" #include "RenderDevice.h" #include "GLObjectWrapper.h" +#include "RenderDeviceGLImpl.h" namespace Diligent { class FixedBlockMemoryAllocator; /// Implementation of the Diligent::ITextureViewGL interface -class TextureViewGLImpl : public TextureViewBase<ITextureViewGL> +class TextureViewGLImpl : public TextureViewBase<ITextureViewGL, RenderDeviceGLImpl> { public: - using TTextureViewBase = TextureViewBase<ITextureViewGL>; + using TTextureViewBase = TextureViewBase<ITextureViewGL, RenderDeviceGLImpl>; TextureViewGLImpl(IReferenceCounters *pRefCounters, - class IRenderDevice *pDevice, - const struct TextureViewDesc& ViewDesc, - class TextureBaseGL *pTexture, - bool bCreateGLViewTex, - bool bIsDefaultView ); + RenderDeviceGLImpl *pDevice, + const struct TextureViewDesc& ViewDesc, + class TextureBaseGL *pTexture, + bool bCreateGLViewTex, + bool bIsDefaultView ); ~TextureViewGLImpl(); virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface )override; diff --git a/Graphics/GraphicsEngineOpenGL/include/VAOCache.h b/Graphics/GraphicsEngineOpenGL/include/VAOCache.h index 2160d97f..26e34299 100644 --- a/Graphics/GraphicsEngineOpenGL/include/VAOCache.h +++ b/Graphics/GraphicsEngineOpenGL/include/VAOCache.h @@ -31,7 +31,6 @@ #include "HashUtils.h" #include "DeviceContextBase.h" #include "BaseInterfacesGL.h" -#include "BufferGLImpl.h" namespace Diligent { @@ -51,7 +50,7 @@ public: const GLObjectWrappers::GLVertexArrayObj& GetVAO( IPipelineState *pPSO, IBuffer *pIndexBuffer, - VertexStreamInfo<BufferGLImpl> VertexStreams[], + VertexStreamInfo<class BufferGLImpl> VertexStreams[], Uint32 NumVertexStreams, class GLContextState &GLContextState); const GLObjectWrappers::GLVertexArrayObj& GetEmptyVAO(); diff --git a/Graphics/GraphicsEngineOpenGL/src/BufferViewGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/BufferViewGLImpl.cpp index 46ee6ca2..51e2e2e1 100644 --- a/Graphics/GraphicsEngineOpenGL/src/BufferViewGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/BufferViewGLImpl.cpp @@ -32,7 +32,7 @@ namespace Diligent { BufferViewGLImpl::BufferViewGLImpl( IReferenceCounters *pRefCounters, - IRenderDevice *pDevice, + RenderDeviceGLImpl *pDevice, IDeviceContext *pContext, const BufferViewDesc& ViewDesc, BufferGLImpl* pBuffer, diff --git a/Graphics/GraphicsEngineOpenGL/src/FenceGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/FenceGLImpl.cpp index 3c222b41..ae284154 100644 --- a/Graphics/GraphicsEngineOpenGL/src/FenceGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/FenceGLImpl.cpp @@ -30,7 +30,7 @@ namespace Diligent { FenceGLImpl :: FenceGLImpl(IReferenceCounters* pRefCounters, - IRenderDevice* pDevice, + RenderDeviceGLImpl* pDevice, const FenceDesc& Desc) : TFenceBase(pRefCounters, pDevice, Desc) { diff --git a/Graphics/GraphicsEngineOpenGL/src/TextureViewGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/TextureViewGLImpl.cpp index c955a33c..60b94439 100644 --- a/Graphics/GraphicsEngineOpenGL/src/TextureViewGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/TextureViewGLImpl.cpp @@ -31,7 +31,7 @@ namespace Diligent { TextureViewGLImpl::TextureViewGLImpl( IReferenceCounters *pRefCounters, - IRenderDevice *pDevice, + RenderDeviceGLImpl *pDevice, const TextureViewDesc& ViewDesc, TextureBaseGL* pTexture, bool bCreateGLViewTex, |
