Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualmrheisenberg

Posted 18 August 2012 - 01:01 PM

In a sample application by Intel,that demonstrates deferred shading,everything works perfectly.When I try to compile their files,I get: error X3000: syntax error: unexpected token '>' here:
Texture2DMS<float4, MSAA_SAMPLES> gGBufferTextures[4] : register(t0);
I'm literally using the same compile method as in the Intel example:

std::string msaaSamplesStr;
{
std::ostringstream oss;
oss << MSAASamples;
msaaSamplesStr = oss.str();
}


D3D10_SHADER_MACRO defines[] = { {"MSAA_SAMPLES", msaaSamplesStr.c_str()}, {0, 0} };


LPCSTR profile = "ps_5_0"
LPCTSTR fileName = L"GBuffer.hlsl";
LPCSTR entryPoint = "GBufferPS";

UINT shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS | D3D10_SHADER_PACK_MATRIX_ROW_MAJOR;
ID3D10Blob *bytecode = 0;
ID3D10Blob *errors = 0;
D3DX11CompileFromFile(fileName, defines, 0, entryPoint, profile, shaderFlags, 0, 0, &bytecode, &errors, 0);

My feature level is 11 just like the Intel code,I'm not sure what I have missed that would cause the shader to not compile properly on my program.

EDIT:The '>' error is what I get when I output the ''errors'' blob.

#1mrheisenberg

Posted 18 August 2012 - 12:58 PM

In a sample application by Intel,that demonstrates deferred shading,everything works perfectly.When I try to compile their files,I get: error X3000: syntax error: unexpected token '>' here:
Texture2DMS<float4, MSAA_SAMPLES> gGBufferTextures[4] : register(t0);
I'm literally using the same compile method as in the Intel example:

std::string msaaSamplesStr;
{
std::ostringstream oss;
oss << MSAASamples;
msaaSamplesStr = oss.str();
}


D3D10_SHADER_MACRO defines[] = { {"MSAA_SAMPLES", msaaSamplesStr.c_str()}, {0, 0} };


LPCSTR profile = "ps_5_0"
LPCTSTR fileName = L"GBuffer.hlsl";
LPCSTR entryPoint = "GBufferPS";

UINT shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS | D3D10_SHADER_PACK_MATRIX_ROW_MAJOR;
ID3D10Blob *bytecode = 0;
ID3D10Blob *errors = 0;
D3DX11CompileFromFile(fileName, defines, 0, entryPoint, profile, shaderFlags, 0, 0, &bytecode, &errors, 0);

My feature level is 11 just like the Intel code,I'm not sure what I have missed that would cause the shader to not compile properly on my program.

PARTNERS