Add HLSL primitive type names to known keywords
このコミットが含まれているのは:
1 親
e6673bf7c0
コミット
b27c89acc0
2ファイル変更
+11
-2
検索条件に一致するファイルはありません
@@ -30,9 +30,16 @@ internal static partial class HlslKnownKeywords
|
||||
"pixelfragment", "point", "precise", "register", "row_major", "sample",
|
||||
"sampler", "shared", "snorm", "stateblock", "stateblock_state", "tbuffer",
|
||||
"technique", "typedef", "triangle", "triangleadj", "uniform", "unorm",
|
||||
"unsigned", "vector", "vertexfragment", "zero"
|
||||
"unsigned", "vector", "vertexfragment", "zero", "float1", "double1",
|
||||
"int1", "uint1", "bool1"
|
||||
});
|
||||
|
||||
// HLSL primitive names
|
||||
foreach (var type in HlslKnownTypes.KnownVectorTypes.Concat(HlslKnownTypes.KnownMatrixTypes))
|
||||
{
|
||||
knownKeywords.Add(type.Name.ToLower());
|
||||
}
|
||||
|
||||
// HLSL intrinsics method names
|
||||
foreach (var method in typeof(Hlsl).GetMethods(BindingFlags.Public | BindingFlags.Static))
|
||||
{
|
||||
|
||||
@@ -20,13 +20,15 @@ namespace ComputeSharp.Tests
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> row_major;
|
||||
public readonly float dword;
|
||||
public readonly float float2;
|
||||
public readonly int int2x2;
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
float exp = Hlsl.Exp(dword * row_major[ThreadIds.X]);
|
||||
float log = Hlsl.Log(1 + exp);
|
||||
|
||||
row_major[ThreadIds.X] = log / dword;
|
||||
row_major[ThreadIds.X] = log / dword + float2 + int2x2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする