DirectXShaderCompiler
DirectXShaderCompiler copied to clipboard
Internal llvm::cast<X> due to particular combination of class fields and methods
(reduced to minimum crashing example) code:
struct PSInput
{
};
class SurfaceData_BasePBR
{
float3 albedo;
};
interface ISpecRough
{
void ApplySpecularAA();
};
class SurfaceData_NewPBR : SurfaceData_BasePBR, ISpecRough
{
float3 emissiveLighting;
void ApplySpecularAA()
{
}
};
float4 PSMain( PSInput input ) : SV_TARGET
{
SurfaceData_NewPBR obj ;
obj . albedo . x = 1 ;
return float4 ( obj . albedo , 1 ) ;
}
Example command line:
-T ps_6_5 -E PSMain -HV 2021
Effect:
Internal Compiler error: llvm::cast<X>() argument of incompatible type!