pub const POST_COMMON: &str = "// Declarations shared by the fullscreen post passes, spliced into a shader at\n// its POST_COMMON marker (see slang_source.rs). Not a standalone program: it\n// declares no entry point and no resources, so it never appears in a backend\'s\n// program table. Nothing here may spell the marker itself -- the splice would\n// reintroduce it into the assembled source.\n\n// Dimensions of a combined texture-sampler, as out parameters.\n//\n// slangc mis-lowers GetDimensions on a combined type for HLSL: it splits the\n// type and then passes the sampler as the first argument\n// (`tex.GetDimensions(samp, w, h)`), which no HLSL overload takes, so the DXIL\n// leg fails in dxc. Spelling the call here fixes the argument list. A split\n// pair occupies two operand slots, so `$0` is the texture, `$1` the sampler it\n// dropped, and the out parameters land at `$2` and `$3`.\nvoid combined_dims(Sampler2D<float4> s, out uint w, out uint h)\n{\n __target_switch\n {\n case hlsl:\n __intrinsic_asm \"$0.GetDimensions($2, $3)\";\n default:\n s.GetDimensions(w, h);\n }\n}\n\n// Texture dimensions of a combined texture-sampler, as floats.\nfloat2 combined_size(Sampler2D<float4> s)\n{\n uint w, h;\n combined_dims(s, w, h);\n return float2(float(w), float(h));\n}\n";Expand description
post_common.slang.