mirror of https://github.com/bkaradzic/bgfx
Updated glslang.
This commit is contained in:
parent
8c2b99d81e
commit
f38b4b0daf
|
@ -830,7 +830,15 @@ namespace spv {
|
|||
[&](spv::Id& id) {
|
||||
if (thisOpCode != spv::OpNop) {
|
||||
++idCounter;
|
||||
const std::uint32_t hashval = opCounter[thisOpCode] * thisOpCode * 50047 + idCounter + fnId * 117;
|
||||
const std::uint32_t hashval =
|
||||
// Explicitly cast operands to unsigned int to avoid integer
|
||||
// promotion to signed int followed by integer overflow,
|
||||
// which would result in undefined behavior.
|
||||
static_cast<unsigned int>(opCounter[thisOpCode])
|
||||
* thisOpCode
|
||||
* 50047
|
||||
+ idCounter
|
||||
+ static_cast<unsigned int>(fnId) * 117;
|
||||
|
||||
if (isOldIdUnmapped(id))
|
||||
localId(id, nextUnusedId(hashval % softTypeIdLimit + firstMappedID));
|
||||
|
|
Loading…
Reference in New Issue