mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-20 05:43:12 +01:00
shaderc: Added in/out hash. Fixed shader binary backward compatibility.
This commit is contained in:
@@ -2394,21 +2394,21 @@ namespace bgfx { namespace d3d9
|
||||
uint32_t magic;
|
||||
bx::read(&reader, magic);
|
||||
|
||||
switch (magic)
|
||||
const bool fragment = isShaderType(magic, 'F');
|
||||
|
||||
uint32_t hashIn;
|
||||
bx::read(&reader, hashIn);
|
||||
|
||||
uint32_t hashOut;
|
||||
|
||||
if (isShaderVerLess(magic, 6) )
|
||||
{
|
||||
case BGFX_CHUNK_MAGIC_FSH:
|
||||
case BGFX_CHUNK_MAGIC_VSH:
|
||||
break;
|
||||
|
||||
default:
|
||||
BGFX_FATAL(false, Fatal::InvalidShader, "Unknown shader format %x.", magic);
|
||||
break;
|
||||
hashOut = hashIn;
|
||||
}
|
||||
else
|
||||
{
|
||||
bx::read(&reader, hashOut);
|
||||
}
|
||||
|
||||
bool fragment = BGFX_CHUNK_MAGIC_FSH == magic;
|
||||
|
||||
uint32_t iohash;
|
||||
bx::read(&reader, iohash);
|
||||
|
||||
uint16_t count;
|
||||
bx::read(&reader, count);
|
||||
|
||||
Reference in New Issue
Block a user