From 0048a81aeb06d3942362c9f00f9ca004a79bc56b Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Fri, 21 Jul 2017 12:19:01 -0700 Subject: Don't add `flat` qualifier to integer fragment output Fixes #133 We already had logic to skip adding `flat` to a vertex input, and this just extends it to not adding `flat` to a fragment output. Note that explicit qualifiers in the input HLSL/Slang will still be carried through to the output, so it is still possible for a Slang user to shoot themself in the foot with interpolation qualifiers. --- tests/bugs/gh-133.slang | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/bugs/gh-133.slang (limited to 'tests/bugs/gh-133.slang') diff --git a/tests/bugs/gh-133.slang b/tests/bugs/gh-133.slang new file mode 100644 index 000000000..56a896ec9 --- /dev/null +++ b/tests/bugs/gh-133.slang @@ -0,0 +1,21 @@ +//TEST:CROSS_COMPILE: -profile ps_5_0 -entry main -target spirv-assembly + +// Ensure that an integer output from +// a fragment shader doesn't get a `flat` qualifier + +struct Fragment +{ + uint foo; +}; + +cbuffer U +{ + uint bar; +} + +Fragment main() : SV_Target +{ + Fragment result; + result.foo = bar; + return result; +} -- cgit v1.2.3