mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-19 05:23:00 +01:00
shaderc: Added in/out hash. Fixed shader binary backward compatibility.
This commit is contained in:
@@ -75,14 +75,23 @@ namespace bgfx
|
||||
uint32_t magic;
|
||||
bx::peek(_reader, magic);
|
||||
|
||||
if (BGFX_CHUNK_MAGIC_CSH == magic
|
||||
|| BGFX_CHUNK_MAGIC_FSH == magic
|
||||
|| BGFX_CHUNK_MAGIC_VSH == magic)
|
||||
if (isShaderBin(magic) )
|
||||
{
|
||||
bx::read(_reader, magic);
|
||||
|
||||
uint32_t iohash;
|
||||
bx::read(_reader, iohash, _err);
|
||||
uint32_t hashIn;
|
||||
bx::read(_reader, hashIn);
|
||||
|
||||
uint32_t hashOut;
|
||||
|
||||
if (isShaderVerLess(magic, 6) )
|
||||
{
|
||||
hashOut = hashIn;
|
||||
}
|
||||
else
|
||||
{
|
||||
bx::read(_reader, hashOut);
|
||||
}
|
||||
|
||||
uint16_t count;
|
||||
bx::read(_reader, count, _err);
|
||||
|
||||
Reference in New Issue
Block a user