|
|
@@ -115,7 +115,7 @@ namespace bgfx { namespace hlsl
|
|
|
return compiler;
|
|
|
}
|
|
|
|
|
|
- fprintf(stderr, "Error: Unable to open D3DCompiler_*.dll shader compiler.\n");
|
|
|
+ bx::printf("Error: Unable to open D3DCompiler_*.dll shader compiler.\n");
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
@@ -311,7 +311,7 @@ namespace bgfx { namespace hlsl
|
|
|
uint32_t tableSize = (commentSize - 1) * 4;
|
|
|
if (tableSize < sizeof(CTHeader) || header->Size != sizeof(CTHeader) )
|
|
|
{
|
|
|
- fprintf(stderr, "Error: Invalid constant table data\n");
|
|
|
+ bx::printf("Error: Invalid constant table data\n");
|
|
|
return false;
|
|
|
}
|
|
|
break;
|
|
|
@@ -323,7 +323,7 @@ namespace bgfx { namespace hlsl
|
|
|
|
|
|
if (!header)
|
|
|
{
|
|
|
- fprintf(stderr, "Error: Could not find constant table data\n");
|
|
|
+ bx::printf("Error: Could not find constant table data\n");
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -390,7 +390,7 @@ namespace bgfx { namespace hlsl
|
|
|
);
|
|
|
if (FAILED(hr) )
|
|
|
{
|
|
|
- fprintf(stderr, "Error: D3DReflect failed 0x%08x\n", (uint32_t)hr);
|
|
|
+ bx::printf("Error: D3DReflect failed 0x%08x\n", (uint32_t)hr);
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -398,7 +398,7 @@ namespace bgfx { namespace hlsl
|
|
|
hr = reflect->GetDesc(&desc);
|
|
|
if (FAILED(hr) )
|
|
|
{
|
|
|
- fprintf(stderr, "Error: ID3D11ShaderReflection::GetDesc failed 0x%08x\n", (uint32_t)hr);
|
|
|
+ bx::printf("Error: ID3D11ShaderReflection::GetDesc failed 0x%08x\n", (uint32_t)hr);
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -551,7 +551,7 @@ namespace bgfx { namespace hlsl
|
|
|
|
|
|
if (profile[0] == '\0')
|
|
|
{
|
|
|
- fprintf(stderr, "Error: Shader profile must be specified.\n");
|
|
|
+ bx::printf("Error: Shader profile must be specified.\n");
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -646,7 +646,7 @@ namespace bgfx { namespace hlsl
|
|
|
}
|
|
|
|
|
|
printCode(_code.c_str(), line, start, end, column);
|
|
|
- fprintf(stderr, "Error: D3DCompile failed 0x%08x %s\n", (uint32_t)hr, log);
|
|
|
+ bx::printf("Error: D3DCompile failed 0x%08x %s\n", (uint32_t)hr, log);
|
|
|
errorMsg->Release();
|
|
|
return false;
|
|
|
}
|
|
|
@@ -660,7 +660,7 @@ namespace bgfx { namespace hlsl
|
|
|
{
|
|
|
if (!getReflectionDataD3D9(code, uniforms) )
|
|
|
{
|
|
|
- fprintf(stderr, "Error: Unable to get D3D9 reflection data.\n");
|
|
|
+ bx::printf("Error: Unable to get D3D9 reflection data.\n");
|
|
|
goto error;
|
|
|
}
|
|
|
}
|
|
|
@@ -669,7 +669,7 @@ namespace bgfx { namespace hlsl
|
|
|
UniformNameList unusedUniforms;
|
|
|
if (!getReflectionDataD3D11(code, profile[0] == 'v', uniforms, numAttrs, attrs, size, unusedUniforms) )
|
|
|
{
|
|
|
- fprintf(stderr, "Error: Unable to get D3D11 reflection data.\n");
|
|
|
+ bx::printf("Error: Unable to get D3D11 reflection data.\n");
|
|
|
goto error;
|
|
|
}
|
|
|
|
|
|
@@ -833,7 +833,7 @@ namespace bgfx
|
|
|
bool compileHLSLShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer)
|
|
|
{
|
|
|
BX_UNUSED(_options, _version, _code, _writer);
|
|
|
- fprintf(stderr, "HLSL compiler is not supported on this platform.\n");
|
|
|
+ bx::printf("HLSL compiler is not supported on this platform.\n");
|
|
|
return false;
|
|
|
}
|
|
|
|