Fixed handling of constants in source generators

このコミットが含まれているのは:
Sergio Pedri committed 2021-01-10 18:37:13 +01:00
1 親 30fb7f448c
コミット 3daafd3e16
2ファイル変更
+6 -5

検索条件に一致するファイルはありません

+2
ファイルの表示
@@ -141,6 +141,8 @@ namespace ComputeSharp.SourceGenerators
}
else if (HlslKnownTypes.IsScalarOrVectorType(typeName))
{
if (fieldSymbol.IsConst) continue;
var (fieldSize, fieldPack) = HlslKnownSizes.GetTypeInfo(typeName);
// Calculate the right offset with 16-bytes padding (HLSL constant buffer).