yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Mukund KeshavaHLSL: Add 'f' suffix to float literals in code generation (#6381)9580e311e

master
385 B10 linesraw
1//TEST:SIMPLE(filecheck=HLSL):-target hlsl -profile ps_6_6 -entry fragmentMain
2//TEST:SIMPLE(filecheck=DXIL):-target dxil -profile ps_6_6 -entry fragmentMain
3
4float4 fragmentMain(float2 uv : TEXCOORD) : SV_Target
5{
6    //HLSL:, ddx({{.*}}1.5f)
7    //DXIL: = call float @dx.op.unary.f32(i32 {{.*}} ; DerivCoarseX(value)
8    float val = 1.5;
9    return float4(1.0, ddx(val), 0.0, 1.0);
10}