HLSL: require tessellation factors to be fixed size arrays
SPIR-V requires that tessellation factor arrays be size 4 (outer) or 2 (inner). HLSL allows other sizes such as 3, or even scalars. This commit converts between them by forcing the IO types to be the SPIR-V size, and allowing copies between the internal and IO types to handle these cases.
This commit is contained in:
parent
9cee73e028
commit
194f0f39ec
6 changed files with 216 additions and 162 deletions
|
|
@ -9,8 +9,8 @@ struct hs_in_t
|
|||
|
||||
struct hs_pcf_t
|
||||
{
|
||||
float tfactor[3] : SV_TessFactor;
|
||||
float flInFactor : SV_InsideTessFactor;
|
||||
float tfactor[3] : SV_TessFactor; // must turn into a size 4 array in SPIR-V
|
||||
float flInFactor : SV_InsideTessFactor; // must turn into a size 2 array in SPIR-V
|
||||
};
|
||||
|
||||
struct hs_out_t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue