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:
parent
94cd22b440
commit
78614c9b55
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user