mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
shaderc: Fixed SPIR-V uniform array size reflection. Issue #2964.
This commit is contained in:
@@ -4868,7 +4868,7 @@ namespace bgfx
|
||||
}
|
||||
}
|
||||
|
||||
_num = bx::max<uint16_t>(1, _num);
|
||||
_num = bx::max<uint16_t>(1, _num);
|
||||
|
||||
uint16_t idx = m_uniformHashMap.find(bx::hash<bx::HashMurmur2A>(_name) );
|
||||
if (kInvalidHandle != idx)
|
||||
@@ -4890,6 +4890,8 @@ namespace bgfx
|
||||
uniform.m_type = oldsize < newsize ? _type : uniform.m_type;
|
||||
uniform.m_num = bx::max<uint16_t>(uniform.m_num, _num);
|
||||
|
||||
BX_TRACE(" Resize uniform (handle %3d) `%s`, num %d", handle.idx, _name, _num);
|
||||
|
||||
CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::CreateUniform);
|
||||
cmdbuf.write(handle);
|
||||
cmdbuf.write(uniform.m_type);
|
||||
@@ -4911,7 +4913,7 @@ namespace bgfx
|
||||
return BGFX_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
BX_TRACE("Creating uniform (handle %3d) %s", handle.idx, _name);
|
||||
BX_TRACE("Creating uniform (handle %3d) `%s`, num %d", handle.idx, _name, _num);
|
||||
|
||||
UniformRef& uniform = m_uniformRef[handle.idx];
|
||||
uniform.m_name.set(_name);
|
||||
|
||||
Reference in New Issue
Block a user