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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user