Browse Source

DX11 is compilable again

Marko Pintera 13 years ago
parent
commit
56b0a7d305

+ 2 - 2
CamelotD3D11RenderSystem/Include/CmD3D11HLSLProgram.h

@@ -83,9 +83,9 @@ namespace CamelotEngine
 		 */
 		void populateParametersAndConstants(ID3DBlob* microcode);
 
-		void populateConstantBufferParameters(ID3D11ShaderReflectionConstantBuffer* bufferReflection);
+		//void populateConstantBufferParameters(ID3D11ShaderReflectionConstantBuffer* bufferReflection);
 
-		void populateParameterDefinition(const D3D11_SHADER_VARIABLE_DESC& paramDesc, const D3D11_SHADER_TYPE_DESC& d3dDesc, GpuConstantDefinition& def) const;
+		//void populateParameterDefinition(const D3D11_SHADER_VARIABLE_DESC& paramDesc, const D3D11_SHADER_TYPE_DESC& d3dDesc, GpuConstantDefinition& def) const;
 
 		/**
 		 * @brief	Creates constant buffers based on available parameter and constant data.

+ 5 - 1
CamelotD3D11RenderSystem/Include/CmD3D11RenderSystem.h

@@ -35,7 +35,11 @@ namespace CamelotEngine
 
 		void bindGpuProgram(GpuProgramHandle prg);
 		void unbindGpuProgram(GpuProgramType gptype);
-		void bindGpuProgramParameters(GpuProgramType gptype, GpuProgramParametersSharedPtr params, UINT16 variabilityMask);
+
+		/**
+		 * @copydoc RenderSystem::bindGpuParams()
+		 */
+		void bindGpuParams(GpuProgramType gptype, GpuParamsPtr params);
 		
 		void setClipPlanesImpl(const PlaneList& clipPlanes);
 

+ 250 - 250
CamelotD3D11RenderSystem/Source/CmD3D11HLSLProgram.cpp

@@ -193,261 +193,261 @@ namespace CamelotEngine
 			ID3D11ShaderReflectionConstantBuffer* shaderReflectionConstantBuffer;
 			shaderReflectionConstantBuffer = shaderReflection->GetConstantBufferByIndex(i);
 
-			populateConstantBufferParameters(shaderReflectionConstantBuffer);
+			//populateConstantBufferParameters(shaderReflectionConstantBuffer);
 		}
 
 		shaderReflection->Release();
 	}
 
-	void D3D11HLSLProgram::buildConstantDefinitions() const
-	{
-		createParameterMappingStructures(true);
-
-		for(auto shaderBufferIter = mShaderBuffers.begin(); shaderBufferIter != mShaderBuffers.end(); ++shaderBufferIter)
-		{
-			for(size_t i = 0; i < shaderBufferIter->variables.size(); i++)
-			{
-				const D3D11_SHADER_VARIABLE_DESC& variableDesc = shaderBufferIter->variables[i];
-				const D3D11_SHADER_TYPE_DESC& variableType = shaderBufferIter->variableTypes[i];
-
-				String name = variableDesc.Name;
-				if (name.at(0) == '$')
-					name.erase(name.begin());
-
-				// Also trim the '[0]' suffix if it exists, we will add our own indexing later
-				if (StringUtil::endsWith(name, "[0]", false))
-					name.erase(name.size() - 3);
-
-				UINT32 paramIndex = (UINT32)i;
-
-				// TODO - Need to add support for more types. ESPECIALLY TEXTURES & STRUCTS!
-				if(variableType.Type == D3D_SVT_FLOAT || variableType.Type == D3D_SVT_INT || variableType.Type == D3D_SVT_BOOL || variableType.Type == D3D_SVT_SAMPLER1D || 
-					variableType.Type == D3D_SVT_SAMPLER2D || variableType.Type == D3D_SVT_SAMPLER3D || variableType.Type == D3D_SVT_SAMPLERCUBE)
-				{
-					GpuConstantDefinition def;
-					def.logicalIndex = paramIndex;
-					// populate type, array size & element size
-					populateParameterDefinition(variableDesc, variableType, def);
-
-					if(def.isSampler())
-					{
-						def.physicalIndex = variableDesc.StartSampler;
-						mSamplerLogicalToPhysical->map.insert(
-							GpuLogicalIndexUseMap::value_type(paramIndex, 
-							GpuLogicalIndexUse(def.physicalIndex, def.arraySize, GPV_GLOBAL)));
-						mSamplerLogicalToPhysical->bufferSize = std::max(mSamplerLogicalToPhysical->bufferSize, def.physicalIndex + def.arraySize);
-						mConstantDefs->samplerCount = mSamplerLogicalToPhysical->bufferSize;
-
-						// TODO - Add textures!
-						CM_EXCEPT(NotImplementedException, "Add support for texture parameters!");
-					}
-					else
-					{
-						if (def.isFloat())
-						{
-							def.physicalIndex = variableDesc.StartOffset;
-							mFloatLogicalToPhysical->map.insert(
-								GpuLogicalIndexUseMap::value_type(paramIndex, 
-								GpuLogicalIndexUse(def.physicalIndex, def.arraySize * def.elementSize, GPV_GLOBAL)));
-							mFloatLogicalToPhysical->bufferSize = std::max(mFloatLogicalToPhysical->bufferSize, def.physicalIndex + def.arraySize);
-							mConstantDefs->floatBufferSize = mFloatLogicalToPhysical->bufferSize;
-						}
-						else
-						{
-							def.physicalIndex = variableDesc.StartOffset;
-							mIntLogicalToPhysical->map.insert(
-								GpuLogicalIndexUseMap::value_type(paramIndex, 
-								GpuLogicalIndexUse(def.physicalIndex, def.arraySize * def.elementSize, GPV_GLOBAL)));
-							mIntLogicalToPhysical->bufferSize = std::max(mIntLogicalToPhysical->bufferSize, def.physicalIndex + def.arraySize);
-							mConstantDefs->intBufferSize = mIntLogicalToPhysical->bufferSize;
-						}
-					}
-
-					mConstantDefs->map.insert(GpuConstantDefinitionMap::value_type(name, def));
-
-					// Now deal with arrays
-					mConstantDefs->generateConstantDefinitionArrayEntries(name, def);
-				}
-			}
-		}
-	}
-
-	void D3D11HLSLProgram::populateConstantBufferParameters(ID3D11ShaderReflectionConstantBuffer* bufferReflection)
-	{
-		D3D11_SHADER_BUFFER_DESC constantBufferDesc;
-		HRESULT hr = bufferReflection->GetDesc(&constantBufferDesc);
-		if (FAILED(hr))
-			CM_EXCEPT(RenderingAPIException, "Failed to retrieve HLSL constant buffer description.");
-
-		if(constantBufferDesc.Type != D3D_CBUFFER_TYPE::D3D_CT_CBUFFER && constantBufferDesc.Type != D3D_CBUFFER_TYPE::D3D_CT_TBUFFER)
-		{
-			LOGDBG("D3D11 HLSL parsing: Unsupported constant buffer type, skipping. Type: " + toString(constantBufferDesc.Type));
-			return;
-		}
-
-		mShaderBuffers.push_back(D3D11_ShaderBufferDesc());
-		D3D11_ShaderBufferDesc& newShaderBufferDesc = *mShaderBuffers.end();
-
-		for(UINT32 j = 0; j < constantBufferDesc.Variables; j++)
-		{
-			ID3D11ShaderReflectionVariable* varRef;
-			varRef = bufferReflection->GetVariableByIndex(j);
-			D3D11_SHADER_VARIABLE_DESC varDesc;
-			HRESULT hr = varRef->GetDesc(&varDesc);
-
-			if (FAILED(hr))
-				CM_EXCEPT(RenderingAPIException, "Failed to retrieve HLSL constant buffer variable description.");
-
-			ID3D11ShaderReflectionType* varRefType;
-			varRefType = varRef->GetType();
-			D3D11_SHADER_TYPE_DESC varTypeDesc;
-			varRefType->GetDesc(&varTypeDesc);
-
-			switch(varTypeDesc.Type)
-			{
-			case D3D_SVT_FLOAT:
-			case D3D_SVT_INT:
-			case D3D_SVT_SAMPLER1D:
-			case D3D_SVT_SAMPLER2D: 
-			case D3D_SVT_SAMPLER3D:
-			case D3D_SVT_SAMPLERCUBE: // TODO - Need to add support for other types!
-				newShaderBufferDesc.variables.push_back(varDesc);
-				newShaderBufferDesc.variableTypes.push_back(varTypeDesc);
-			default:
-				CM_EXCEPT(RenderingAPIException, "Unsupported shader variable type!");
-			}
-		}
-	}
-
-	void D3D11HLSLProgram::populateParameterDefinition(const D3D11_SHADER_VARIABLE_DESC& paramDesc, const D3D11_SHADER_TYPE_DESC& paramType, GpuConstantDefinition& def) const
-	{
-		def.arraySize = paramType.Elements + 1;
-		switch(paramType.Type)
-		{
-		case D3D_SVT_SAMPLER1D:
-			def.constType = GCT_SAMPLER1D;
-			def.elementSize = paramDesc.SamplerSize / def.arraySize;
-			break;
-		case D3D_SVT_SAMPLER2D:
-			CM_EXCEPT(NotImplementedException, "Break here because I want to check what is the elementSize of the sampler. It has to be 1.");
-
-			def.constType = GCT_SAMPLER2D;
-			def.elementSize = paramDesc.SamplerSize / def.arraySize;
-			break;
-		case D3D_SVT_SAMPLER3D:
-			def.constType = GCT_SAMPLER3D;
-			def.elementSize = paramDesc.SamplerSize / def.arraySize;
-			break;
-		case D3D_SVT_SAMPLERCUBE:
-			def.constType = GCT_SAMPLERCUBE;
-			def.elementSize = paramDesc.SamplerSize / def.arraySize;
-			break;
-		case D3D_SVT_INT:
-			switch(paramType.Columns)
-			{
-			case 1:
-				def.constType = GCT_INT1;
-				def.elementSize = paramDesc.Size / def.arraySize;
-				break;
-			case 2:
-				def.constType = GCT_INT2;
-				def.elementSize = paramDesc.Size / def.arraySize;
-				break;
-			case 3:
-				def.constType = GCT_INT3;
-				def.elementSize = paramDesc.Size / def.arraySize;
-				break;
-			case 4:
-				def.constType = GCT_INT4;
-				def.elementSize = paramDesc.Size / def.arraySize;
-				break;
-			} // columns
-			break;
-		case D3D_SVT_FLOAT:
-
-			CM_EXCEPT(NotImplementedException, "Break here because I want to check if paramDesc.Size is size per element or total size of the array.");
-
-			switch(paramType.Rows)
-			{
-			case 1:
-				switch(paramType.Columns)
-				{
-				case 1:
-					def.constType = GCT_FLOAT1;
-					def.elementSize = paramDesc.Size / def.arraySize;
-					break;
-				case 2:
-					def.constType = GCT_FLOAT2;
-					def.elementSize = paramDesc.Size / def.arraySize;
-					break;
-				case 3:
-					def.constType = GCT_FLOAT3;
-					def.elementSize = paramDesc.Size / def.arraySize;
-					break;
-				case 4:
-					def.constType = GCT_FLOAT4;
-					def.elementSize = paramDesc.Size / def.arraySize;
-					break;
-				} // columns
-				break;
-			case 2:
-				switch(paramType.Columns)
-				{
-				case 2:
-					def.constType = GCT_MATRIX_2X2;
-					def.elementSize = paramDesc.Size / def.arraySize;
-					break;
-				case 3:
-					def.constType = GCT_MATRIX_2X3;
-					def.elementSize = paramDesc.Size / def.arraySize;
-					break;
-				case 4:
-					def.constType = GCT_MATRIX_2X4;
-					def.elementSize = paramDesc.Size / def.arraySize;
-					break;
-				} // columns
-				break;
-			case 3:
-				switch(paramType.Columns)
-				{
-				case 2:
-					def.constType = GCT_MATRIX_3X2;
-					def.elementSize = paramDesc.Size / def.arraySize;
-					break;
-				case 3:
-					def.constType = GCT_MATRIX_3X3;
-					def.elementSize = paramDesc.Size / def.arraySize;
-					break;
-				case 4:
-					def.constType = GCT_MATRIX_3X4;
-					def.elementSize = paramDesc.Size / def.arraySize;
-					break;
-				} // columns
-				break;
-			case 4:
-				switch(paramType.Columns)
-				{
-				case 2:
-					def.constType = GCT_MATRIX_4X2;
-					def.elementSize = paramDesc.Size / def.arraySize;
-					break;
-				case 3:
-					def.constType = GCT_MATRIX_4X3;
-					def.elementSize = paramDesc.Size / def.arraySize;
-					break;
-				case 4:
-					def.constType = GCT_MATRIX_4X4;
-					def.elementSize = paramDesc.Size / def.arraySize;
-					break;
-				} // columns
-				break;
-
-			} // rows
-			break;
-		default:
-			break;
-		};
-	}
+	//void D3D11HLSLProgram::buildConstantDefinitions() const
+	//{
+	//	createParameterMappingStructures(true);
+
+	//	for(auto shaderBufferIter = mShaderBuffers.begin(); shaderBufferIter != mShaderBuffers.end(); ++shaderBufferIter)
+	//	{
+	//		for(size_t i = 0; i < shaderBufferIter->variables.size(); i++)
+	//		{
+	//			const D3D11_SHADER_VARIABLE_DESC& variableDesc = shaderBufferIter->variables[i];
+	//			const D3D11_SHADER_TYPE_DESC& variableType = shaderBufferIter->variableTypes[i];
+
+	//			String name = variableDesc.Name;
+	//			if (name.at(0) == '$')
+	//				name.erase(name.begin());
+
+	//			// Also trim the '[0]' suffix if it exists, we will add our own indexing later
+	//			if (StringUtil::endsWith(name, "[0]", false))
+	//				name.erase(name.size() - 3);
+
+	//			UINT32 paramIndex = (UINT32)i;
+
+	//			// TODO - Need to add support for more types. ESPECIALLY TEXTURES & STRUCTS!
+	//			if(variableType.Type == D3D_SVT_FLOAT || variableType.Type == D3D_SVT_INT || variableType.Type == D3D_SVT_BOOL || variableType.Type == D3D_SVT_SAMPLER1D || 
+	//				variableType.Type == D3D_SVT_SAMPLER2D || variableType.Type == D3D_SVT_SAMPLER3D || variableType.Type == D3D_SVT_SAMPLERCUBE)
+	//			{
+	//				GpuConstantDefinition def;
+	//				def.logicalIndex = paramIndex;
+	//				// populate type, array size & element size
+	//				populateParameterDefinition(variableDesc, variableType, def);
+
+	//				if(def.isSampler())
+	//				{
+	//					def.physicalIndex = variableDesc.StartSampler;
+	//					mSamplerLogicalToPhysical->map.insert(
+	//						GpuLogicalIndexUseMap::value_type(paramIndex, 
+	//						GpuLogicalIndexUse(def.physicalIndex, def.arraySize, GPV_GLOBAL)));
+	//					mSamplerLogicalToPhysical->bufferSize = std::max(mSamplerLogicalToPhysical->bufferSize, def.physicalIndex + def.arraySize);
+	//					mConstantDefs->samplerCount = mSamplerLogicalToPhysical->bufferSize;
+
+	//					// TODO - Add textures!
+	//					CM_EXCEPT(NotImplementedException, "Add support for texture parameters!");
+	//				}
+	//				else
+	//				{
+	//					if (def.isFloat())
+	//					{
+	//						def.physicalIndex = variableDesc.StartOffset;
+	//						mFloatLogicalToPhysical->map.insert(
+	//							GpuLogicalIndexUseMap::value_type(paramIndex, 
+	//							GpuLogicalIndexUse(def.physicalIndex, def.arraySize * def.elementSize, GPV_GLOBAL)));
+	//						mFloatLogicalToPhysical->bufferSize = std::max(mFloatLogicalToPhysical->bufferSize, def.physicalIndex + def.arraySize);
+	//						mConstantDefs->floatBufferSize = mFloatLogicalToPhysical->bufferSize;
+	//					}
+	//					else
+	//					{
+	//						def.physicalIndex = variableDesc.StartOffset;
+	//						mIntLogicalToPhysical->map.insert(
+	//							GpuLogicalIndexUseMap::value_type(paramIndex, 
+	//							GpuLogicalIndexUse(def.physicalIndex, def.arraySize * def.elementSize, GPV_GLOBAL)));
+	//						mIntLogicalToPhysical->bufferSize = std::max(mIntLogicalToPhysical->bufferSize, def.physicalIndex + def.arraySize);
+	//						mConstantDefs->intBufferSize = mIntLogicalToPhysical->bufferSize;
+	//					}
+	//				}
+
+	//				mConstantDefs->map.insert(GpuConstantDefinitionMap::value_type(name, def));
+
+	//				// Now deal with arrays
+	//				mConstantDefs->generateConstantDefinitionArrayEntries(name, def);
+	//			}
+	//		}
+	//	}
+	//}
+
+	//void D3D11HLSLProgram::populateConstantBufferParameters(ID3D11ShaderReflectionConstantBuffer* bufferReflection)
+	//{
+	//	D3D11_SHADER_BUFFER_DESC constantBufferDesc;
+	//	HRESULT hr = bufferReflection->GetDesc(&constantBufferDesc);
+	//	if (FAILED(hr))
+	//		CM_EXCEPT(RenderingAPIException, "Failed to retrieve HLSL constant buffer description.");
+
+	//	if(constantBufferDesc.Type != D3D_CBUFFER_TYPE::D3D_CT_CBUFFER && constantBufferDesc.Type != D3D_CBUFFER_TYPE::D3D_CT_TBUFFER)
+	//	{
+	//		LOGDBG("D3D11 HLSL parsing: Unsupported constant buffer type, skipping. Type: " + toString(constantBufferDesc.Type));
+	//		return;
+	//	}
+
+	//	mShaderBuffers.push_back(D3D11_ShaderBufferDesc());
+	//	D3D11_ShaderBufferDesc& newShaderBufferDesc = *mShaderBuffers.end();
+
+	//	for(UINT32 j = 0; j < constantBufferDesc.Variables; j++)
+	//	{
+	//		ID3D11ShaderReflectionVariable* varRef;
+	//		varRef = bufferReflection->GetVariableByIndex(j);
+	//		D3D11_SHADER_VARIABLE_DESC varDesc;
+	//		HRESULT hr = varRef->GetDesc(&varDesc);
+
+	//		if (FAILED(hr))
+	//			CM_EXCEPT(RenderingAPIException, "Failed to retrieve HLSL constant buffer variable description.");
+
+	//		ID3D11ShaderReflectionType* varRefType;
+	//		varRefType = varRef->GetType();
+	//		D3D11_SHADER_TYPE_DESC varTypeDesc;
+	//		varRefType->GetDesc(&varTypeDesc);
+
+	//		switch(varTypeDesc.Type)
+	//		{
+	//		case D3D_SVT_FLOAT:
+	//		case D3D_SVT_INT:
+	//		case D3D_SVT_SAMPLER1D:
+	//		case D3D_SVT_SAMPLER2D: 
+	//		case D3D_SVT_SAMPLER3D:
+	//		case D3D_SVT_SAMPLERCUBE: // TODO - Need to add support for other types!
+	//			newShaderBufferDesc.variables.push_back(varDesc);
+	//			newShaderBufferDesc.variableTypes.push_back(varTypeDesc);
+	//		default:
+	//			CM_EXCEPT(RenderingAPIException, "Unsupported shader variable type!");
+	//		}
+	//	}
+	//}
+
+	//void D3D11HLSLProgram::populateParameterDefinition(const D3D11_SHADER_VARIABLE_DESC& paramDesc, const D3D11_SHADER_TYPE_DESC& paramType, GpuConstantDefinition& def) const
+	//{
+	//	def.arraySize = paramType.Elements + 1;
+	//	switch(paramType.Type)
+	//	{
+	//	case D3D_SVT_SAMPLER1D:
+	//		def.constType = GCT_SAMPLER1D;
+	//		def.elementSize = paramDesc.SamplerSize / def.arraySize;
+	//		break;
+	//	case D3D_SVT_SAMPLER2D:
+	//		CM_EXCEPT(NotImplementedException, "Break here because I want to check what is the elementSize of the sampler. It has to be 1.");
+
+	//		def.constType = GCT_SAMPLER2D;
+	//		def.elementSize = paramDesc.SamplerSize / def.arraySize;
+	//		break;
+	//	case D3D_SVT_SAMPLER3D:
+	//		def.constType = GCT_SAMPLER3D;
+	//		def.elementSize = paramDesc.SamplerSize / def.arraySize;
+	//		break;
+	//	case D3D_SVT_SAMPLERCUBE:
+	//		def.constType = GCT_SAMPLERCUBE;
+	//		def.elementSize = paramDesc.SamplerSize / def.arraySize;
+	//		break;
+	//	case D3D_SVT_INT:
+	//		switch(paramType.Columns)
+	//		{
+	//		case 1:
+	//			def.constType = GCT_INT1;
+	//			def.elementSize = paramDesc.Size / def.arraySize;
+	//			break;
+	//		case 2:
+	//			def.constType = GCT_INT2;
+	//			def.elementSize = paramDesc.Size / def.arraySize;
+	//			break;
+	//		case 3:
+	//			def.constType = GCT_INT3;
+	//			def.elementSize = paramDesc.Size / def.arraySize;
+	//			break;
+	//		case 4:
+	//			def.constType = GCT_INT4;
+	//			def.elementSize = paramDesc.Size / def.arraySize;
+	//			break;
+	//		} // columns
+	//		break;
+	//	case D3D_SVT_FLOAT:
+
+	//		CM_EXCEPT(NotImplementedException, "Break here because I want to check if paramDesc.Size is size per element or total size of the array.");
+
+	//		switch(paramType.Rows)
+	//		{
+	//		case 1:
+	//			switch(paramType.Columns)
+	//			{
+	//			case 1:
+	//				def.constType = GCT_FLOAT1;
+	//				def.elementSize = paramDesc.Size / def.arraySize;
+	//				break;
+	//			case 2:
+	//				def.constType = GCT_FLOAT2;
+	//				def.elementSize = paramDesc.Size / def.arraySize;
+	//				break;
+	//			case 3:
+	//				def.constType = GCT_FLOAT3;
+	//				def.elementSize = paramDesc.Size / def.arraySize;
+	//				break;
+	//			case 4:
+	//				def.constType = GCT_FLOAT4;
+	//				def.elementSize = paramDesc.Size / def.arraySize;
+	//				break;
+	//			} // columns
+	//			break;
+	//		case 2:
+	//			switch(paramType.Columns)
+	//			{
+	//			case 2:
+	//				def.constType = GCT_MATRIX_2X2;
+	//				def.elementSize = paramDesc.Size / def.arraySize;
+	//				break;
+	//			case 3:
+	//				def.constType = GCT_MATRIX_2X3;
+	//				def.elementSize = paramDesc.Size / def.arraySize;
+	//				break;
+	//			case 4:
+	//				def.constType = GCT_MATRIX_2X4;
+	//				def.elementSize = paramDesc.Size / def.arraySize;
+	//				break;
+	//			} // columns
+	//			break;
+	//		case 3:
+	//			switch(paramType.Columns)
+	//			{
+	//			case 2:
+	//				def.constType = GCT_MATRIX_3X2;
+	//				def.elementSize = paramDesc.Size / def.arraySize;
+	//				break;
+	//			case 3:
+	//				def.constType = GCT_MATRIX_3X3;
+	//				def.elementSize = paramDesc.Size / def.arraySize;
+	//				break;
+	//			case 4:
+	//				def.constType = GCT_MATRIX_3X4;
+	//				def.elementSize = paramDesc.Size / def.arraySize;
+	//				break;
+	//			} // columns
+	//			break;
+	//		case 4:
+	//			switch(paramType.Columns)
+	//			{
+	//			case 2:
+	//				def.constType = GCT_MATRIX_4X2;
+	//				def.elementSize = paramDesc.Size / def.arraySize;
+	//				break;
+	//			case 3:
+	//				def.constType = GCT_MATRIX_4X3;
+	//				def.elementSize = paramDesc.Size / def.arraySize;
+	//				break;
+	//			case 4:
+	//				def.constType = GCT_MATRIX_4X4;
+	//				def.elementSize = paramDesc.Size / def.arraySize;
+	//				break;
+	//			} // columns
+	//			break;
+
+	//		} // rows
+	//		break;
+	//	default:
+	//		break;
+	//	};
+	//}
 
 	void D3D11HLSLProgram::createConstantBuffers()
 	{

+ 1 - 1
CamelotD3D11RenderSystem/Source/CmD3D11RenderSystem.cpp

@@ -177,7 +177,7 @@ namespace CamelotEngine
 		throw std::exception("The method or operation is not implemented.");
 	}
 
-	void D3D11RenderSystem::bindGpuProgramParameters(GpuProgramType gptype, GpuProgramParametersSharedPtr params, UINT16 variabilityMask)
+	void D3D11RenderSystem::bindGpuParams(GpuProgramType gptype, GpuParamsPtr params)
 	{
 		throw std::exception("The method or operation is not implemented.");
 	}

+ 1 - 0
CamelotRenderer.sln

@@ -17,6 +17,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CamelotClient", "CamelotCli
 	ProjectSection(ProjectDependencies) = postProject
 		{9B21D41C-516B-43BF-9B10-E99B599C7589} = {9B21D41C-516B-43BF-9B10-E99B599C7589}
 		{122B7A22-0C62-4B35-B661-EBF3F394EA79} = {122B7A22-0C62-4B35-B661-EBF3F394EA79}
+		{1437BB4E-DDB3-4307-AA41-8C035DA3014B} = {1437BB4E-DDB3-4307-AA41-8C035DA3014B}
 		{F58FF869-2EA6-4FFF-AB84-328C531BA9D9} = {F58FF869-2EA6-4FFF-AB84-328C531BA9D9}
 		{08975177-4A13-4EE7-BB21-3BB92FB3F3CC} = {08975177-4A13-4EE7-BB21-3BB92FB3F3CC}
 		{7F449698-73DF-4203-9F31-0877DBF01695} = {7F449698-73DF-4203-9F31-0877DBF01695}

+ 1 - 15
CamelotRenderer/TODO.txt

@@ -20,21 +20,14 @@
 -----------GpuProgramParameters/Pass/Material REFACTOR------------------------------
 
 Finish up GL port:
- - IMPORTANT: Use GL_ARB_separate_shader_objects to set shaders without program objects. And more importantly to set uniforms per stage.
-   - Use CreateShaderProgramv to compile & link shader program
- - GL shader and param binding happens in the shader itself, while it should happen on the RenderSystem (to be consistent with DX9 and DX11)
  - Remove those DefaultHardwareBuffermanagers as I don't think they serve a purpose anymore (OpenGL seems to only use them if API doesn't support hardware buffers, which won't happen on modern hardware)
  - Re-do GL attribute bindings (currently it parses program source manually)
  - Params aren't being initialized anywhere
  - Uniforms or uniform blocks aren't assigned anywhere
- - Implement GLRenderSystem::bindGpuParams
 
- http://www.opengl.org/wiki/Uniform_(GLSL)
-http://www.opengl.org/wiki/Program_Introspection
+Get through capabilities and remove bool/int/float constant counters and instead add uniform, uniform block, input/output component counters
 
-Re-enable DX11 and GL project dependencies in CamelotClient
 Saving/loading of material params isn't completed (in MAterialRTTI)
-Delete old bindGpuProgramParameters and old unused classes/files
 Port DX11 to new shader param system
 Ability to switch out GpuParamBlocks (i.e. share them between programs)
 Ability to create Pass without automatically creating param blocks
@@ -47,13 +40,6 @@ Handling of array parameters? This needs testing
 
 ---------------------------------------------------
 
-RenderSystem::setTexture(STAGE, UINT32 slot, Texture)
-RenderSystem::setBuffer(STAGE, UINT32 slot, Buffer)
-RenderSystem::setSampler(STAGE, UINT32 slot, Sampler)
- - Maybe do all these without "slot" parameter? Instead accept an array of elements
-   per stage, and when they're about to be used set them up into proper slots as needed?
-   (based on currently set shader)
-
 RenderSystem::clearFrameBuffer
  - Change so it accepts a RenderTarget as a parameter