mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Changed check to fatal on failure to create shaders.
This commit is contained in:
parent
53fb5773a6
commit
12fe3f684e
3 changed files with 6 additions and 4 deletions
|
@ -1257,6 +1257,7 @@ namespace bgfx
|
||||||
if (_fragment)
|
if (_fragment)
|
||||||
{
|
{
|
||||||
DX_CHECK(s_renderCtx.m_device->CreatePixelShader(code, shaderSize, NULL, (ID3D11PixelShader**)&m_ptr) );
|
DX_CHECK(s_renderCtx.m_device->CreatePixelShader(code, shaderSize, NULL, (ID3D11PixelShader**)&m_ptr) );
|
||||||
|
BGFX_FATAL(NULL != m_ptr, bgfx::Fatal::InvalidShader, "Failed to create fragment shader.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1265,6 +1266,7 @@ namespace bgfx
|
||||||
memcpy(m_code->data, code, shaderSize);
|
memcpy(m_code->data, code, shaderSize);
|
||||||
|
|
||||||
DX_CHECK(s_renderCtx.m_device->CreateVertexShader(code, shaderSize, NULL, (ID3D11VertexShader**)&m_ptr) );
|
DX_CHECK(s_renderCtx.m_device->CreateVertexShader(code, shaderSize, NULL, (ID3D11VertexShader**)&m_ptr) );
|
||||||
|
BGFX_FATAL(NULL != m_ptr, bgfx::Fatal::InvalidShader, "Failed to create vertex shader.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1084,12 +1084,12 @@ namespace bgfx
|
||||||
if (_fragment)
|
if (_fragment)
|
||||||
{
|
{
|
||||||
DX_CHECK(s_renderCtx.m_device->CreatePixelShader(code, (IDirect3DPixelShader9**)&m_ptr) );
|
DX_CHECK(s_renderCtx.m_device->CreatePixelShader(code, (IDirect3DPixelShader9**)&m_ptr) );
|
||||||
BX_CHECK(NULL != m_ptr, "Failed to create fragment shader.");
|
BGFX_FATAL(NULL != m_ptr, bgfx::Fatal::InvalidShader, "Failed to create fragment shader.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DX_CHECK(s_renderCtx.m_device->CreateVertexShader(code, (IDirect3DVertexShader9**)&m_ptr) );
|
DX_CHECK(s_renderCtx.m_device->CreateVertexShader(code, (IDirect3DVertexShader9**)&m_ptr) );
|
||||||
BX_CHECK(NULL != m_ptr, "Failed to create vertex shader.");
|
BGFX_FATAL(NULL != m_ptr, bgfx::Fatal::InvalidShader, "Failed to create vertex shader.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -357,8 +357,8 @@ namespace bgfx
|
||||||
uint32_t magic;
|
uint32_t magic;
|
||||||
bx::read(&reader, magic);
|
bx::read(&reader, magic);
|
||||||
|
|
||||||
uint32_t hash;
|
uint32_t iohash;
|
||||||
bx::read(&reader, hash);
|
bx::read(&reader, iohash);
|
||||||
|
|
||||||
const uint8_t* code = reader.getDataPtr();
|
const uint8_t* code = reader.getDataPtr();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue