summaryrefslogtreecommitdiffstats
path: root/source/slang
diff options
context:
space:
mode:
authorpdeayton-nv <205388607+pdeayton-nv@users.noreply.github.com>2025-10-06 04:07:55 -0700
committerGitHub <noreply@github.com>2025-10-06 11:07:55 +0000
commit7774d5b430c5aca22c8e00a7578702ecfc7b5e2a (patch)
treee6b54deb160a8222ecfcf233972aadef3939087b /source/slang
parent04093bcbaea9784cdffe55f3931f50db7ad9f808 (diff)
Prefer IntegerType over LogicalType integer matrix mul() overloads (#8426)
Integer mul(matrix, matrix) and mul(vector, matrix) are not disambiguated between __BuiltinIntegerType and __BuiltinLogicalType, emitting an ambiguous call compilation error. Use the OverloadRank attribute to prefer the IntegerType overload over the LogicalType overload. Fixes #8424
Diffstat (limited to 'source/slang')
-rw-r--r--source/slang/hlsl.meta.slang2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/slang/hlsl.meta.slang b/source/slang/hlsl.meta.slang
index 489bcbab6..ff2762b23 100644
--- a/source/slang/hlsl.meta.slang
+++ b/source/slang/hlsl.meta.slang
@@ -12190,6 +12190,7 @@ vector<T, M> mul(vector<T, N> left, matrix<T, N, M> right)
}
__generic<T : __BuiltinLogicalType, let N : int, let M : int>
[__readNone]
+[OverloadRank(-1)]
[require(cpp_cuda_glsl_hlsl_metal_spirv_wgsl, sm_4_0_version)]
vector<T, M> mul(vector<T, N> left, matrix<T, N, M> right)
{
@@ -12353,6 +12354,7 @@ matrix<T,R,C> mul(matrix<T,R,N> left, matrix<T,N,C> right)
}
__generic<T : __BuiltinLogicalType, let R : int, let N : int, let C : int>
[__readNone]
+[OverloadRank(-1)]
[require(cpp_cuda_glsl_hlsl_metal_spirv_wgsl, sm_4_0_version)]
matrix<T,R,C> mul(matrix<T,R,N> left, matrix<T,N,C> right)
{