More fixes.
This commit is contained in:
parent
7bfb8a7b38
commit
4763f97205
@ -309,6 +309,31 @@ namespace bgfx
|
||||
NULL
|
||||
};
|
||||
|
||||
void fatal(const char* _filePath, uint16_t _line, Fatal::Enum _code, const char* _format, ...)
|
||||
{
|
||||
BX_UNUSED(_filePath, _line, _code);
|
||||
|
||||
va_list argList;
|
||||
va_start(argList, _format);
|
||||
|
||||
bx::vprintf(_format, argList);
|
||||
|
||||
va_end(argList);
|
||||
|
||||
abort();
|
||||
}
|
||||
|
||||
void trace(const char* _filePath, uint16_t _line, const char* _format, ...)
|
||||
{
|
||||
BX_UNUSED(_filePath, _line);
|
||||
|
||||
va_list argList;
|
||||
va_start(argList, _format);
|
||||
|
||||
bx::vprintf(_format, argList);
|
||||
|
||||
va_end(argList);
|
||||
}
|
||||
Options::Options()
|
||||
: shaderType(' ')
|
||||
, disasm(false)
|
||||
|
@ -330,7 +330,7 @@ namespace bgfx { namespace glsl
|
||||
}
|
||||
}
|
||||
|
||||
bx::Error err;
|
||||
bx::ErrorAssert err;
|
||||
|
||||
uint16_t count = (uint16_t)uniforms.size();
|
||||
bx::write(_writer, count, &err);
|
||||
|
@ -609,6 +609,8 @@ namespace bgfx { namespace hlsl
|
||||
writeFile(hlslfp.c_str(), _code.c_str(), (int32_t)_code.size() );
|
||||
}
|
||||
|
||||
bx::ErrorAssert err;
|
||||
|
||||
HRESULT hr = D3DCompile(_code.c_str()
|
||||
, _code.size()
|
||||
, hlslfp.c_str()
|
||||
@ -731,23 +733,23 @@ namespace bgfx { namespace hlsl
|
||||
|
||||
{
|
||||
uint16_t count = (uint16_t)uniforms.size();
|
||||
bx::write(_writer, count);
|
||||
bx::write(_writer, count, &err);
|
||||
|
||||
uint32_t fragmentBit = profile[0] == 'p' ? kUniformFragmentBit : 0;
|
||||
for (UniformArray::const_iterator it = uniforms.begin(); it != uniforms.end(); ++it)
|
||||
{
|
||||
const Uniform& un = *it;
|
||||
uint8_t nameSize = (uint8_t)un.name.size();
|
||||
bx::write(_writer, nameSize);
|
||||
bx::write(_writer, un.name.c_str(), nameSize);
|
||||
bx::write(_writer, nameSize, &err);
|
||||
bx::write(_writer, un.name.c_str(), nameSize, &err);
|
||||
uint8_t type = uint8_t(un.type | fragmentBit);
|
||||
bx::write(_writer, type);
|
||||
bx::write(_writer, un.num);
|
||||
bx::write(_writer, un.regIndex);
|
||||
bx::write(_writer, un.regCount);
|
||||
bx::write(_writer, un.texComponent);
|
||||
bx::write(_writer, un.texDimension);
|
||||
bx::write(_writer, un.texFormat);
|
||||
bx::write(_writer, type, &err);
|
||||
bx::write(_writer, un.num, &err);
|
||||
bx::write(_writer, un.regIndex, &err);
|
||||
bx::write(_writer, un.regCount, &err);
|
||||
bx::write(_writer, un.texComponent, &err);
|
||||
bx::write(_writer, un.texDimension, &err);
|
||||
bx::write(_writer, un.texFormat, &err);
|
||||
|
||||
BX_TRACE("%s, %s, %d, %d, %d"
|
||||
, un.name.c_str()
|
||||
@ -777,18 +779,18 @@ namespace bgfx { namespace hlsl
|
||||
|
||||
{
|
||||
uint32_t shaderSize = uint32_t(code->GetBufferSize() );
|
||||
bx::write(_writer, shaderSize);
|
||||
bx::write(_writer, code->GetBufferPointer(), shaderSize);
|
||||
bx::write(_writer, shaderSize, &err);
|
||||
bx::write(_writer, code->GetBufferPointer(), shaderSize, &err);
|
||||
uint8_t nul = 0;
|
||||
bx::write(_writer, nul);
|
||||
bx::write(_writer, nul, &err);
|
||||
}
|
||||
|
||||
if (_version >= 400)
|
||||
{
|
||||
bx::write(_writer, numAttrs);
|
||||
bx::write(_writer, attrs, numAttrs*sizeof(uint16_t) );
|
||||
bx::write(_writer, numAttrs, &err);
|
||||
bx::write(_writer, attrs, numAttrs*sizeof(uint16_t), &err);
|
||||
|
||||
bx::write(_writer, size);
|
||||
bx::write(_writer, size, &err);
|
||||
}
|
||||
|
||||
if (_options.disasm )
|
||||
|
@ -220,7 +220,7 @@ namespace bgfx { namespace metal
|
||||
{
|
||||
uint16_t size = 0;
|
||||
|
||||
bx::Error err;
|
||||
bx::ErrorAssert err;
|
||||
|
||||
uint16_t count = static_cast<uint16_t>(uniforms.size() );
|
||||
bx::write(_writer, count, &err);
|
||||
|
@ -326,7 +326,7 @@ namespace bgfx { namespace spirv
|
||||
{
|
||||
uint16_t size = 0;
|
||||
|
||||
bx::Error err;
|
||||
bx::ErrorAssert err;
|
||||
|
||||
uint16_t count = static_cast<uint16_t>(uniforms.size() );
|
||||
bx::write(_writer, count, &err);
|
||||
|
Loading…
Reference in New Issue
Block a user