mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-27 17:06:32 +00:00
Don't try and disassemble invalid SPIR-V (it may be GLSL)
This commit is contained in:
@@ -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