diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index b194b33d..b0bbaa30 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -1257,6 +1257,7 @@ namespace bgfx if (_fragment) { 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 { @@ -1265,6 +1266,7 @@ namespace bgfx memcpy(m_code->data, code, shaderSize); 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."); } } diff --git a/src/renderer_d3d9.cpp b/src/renderer_d3d9.cpp index 30d9e845..65706266 100644 --- a/src/renderer_d3d9.cpp +++ b/src/renderer_d3d9.cpp @@ -1084,12 +1084,12 @@ namespace bgfx if (_fragment) { 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 { 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."); } } diff --git a/src/renderer_gl.h b/src/renderer_gl.h index a7695331..4747031d 100644 --- a/src/renderer_gl.h +++ b/src/renderer_gl.h @@ -357,8 +357,8 @@ namespace bgfx uint32_t magic; bx::read(&reader, magic); - uint32_t hash; - bx::read(&reader, hash); + uint32_t iohash; + bx::read(&reader, iohash); const uint8_t* code = reader.getDataPtr();