mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
shaderc: Add before hlsl validation option to spirv (#1892)
Fixes opaque type in struct error by disabling check. ``` Error: In Vulkan, OpTypeStruct must not contain an opaque type. %BgfxSampler2D = OpTypeStruct %6 %8 ```
This commit is contained in:
@@ -980,7 +980,10 @@ namespace bgfx { namespace spirv
|
||||
|
||||
opt.RegisterLegalizationPasses();
|
||||
|
||||
if (!opt.Run(spirv.data(), spirv.size(), &spirv) )
|
||||
spvtools::ValidatorOptions validatorOptions;
|
||||
validatorOptions.SetBeforeHlslLegalization(true);
|
||||
|
||||
if (!opt.Run(spirv.data(), spirv.size(), &spirv, validatorOptions, false) )
|
||||
{
|
||||
compiled = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user