Explorar el Código

Fixing DX11 compute shaders

BearishSun hace 9 años
padre
commit
5958421d0e

+ 4 - 4
BansheeCore/Include/BsMaterial.h

@@ -88,7 +88,7 @@ namespace BansheeEngine
 	class BS_CORE_EXPORT MaterialBase
 	class BS_CORE_EXPORT MaterialBase
 	{
 	{
 	public:
 	public:
-		/** Data used to described a structure defined within a shader. */
+		/** Data used to describe a structure defined within a shader. */
 		struct StructData
 		struct StructData
 		{
 		{
 			StructData()
 			StructData()
@@ -709,9 +709,9 @@ namespace BansheeEngine
 		 * @note	
 		 * @note	
 		 * Shader must be set before doing any other operations with the material.
 		 * Shader must be set before doing any other operations with the material.
 		 * @note			
 		 * @note			
-		 * After setting the shader if change any systems that a shader technique is dependent upon (render system, 
-		 * renderer, etc), you will need to call this method again on all your Materials to make sure technique used is 
-		 * updated.
+		 * After setting the shader if you change the implementation of systems that a shader technique is dependent upon 
+		 * (render system, renderer, etc), you will need to call this method again on all your Materials to make sure
+		 * technique used is updated.
 		 */
 		 */
 		void setShader(const HShader& shader);
 		void setShader(const HShader& shader);
 
 

+ 8 - 0
BansheeD3D11RenderAPI/Source/BsD3D11HLSLProgramFactory.cpp

@@ -47,6 +47,10 @@ namespace BansheeEngine
 			gpuProg = bs_shared_ptr<D3D11GpuGeometryProgramCore>(new (bs_alloc<D3D11GpuGeometryProgramCore>())
 			gpuProg = bs_shared_ptr<D3D11GpuGeometryProgramCore>(new (bs_alloc<D3D11GpuGeometryProgramCore>())
 				D3D11GpuGeometryProgramCore(source, entryPoint, profile, requireAdjacencyInfo));
 				D3D11GpuGeometryProgramCore(source, entryPoint, profile, requireAdjacencyInfo));
 			break;
 			break;
+		case GPT_COMPUTE_PROGRAM:
+			gpuProg = bs_shared_ptr<D3D11GpuComputeProgramCore>(new (bs_alloc<D3D11GpuComputeProgramCore>())
+				D3D11GpuComputeProgramCore(source, entryPoint, profile));
+			break;
 		}
 		}
 
 
 		if (gpuProg != nullptr)
 		if (gpuProg != nullptr)
@@ -81,6 +85,10 @@ namespace BansheeEngine
 			gpuProg = bs_shared_ptr<D3D11GpuGeometryProgramCore>(new (bs_alloc<D3D11GpuGeometryProgramCore>())
 			gpuProg = bs_shared_ptr<D3D11GpuGeometryProgramCore>(new (bs_alloc<D3D11GpuGeometryProgramCore>())
 				D3D11GpuGeometryProgramCore("", "", GPP_NONE, false));
 				D3D11GpuGeometryProgramCore("", "", GPP_NONE, false));
 			break;
 			break;
+		case GPT_COMPUTE_PROGRAM:
+			gpuProg = bs_shared_ptr<D3D11GpuComputeProgramCore>(new (bs_alloc<D3D11GpuComputeProgramCore>())
+				D3D11GpuComputeProgramCore("", "", GPP_NONE));
+			break;
 		}
 		}
 
 
 		if (gpuProg != nullptr)
 		if (gpuProg != nullptr)

+ 1 - 1
BansheeEditorExec/BsEditorExec.cpp

@@ -64,7 +64,7 @@ int CALLBACK WinMain(
 
 
 	__try
 	__try
 	{
 	{
-		EditorApplication::startUp(EditorRenderAPI::OpenGL);
+		EditorApplication::startUp(EditorRenderAPI::DX11);
 		EditorApplication::instance().runMainLoop();
 		EditorApplication::instance().runMainLoop();
 		EditorApplication::shutDown();
 		EditorApplication::shutDown();
 	}
 	}