Procházet zdrojové kódy

Adding command buffer support to DX11

BearishSun před 9 roky
rodič
revize
a872e35e8f

+ 25 - 124
Source/BansheeCore/Include/BsRenderAPI.h

@@ -34,182 +34,83 @@ namespace BansheeEngine
 	class BS_CORE_EXPORT RenderAPI
 	{
 	public:
-		/**  
-		 * @copydoc RenderAPICore::setTexture()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::setTexture() */
 		static void setTexture(CoreAccessor& accessor, GpuProgramType gptype, UINT16 texUnit, const SPtr<Texture>& texture);
 
-		/**  
-		 * @copydoc RenderAPICore::setLoadStoreTexture()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::setLoadStoreTexture() */
 		static void setLoadStoreTexture(CoreAccessor& accessor, GpuProgramType gptype, UINT16 texUnit,
 			const SPtr<Texture>& texture, const TextureSurface& surface);
 
-		/**  
-		 * @copydoc RenderAPICore::setBuffer()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::setBuffer() */
 		static void setBuffer(CoreAccessor& accessor, GpuProgramType gptype, UINT16 unit, const SPtr<GpuBuffer>& buffer,
 			bool loadStore = false);
 
-		/** 
-		 * @copydoc RenderAPICore::setSamplerState()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::setSamplerState() */
 		static void setSamplerState(CoreAccessor& accessor, GpuProgramType gptype, UINT16 texUnit, 
 			const SPtr<SamplerState>& samplerState);
 
-		/**  
-		 * @copydoc RenderAPICore::setBlendState()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::setBlendState() */
 		static void setBlendState(CoreAccessor& accessor, const SPtr<BlendState>& blendState);
 
-		/** 
-		 * @copydoc RenderAPICore::setRasterizerState()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::setRasterizerState() */
 		static void setRasterizerState(CoreAccessor& accessor, const SPtr<RasterizerState>& rasterizerState);
 
-		/** 
-		 * @copydoc RenderAPICore::setDepthStencilState()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::setDepthStencilState() */
 		static void setDepthStencilState(CoreAccessor& accessor, const SPtr<DepthStencilState>& depthStencilState, 
 			UINT32 stencilRefValue);
 
-		/** 
-		 * Sets the provided vertex buffers starting at the specified source index.	Set buffer to nullptr to clear the
-		 * buffer at the specified index.
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 * @param[in]	index		Index at which to start binding the vertex buffers.
-		 * @param[in]	buffers		A list of buffers to bind to the pipeline.
-		 */
+		/** @see RenderAPICore::setVertexBuffers() */
 		static void setVertexBuffers(CoreAccessor& accessor, UINT32 index, const Vector<SPtr<VertexBuffer>>& buffers);
-
-		/** 
-		 * @copydoc RenderAPICore::setIndexBuffer()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+
+		/** @see RenderAPICore::setIndexBuffer() */
 		static void setIndexBuffer(CoreAccessor& accessor, const SPtr<IndexBuffer>& buffer);
 
-		/** 
-		 * @copydoc RenderAPICore::setVertexDeclaration()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::setVertexDeclaration() */
 		static void setVertexDeclaration(CoreAccessor& accessor, const SPtr<VertexDeclaration>& vertexDeclaration);
 
-		/** 
-		 * @copydoc RenderAPICore::setViewport()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::setViewport() */
 		static void setViewport(CoreAccessor& accessor, const Rect2& area);
 
-		/** 
-		 * @copydoc RenderAPICore::setDrawOperation() 
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::setDrawOperation()  */
 		static void setDrawOperation(CoreAccessor& accessor, DrawOperationType op);
 
-		/** 
-		 * @copydoc RenderAPICore::setScissorRect() 
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::setScissorRect()  */
 		static void setScissorRect(CoreAccessor& accessor, UINT32 left = 0, UINT32 top = 0, UINT32 right = 800, UINT32 bottom = 600);
 
-		/** 
-		 * @copydoc RenderAPICore::setRenderTarget()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::setRenderTarget() */
 		static void setRenderTarget(CoreAccessor& accessor, const SPtr<RenderTarget>& target, bool readOnlyDepthStencil = false);
 
-		/** 
-		 * @copydoc RenderAPICore::bindGpuProgram()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::bindGpuProgram() */
 		static void bindGpuProgram(CoreAccessor& accessor, const SPtr<GpuProgram>& prg);
 
-		/** 
-		 * @copydoc RenderAPICore::unbindGpuProgram()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::unbindGpuProgram() */
 		static void unbindGpuProgram(CoreAccessor& accessor, GpuProgramType gptype);
 
-		/** 
-		 * @copydoc RenderAPICore::beginFrame()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::beginFrame() */
 		static void beginRender(CoreAccessor& accessor);
 
-		/** 
-		 * @copydoc RenderAPICore::endFrame()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::endFrame() */
 		static void endRender(CoreAccessor& accessor);
 
-		/** 
-		 * @copydoc RenderAPICore::clearRenderTarget() 
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::clearRenderTarget()  */
 		static void clearRenderTarget(CoreAccessor& accessor, UINT32 buffers, 
 			const Color& color = Color::Black, float depth = 1.0f, UINT16 stencil = 0, UINT8 targetMask = 0xFF);
 
-		/** 
-		 * @copydoc RenderAPICore::clearViewport()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::clearViewport() */
 		static void clearViewport(CoreAccessor& accessor, UINT32 buffers, const Color& color = Color::Black, 
 			float depth = 1.0f, UINT16 stencil = 0, UINT8 targetMask = 0xFF);
 
-		/** 
-		 * @copydoc RenderAPICore::swapBuffers()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::swapBuffers() */
 		static void swapBuffers(CoreAccessor& accessor, const SPtr<RenderTarget>& target);
 
-		/** 
-		 * @copydoc RenderAPICore::draw()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::draw() */
 		static void draw(CoreAccessor& accessor, UINT32 vertexOffset, UINT32 vertexCount, UINT32 instanceCount = 0);
 
-		/** 
-		 * @copydoc RenderAPICore::drawIndexed()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::drawIndexed() */
 		static void drawIndexed(CoreAccessor& accessor, UINT32 startIndex, UINT32 indexCount, UINT32 vertexOffset, 
 			UINT32 vertexCount, UINT32 instanceCount = 0);
 
-		/** 
-		 * @copydoc RenderAPICore::dispatchCompute()
-		 *
-		 * @param[in]	accessor	Accessor on which will this command be queued for execution.
-		 */
+		/** @see RenderAPICore::dispatchCompute() */
 		static void dispatchCompute(CoreAccessor& accessor, UINT32 numGroupsX, UINT32 numGroupsY = 1, UINT32 numGroupsZ = 1);
 
 		/** @copydoc RenderAPICore::getVideoModeInfo */

+ 4 - 0
Source/BansheeD3D11RenderAPI/CMakeSources.cmake

@@ -35,6 +35,8 @@ set(BS_BANSHEED3D11RENDERAPI_INC_NOFILTER
 	"Include/BsD3D11BlendState.h"
 	"Include/BsD3D11RenderAPI.h"
 	"Include/BsD3D11RenderAPIFactory.h"
+	"Include/BsD3D11CommandBuffer.h"
+	"Include/BsD3D11CommandBufferManager.h"
 )
 
 set(BS_BANSHEED3D11RENDERAPI_SRC_NOFILTER
@@ -74,6 +76,8 @@ set(BS_BANSHEED3D11RENDERAPI_SRC_NOFILTER
 	"Source/BsD3D11BlendState.cpp"
 	"Source/BsD3D11RenderAPI.cpp"
 	"Source/BsD3D11RenderAPIFactory.cpp"
+	"Source/BsD3D11CommandBuffer.cpp"
+	"Source/BsD3D11CommandBufferManager.cpp"
 )
 
 source_group("Header Files" FILES ${BS_BANSHEED3D11RENDERAPI_INC_NOFILTER})

+ 48 - 0
Source/BansheeD3D11RenderAPI/Include/BsD3D11CommandBuffer.h

@@ -0,0 +1,48 @@
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsD3D11Prerequisites.h"
+#include "BsCommandBuffer.h"
+#include "BsDrawOps.h"
+#include "BsD3D11RenderAPI.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup D3D11
+	 *  @{
+	 */
+
+	/**
+	 * Command buffer implementation for DirectX 11, which doesn't support multi-threaded command generation. Instead all
+	 * commands are stored in an internal buffer, and then sent to the actual render API when the buffer is executed.
+	 */
+	class D3D11CommandBuffer : public CommandBuffer
+	{
+	public:
+		/** Registers a new command in the command buffer. */
+		void queueCommand(const std::function<void()> command);
+
+		/** Appends all commands from the secondary buffer into this command buffer. */
+		void appendSecondary(const SPtr<D3D11CommandBuffer>& secondaryBuffer);
+
+		/** Executes all commands in the command buffer. Not supported on secondary buffer. */
+		void executeCommands();
+
+		/** Removes all commands from the command buffer. */
+		void clear();
+
+	private:
+		friend class D3D11CommandBufferManager;
+		friend class D3D11RenderAPI;
+
+		D3D11CommandBuffer(CommandBufferType type, UINT32 deviceIdx, UINT32 syncMask, bool secondary);
+
+		UINT32 mDeviceIdx;
+		Vector<std::function<void()>> mCommands;
+
+		DrawOperationType mActiveDrawOp;
+	};
+
+	/** @} */
+}

+ 28 - 0
Source/BansheeD3D11RenderAPI/Include/BsD3D11CommandBufferManager.h

@@ -0,0 +1,28 @@
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#pragma once
+
+#include "BsD3D11Prerequisites.h"
+#include "BsCommandBufferManager.h"
+
+namespace BansheeEngine
+{
+	/** @addtogroup D3D11
+	 *  @{
+	 */
+
+	/** 
+	 * Handles creation of DirectX 11 command buffers. See CommandBuffer. 
+	 *
+	 * @note Core thread only.
+	 */
+	class D3D11CommandBufferManager : public CommandBufferManager
+	{
+	public:
+		/** @copydoc CommandBufferManager::create() */
+		SPtr<CommandBuffer> create(CommandBufferType type, UINT32 deviceIdx = 0, UINT32 syncMask = 0xFFFFFFFF, 
+			bool secondary = false) override;
+	};
+
+	/** @} */
+}

+ 48 - 24
Source/BansheeD3D11RenderAPI/Include/BsD3D11RenderAPI.h

@@ -25,81 +25,105 @@ namespace BansheeEngine
 		const String& getShadingLanguageName() const override;
 
 		/** @copydoc RenderAPICore::setBlendState */
-		void setBlendState(const SPtr<BlendStateCore>& blendState) override;
+		void setBlendState(const SPtr<BlendStateCore>& blendState, 
+			const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::setRasterizerState */
-		void setRasterizerState(const SPtr<RasterizerStateCore>& rasterizerState) override;
+		void setRasterizerState(const SPtr<RasterizerStateCore>& rasterizerState,
+			const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::setDepthStencilState */
-		void setDepthStencilState(const SPtr<DepthStencilStateCore>& depthStencilState, UINT32 stencilRefValue) override;
+		void setDepthStencilState(const SPtr<DepthStencilStateCore>& depthStencilState, UINT32 stencilRefValue,
+			const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::setSamplerState */
-		void setSamplerState(GpuProgramType gptype, UINT16 texUnit, const SPtr<SamplerStateCore>& samplerState) override;
+		void setSamplerState(GpuProgramType gptype, UINT16 texUnit, const SPtr<SamplerStateCore>& samplerState,
+			const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::setTexture */
-		void setTexture(GpuProgramType gptype, UINT16 texUnit, const SPtr<TextureCore>& texture) override;
+		void setTexture(GpuProgramType gptype, UINT16 texUnit, const SPtr<TextureCore>& texture,
+			const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::setLoadStoreTexture */
 		void setLoadStoreTexture(GpuProgramType gptype, UINT16 texUnit, const SPtr<TextureCore>& texture,
-			const TextureSurface& surface) override;
+			const TextureSurface& surface, const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::setBuffer */
-		void setBuffer(GpuProgramType gptype, UINT16 unit, const SPtr<GpuBufferCore>& buffer, bool loadStore = false) override;
+		void setBuffer(GpuProgramType gptype, UINT16 unit, const SPtr<GpuBufferCore>& buffer, bool loadStore = false,
+			const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::beginFrame */
-		void beginFrame() override;
+		void beginFrame(const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::endFrame */
-		void endFrame() override;
+		void endFrame(const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::clearRenderTarget */
 		void clearRenderTarget(UINT32 buffers, const Color& color = Color::Black, float depth = 1.0f, UINT16 stencil = 0, 
-			UINT8 targetMask = 0xFF) override;
+			UINT8 targetMask = 0xFF, const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::clearViewport */
 		void clearViewport(UINT32 buffers, const Color& color = Color::Black, float depth = 1.0f, UINT16 stencil = 0,
-			UINT8 targetMask = 0xFF) override;
+			UINT8 targetMask = 0xFF, const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::setRenderTarget */
-		void setRenderTarget(const SPtr<RenderTargetCore>& target, bool readOnlyDepthStencil = false) override;
+		void setRenderTarget(const SPtr<RenderTargetCore>& target, bool readOnlyDepthStencil = false, 
+			const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::setViewport */
-		void setViewport(const Rect2& area) override;
+		void setViewport(const Rect2& area, const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::setScissorRect */
-		void setScissorRect(UINT32 left, UINT32 top, UINT32 right, UINT32 bottom) override;
+		void setScissorRect(UINT32 left, UINT32 top, UINT32 right, UINT32 bottom, 
+			const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::setVertexBuffers */
-		void setVertexBuffers(UINT32 index, SPtr<VertexBufferCore>* buffers, UINT32 numBuffers) override;
+		void setVertexBuffers(UINT32 index, SPtr<VertexBufferCore>* buffers, UINT32 numBuffers,
+			const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::setIndexBuffer */
-		void setIndexBuffer(const SPtr<IndexBufferCore>& buffer) override;
+		void setIndexBuffer(const SPtr<IndexBufferCore>& buffer, 
+			const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::setVertexDeclaration */
-		void setVertexDeclaration(const SPtr<VertexDeclarationCore>& vertexDeclaration) override;
+		void setVertexDeclaration(const SPtr<VertexDeclarationCore>& vertexDeclaration,
+			const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::setDrawOperation */
-		void setDrawOperation(DrawOperationType op) override;
+		void setDrawOperation(DrawOperationType op,
+			const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::draw */
-		void draw(UINT32 vertexOffset, UINT32 vertexCount, UINT32 instanceCount = 0) override;
+		void draw(UINT32 vertexOffset, UINT32 vertexCount, UINT32 instanceCount = 0,
+			const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::drawIndexed */
 		void drawIndexed(UINT32 startIndex, UINT32 indexCount, UINT32 vertexOffset, UINT32 vertexCount, 
-			UINT32 instanceCount = 0) override;
+			UINT32 instanceCount = 0, const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::dispatchCompute */
-		void dispatchCompute(UINT32 numGroupsX, UINT32 numGroupsY = 1, UINT32 numGroupsZ = 1) override;
+		void dispatchCompute(UINT32 numGroupsX, UINT32 numGroupsY = 1, UINT32 numGroupsZ = 1,
+			const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
+
+		/** @copydoc RenderAPICore::swapBuffers() */
+		void swapBuffers(const SPtr<RenderTargetCore>& target,
+			const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::bindGpuProgram */
-		void bindGpuProgram(const SPtr<GpuProgramCore>& prg) override;
+		void bindGpuProgram(const SPtr<GpuProgramCore>& prg, const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::unbindGpuProgram */
-		void unbindGpuProgram(GpuProgramType gptype) override;
+		void unbindGpuProgram(GpuProgramType gptype, const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
 
 		/** @copydoc RenderAPICore::setParamBuffer */
 		void setParamBuffer(GpuProgramType gptype, UINT32 slot, const SPtr<GpuParamBlockBufferCore>& buffer, 
-			const GpuParamDesc& paramDesc) override;
+			const SPtr<GpuParamDesc>& paramDesc, const SPtr<CommandBuffer>& commandBuffer = nullptr) override;
+
+		/** @copydoc RenderAPICore::addCommands() */
+		void addCommands(const SPtr<CommandBuffer>& commandBuffer, const SPtr<CommandBuffer>& secondary) override;
+
+		/** @copydoc RenderAPICore::executeCommands() */
+		void executeCommands(const SPtr<CommandBuffer>& commandBuffer) override;
 
 		/** @copydoc RenderAPICore::convertProjectionMatrix */
 		void convertProjectionMatrix(const Matrix4& matrix, Matrix4& dest) override;

+ 56 - 0
Source/BansheeD3D11RenderAPI/Source/BsD3D11CommandBuffer.cpp

@@ -0,0 +1,56 @@
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#include "BsD3D11CommandBuffer.h"
+
+namespace BansheeEngine
+{
+	D3D11CommandBuffer::D3D11CommandBuffer(CommandBufferType type, UINT32 deviceIdx, UINT32 syncMask, bool secondary)
+		: CommandBuffer(type, syncMask, secondary), mDeviceIdx(deviceIdx), mActiveDrawOp(DOT_TRIANGLE_LIST)
+	{
+
+	}
+
+	void D3D11CommandBuffer::queueCommand(const std::function<void()> command)
+	{
+		mCommands.push_back(command);
+	}
+
+	void D3D11CommandBuffer::appendSecondary(const SPtr<D3D11CommandBuffer>& secondaryBuffer)
+	{
+#if BS_DEBUG_MODE
+		if (!secondaryBuffer->mIsSecondary)
+		{
+			LOGERR("Cannot append a command buffer that is not secondary.");
+			return;
+		}
+
+		if (mIsSecondary)
+		{
+			LOGERR("Cannot append a buffer to a secondary command buffer.");
+			return;
+		}
+#endif
+
+		for (auto& entry : secondaryBuffer->mCommands)
+			mCommands.push_back(entry);
+	}
+
+	void D3D11CommandBuffer::executeCommands()
+	{
+#if BS_DEBUG_MODE
+		if (mIsSecondary)
+		{
+			LOGERR("Cannot execute commands on a secondary buffer.");
+			return;
+		}
+#endif
+
+		for (auto& entry : mCommands)
+			entry();
+	}
+
+	void D3D11CommandBuffer::clear()
+	{
+		mCommands.clear();
+	}
+}

+ 14 - 0
Source/BansheeD3D11RenderAPI/Source/BsD3D11CommandBufferManager.cpp

@@ -0,0 +1,14 @@
+//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
+//**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
+#include "BsD3D11CommandBufferManager.h"
+#include "BsD3D11CommandBuffer.h"
+
+namespace BansheeEngine
+{
+	SPtr<CommandBuffer> D3D11CommandBufferManager::create(CommandBufferType type, UINT32 deviceIdx, UINT32 syncMask,
+		bool secondary)
+	{
+		CommandBuffer* buffer = new (bs_alloc<D3D11CommandBuffer>()) D3D11CommandBuffer(type, deviceIdx, syncMask, secondary);
+		return bs_shared_ptr(buffer);
+	}
+}

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 722 - 364
Source/BansheeD3D11RenderAPI/Source/BsD3D11RenderAPI.cpp


+ 1 - 1
Source/BansheeGLRenderAPI/Include/BsGLCommandBufferManager.h

@@ -7,7 +7,7 @@
 
 namespace BansheeEngine
 {
-	/** @addtogroup RenderAPI-Internal
+	/** @addtogroup GL
 	 *  @{
 	 */
 

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů