This commit is contained in:
Branimir Karadžić
2016-10-25 20:16:00 -07:00
parent eaea9551fb
commit 9f2844e297

View File

@@ -3436,6 +3436,11 @@ namespace bgfx
{
UniformHandle handle = { idx };
UniformRef& uniform = m_uniformRef[handle.idx];
BX_CHECK(uniform.m_type == _type
, "Uniform type mismatch (type: %d, expected %d)."
, _type
, uniform.m_type
);
uint32_t oldsize = g_uniformTypeSize[uniform.m_type];
uint32_t newsize = g_uniformTypeSize[_type];
@@ -3461,7 +3466,6 @@ namespace bgfx
UniformHandle handle = { m_uniformHandle.alloc() };
BX_WARN(isValid(handle), "Failed to allocate uniform handle.");
if (isValid(handle) )
{
BX_TRACE("Creating uniform (handle %3d) %s", handle.idx, _name);
@@ -3483,6 +3487,10 @@ namespace bgfx
cmdbuf.write(len);
cmdbuf.write(_name, len);
}
else
{
BX_TRACE("Failed to allocate uniform handle.");
}
return handle;
}