HLSL: require coverage mask to be arrayed output.

SPIR-V requires the coverage mask to be an array of integers, but HLSL
allows scalar integers.  This adds the requisite type conversion and
wrapped entry point handling.

Fixes: #1202
This commit is contained in:
LoopDawg
2018-05-16 07:25:29 -06:00
parent cfb05ec702
commit 4e6d3eaf5d
5 changed files with 264 additions and 12 deletions

20
Test/hlsl.coverage.frag Normal file
View File

@@ -0,0 +1,20 @@
// Verify that coverage mask is an array, as required by SPIR-V.
struct PS_INPUT
{
};
struct PS_OUTPUT
{
float4 vColor : SV_Target0;
uint nCoverageMask : SV_Coverage;
};
PS_OUTPUT main( PS_INPUT i )
{
PS_OUTPUT o;
o.vColor = float4(1.0, 0.0, 0.0, 1.0);
o.nCoverageMask = 0;
return o;
}