mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-17 17:49:18 +00:00
Don't try and disassemble invalid SPIR-V (it may be GLSL)
This commit is contained in:
1 parent
4ec19f5b2c
commit
a90b2315ec
1 file changed
+7
@@ -2457,6 +2457,13 @@ void ParseSPIRV(uint32_t *spirv, size_t spirvLength, SPVModule &module)
|
||||
}
|
||||
|
||||
module.moduleVersion = spirv[1];
|
||||
|
||||
if(module.moduleVersion != spv::Version)
|
||||
{
|
||||
RDCERR("Unsupported SPIR-V version: %08x", spirv[1]);
|
||||
return;
|
||||
}
|
||||
|
||||
module.generator = spirv[2];
|
||||
module.ids.resize(spirv[3]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user